From 7c6dddf236413c0aa7d65ec04ecf57888c749cc9 Mon Sep 17 00:00:00 2001 From: Herman Venter Date: Mon, 16 Jul 2018 08:37:11 -0700 Subject: [PATCH] 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 --- .circleci/config.yml | 2 +- scripts/test262-runner.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bfdadf710..75530c6f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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/ diff --git a/scripts/test262-runner.js b/scripts/test262-runner.js index cc12228f3..9c99f6a43 100644 --- a/scripts/test262-runner.js +++ b/scripts/test262-runner.js @@ -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;