From 32edcfc9cd616e610d243cc133d314102b890096 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Mon, 26 Sep 2016 14:54:27 -0700 Subject: [PATCH] Track fiber tests (#7812) Use the newly added tracking system to track the number of fiber tests that are passing/failing. I first tried to modify the grunt lint rule for it and send the output in stdout but unfortunately grunt displays the rule + done messages there. I had like 30 lines of js already and I figured I could just write 3 lines of bash and it would work the same. Let me know if you want me to use another approach for it. Test Plan: Run the commands that have been introduced in this commit but the facts-tracker one Run `echo $FIBER_TESTS` and make sure it prints `666/1434` (cherry picked from commit 84f8df1f891285b8ff85880631d7882c30b2ced3) --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index b924f25cb4..e38e559bee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,11 +73,27 @@ script: set -e ./node_modules/.bin/grunt jest:coverage cat ./coverage/lcov.info | ./node_modules/.bin/coveralls + echo 'Testing in server-render (HTML generation) mode...' printf '\nmodule.exports.useCreateElement = false;\n' \ >> src/renderers/dom/shared/ReactDOMFeatureFlags.js ./node_modules/.bin/grunt jest:normal git checkout -- src/renderers/dom/shared/ReactDOMFeatureFlags.js + + echo 'Testing in fiber mode...' + printf '\nmodule.exports.useFiber = true;\n' \ + >> src/renderers/dom/shared/ReactDOMFeatureFlags.js + FIBER_TESTS=`\ + NODE_ENV=test node node_modules/jest/bin/jest --json | \ + node -e "\ + var data = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf8')); \ + console.log(data.numPassedTests + '/' + data.numTotalTests)\ + "\ + ` + git checkout -- src/renderers/dom/shared/ReactDOMFeatureFlags.js + node scripts/facts-tracker/index.js \ + "fiber-tests" "$FIBER_TESTS" + ./node_modules/.bin/gulp react:extract-errors elif [ "$TEST_TYPE" = flow ]; then set -e