Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Oct 30, 2024
1 parent 140fa1e commit bdabd10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
});

try {
console.log('EJFB run tests new');
await this.runTestsNew(
uri,
testIds,
Expand Down Expand Up @@ -203,6 +204,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
}
});

console.log('EJFB before execObservable');
const result = execService?.execObservable(runArgs, spawnOptions);
resultProc = result?.proc;

Expand All @@ -213,11 +215,13 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
const out = utils.fixLogLinesNoTrailing(data.toString());
runInstance?.appendOutput(out);
this.outputChannel?.append(out);
console.log('EJFB stdout', out);
});
result?.proc?.stderr?.on('data', (data) => {
const out = utils.fixLogLinesNoTrailing(data.toString());
runInstance?.appendOutput(out);
this.outputChannel?.append(out);
console.log('EJFB stderr', out);
});
result?.proc?.on('exit', (code, signal) => {
console.log('EJFB on exit');
Expand Down
3 changes: 2 additions & 1 deletion src/testTestingRootWkspc/errorWorkspace/test_seg_fault.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

class TestSegmentationFault(unittest.TestCase):
def cause_segfault(self):
print("Causing a segmentation fault")
ctypes.string_at(0) # Dereference a NULL pointer

def test_segfault(self):
assert True
self.cause_segfault()
assert True


if __name__ == "__main__":
Expand Down

0 comments on commit bdabd10

Please sign in to comment.