introduce unstable smoke test suite (#20639)

* allow mark tests as unstable

* fix

* fix invert

* stable and whole test suite

* docs and mark test cases as unstable

* a couple more unstable test cases
This commit is contained in:
Alan Ren
2022-09-21 13:09:06 -07:00
committed by GitHub
parent 12c5aa0f80
commit 0e21258fe8
5 changed files with 31 additions and 6 deletions

View File

@@ -34,5 +34,21 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}
const mocha = new Mocha(options);
// {{SQL CARBON EDIT}} - If grep option is specified, only run the matching test cases (local test case development/debug scenario),
// otherwise the value of 'RUN_UNSTABLE_TESTS' environment variable will be used to determine whether to run the stable test cases or the whole test suite.
// Unstable test cases have "@UNSTABLE@" in their full name (test suite name + test name).
if (!options.grep) {
if (process.env.RUN_UNSTABLE_TESTS === 'true') {
console.info('running all test cases.');
} else {
console.info('running stable test cases.');
mocha.grep('@UNSTABLE@').invert();
}
} else {
console.info('running test cases match the grep option.');
}
// {{SQL CARBON EDIT}} - end of edit.
mocha.addFile('out/main.js');
mocha.run(failures => process.exit(failures ? -1 : 0));