`yarn` no longer compiles the smoke test as a postinstall script. This breaks the flow of running `yarn && yarn smoketest` to execute the smoketest.

So change `yarn smoketest` to also do the compiling of the smoke test. But that generates too much extra work on the build machine, which needs to invoke `yarn smoketest` twice, once for Electron and once for web.

To workaround that, `yarn smoketest-no-compile` is added, which can be used by the build machine to avoid needlessly compiling.

While here, the nodejs version is already checked in the `yarn` preinstall script, so remove the check from the smoke test.
This commit is contained in:
Alexandru Dima 2021-01-14 10:35:30 +01:00
parent f1cb1b27f3
commit 00f8540d79
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
3 changed files with 4 additions and 8 deletions

View file

@ -216,7 +216,7 @@ steps:
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
yarn smoketest --build "$APP_ROOT/$APP_NAME"
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME"
continueOnError: true
timeoutInMinutes: 5
displayName: Run smoke tests (Electron)
@ -225,7 +225,7 @@ steps:
- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
yarn smoketest --web --headless
yarn smoketest-no-compile --web --headless
continueOnError: true
timeoutInMinutes: 5
displayName: Run smoke tests (Browser)

View file

@ -34,7 +34,8 @@
"7z": "7z",
"update-grammars": "node build/npm/update-all-grammars.js",
"update-localization-extension": "node build/npm/update-localization-extension.js",
"smoketest": "cd test/smoke && node test/index.js",
"smoketest": "cd test/smoke && yarn compile && node test/index.js",
"smoketest-no-compile": "cd test/smoke && node test/index.js",
"download-builtin-extensions": "node build/lib/builtInExtensions.js",
"monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit",
"tsec-compile-check": "node node_modules/vscode-tsec/bin/tsec -p src/tsconfig.tsec.json",

View file

@ -34,11 +34,6 @@ import { setup as setupDataMultirootTests } from './areas/multiroot/multiroot.te
import { setup as setupDataLocalizationTests } from './areas/workbench/localization.test';
import { setup as setupLaunchTests } from './areas/workbench/launch.test';
if (!/^v10/.test(process.version) && !/^v12/.test(process.version)) {
console.error('Error: Smoketest must be run using Node 10/12. Currently running', process.version);
process.exit(1);
}
const tmpDir = tmp.dirSync({ prefix: 't' }) as { name: string; removeCallback: Function; };
const testDataPath = tmpDir.name;
process.once('exit', () => rimraf.sync(testDataPath));