Make CircleCI fail if not enough 262 tests pass (#2263)

Summary:
Release note: fix test262 to fail CircleCI test if not enough tests pass

The check for the number of tests that pass returned 1 to its caller, who just ignored it and then returned 0. Instead of that, now just call process.exit(1) when the check fails.

Also updated the expected number of ES6 tests that pass. It appears that updating Babel had a positive effect on those. Possibly it also causes one more ES5 test to fail when running locally (but not on Circle). That might be because of an ES5 test that now times out and an ES6 test that now does not. I have not investigated this as it seems of little importance right now.
Pull Request resolved: https://github.com/facebook/prepack/pull/2263

Reviewed By: trueadm

Differential Revision: D8859210

Pulled By: hermanventer

fbshipit-source-id: 724dcde05927cc914f6f9517f14dc230b8b0ad2e
This commit is contained in:
Herman Venter 2018-07-16 08:37:11 -07:00 committed by Facebook Github Bot
parent c5f300de04
commit 7c6dddf236
2 changed files with 4 additions and 3 deletions

View File

@ -60,7 +60,7 @@ jobs:
yarn test-sourcemaps
yarn test-std-in
yarn test-residual
yarn test-test262 --expectedCounts 11944,5566,0 --statusFile ~/artifacts/test262-status.txt --timeout 120 --cpuScale 0.25 --verbose
yarn test-test262 --expectedCounts 11944,5641,0 --statusFile ~/artifacts/test262-status.txt --timeout 120 --cpuScale 0.25 --verbose
#yarn test-test262-new --statusFile ~/artifacts/test262-new-status.txt --timeout 120 --verbose
- store_artifacts:
path: ~/artifacts/

View File

@ -350,7 +350,7 @@ function masterArgsParse(): MasterProgramArgs {
bailAfter: Infinity,
singleThreaded: false,
relativeTestPath: "/../test/test262",
expectedCounts: "11944,5566,2",
expectedCounts: "11943,5641,2",
},
});
let filterString = parsedArgs._[0];
@ -668,7 +668,8 @@ function handleFinished(args: MasterProgramArgs, groups: GroupsMap, earlierNumSk
(numPassedES5 < args.expectedES5 || numPassedES6 < args.expectedES6 || numTimeouts > args.expectedTimeouts)
) {
console.error(chalk.red("Overall failure. Expected more tests to pass!"));
return 1;
process.exit(1);
invariant(false);
} else {
// use 0 to avoid the npm error messages
return 0;