Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build/ci/templates/test_phases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,10 @@ steps:
# > npm run package
# > npx gulp clean:cleanExceptTests
# > npm run testSmoke
- script: |
- bash: |
npm install -g vsce
npm run clean
npm run updateBuildNumber -- --buildNumber $TRAVIS_BUILD_NUMBER
npm run updateBuildNumber -- --buildNumber $BUILD_BUILDID
npm run package
npx gulp clean:cleanExceptTests
npm run testSmoke
Expand Down
4 changes: 2 additions & 2 deletions build/ci/vscode-python-pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
'Mac-Py3.7 Unit+Single':
PythonVersion: '3.7'
VMImageName: 'macos-10.13'
TestsToRun: 'testUnitTests, pythonUnitTests, testSingleWorkspace'
TestsToRun: 'testUnitTests, pythonUnitTests, testSingleWorkspace, testSmoke'
NeedsPythonTestReqs: true
'Mac-Py2.7 Unit+Single':
PythonVersion: '2.7'
Expand All @@ -60,7 +60,7 @@ jobs:
'Linux-Py3.7 Unit+Single':
PythonVersion: '3.7'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testUnitTests, pythonUnitTests, testSingleWorkspace'
TestsToRun: 'testUnitTests, pythonUnitTests, testSingleWorkspace, testSmoke'
NeedsPythonTestReqs: true
'Linux-Py2.7 Unit+Single':
PythonVersion: '2.7'
Expand Down
1 change: 1 addition & 0 deletions news/3 Code Health/4515.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Corrected Smoke test failure for 'Run Python File In Terminal'
2 changes: 1 addition & 1 deletion src/test/smoke/runInTerminal.smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ suite('Smoke Test: Run Python File In Terminal', () => {
}
const textDocument = await openFile(file);

await vscode.commands.executeCommand<void>('python.execInTerminal', textDocument.uri, outputFile);
await vscode.commands.executeCommand<void>('python.execInTerminal', textDocument.uri);
const checkIfFileHasBeenCreated = () => fs.pathExists(outputFile);
await waitForCondition(checkIfFileHasBeenCreated, 30_000, `"${outputFile}" file not created`);
});
Expand Down
13 changes: 8 additions & 5 deletions src/testMultiRootWkspc/smokeTests/testExecInTerminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import os

optlist, args = getopt.getopt(sys.argv, '')
if len(args) < 2:
help_msg = '{} requires 1 parameter - the full path specification of the logfile to write.'.format(args[0])
raise RuntimeError(help_msg)

log_file = args[1]

# If the caller has not specified the output file, create one for them with
# the same name as the caller script, but with a .log extension.
log_file = os.path.splitext(sys.argv[0])[0] + '.log'

# If the output file is given, use that instead.
if len(args) == 2:
log_file = args[1]

with open(log_file, "a") as f:
f.write(sys.executable)