-
Notifications
You must be signed in to change notification settings - Fork 943
Add integration test with layers/node/converter when we modify version.ts
#1372
Conversation
layers
and node
when we touch version.ts
layers
and node
when we modify version.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. Please see my comments below.
Reviewable status: 0 of 1 approvals obtained (waiting on @dsmilkov, @nsthorat, @caisq, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 17 at r2 (raw file):
function test () {
If one of the tests below fail, how do you know from the Travis status? There is no checking of the exit code.
You can do something like the following
# ...
yarn && yarn link-local '@tensorflow/tfjs-core' && ./scripts/test-travis.sh
LAYERS_EXIT_CODE=$?
# ...
yarn && yarn link-local '@tensorflow/tfjs-core' && ./scripts/test-travis.sh
NODE_EXIT_CODE=$?
# ...
yarn && yarn link-local '@tensorflow/tfjs-core' && ./scripts/test-travis.sh
CONVERTER_EXIT_CODE=$?
# Then at the end of the function, check the values of LAYERS_EXIT_CODE, NODE_EXIT_CODE and CONVERTER_EXIT_CODE, one by one and use them to print a summary and determine the final return code of the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @nsthorat, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 17 at r2 (raw file):
Previously, caisq (Shanqing Cai) wrote…
function test () {
If one of the tests below fail, how do you know from the Travis status? There is no checking of the exit code.
You can do something like the following
# ... yarn && yarn link-local '@tensorflow/tfjs-core' && ./scripts/test-travis.sh LAYERS_EXIT_CODE=$? # ... yarn && yarn link-local '@tensorflow/tfjs-core' && ./scripts/test-travis.sh NODE_EXIT_CODE=$? # ... yarn && yarn link-local '@tensorflow/tfjs-core' && ./scripts/test-travis.sh CONVERTER_EXIT_CODE=$? # Then at the end of the function, check the values of LAYERS_EXIT_CODE, NODE_EXIT_CODE and CONVERTER_EXIT_CODE, one by one and use them to print a summary and determine the final return code of the function
Ah good catch. I initially had set -e
at the top of the script so it returns code 1 if any command fails, but since this is an integration test, seeing full status is useful. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @nsthorat, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 17 at r2 (raw file):
Previously, dsmilkov (Daniel Smilkov) wrote…
Ah good catch. I initially had
set -e
at the top of the script so it returns code 1 if any command fails, but since this is an integration test, seeing full status is useful. Done.
I tested layers/node/converter and none of them return a negative code number (they all return 1), so summing those 3 codes as a final result should be ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @dsmilkov, @nsthorat, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 45 at r3 (raw file):
if [ $LAYERS_EXIT_CODE -ne 0 ]; then echo 'Layers build failed'; fi
Can we do echoing not only when something fails, but also when something passes?
E.g.,
=== INTEGRATION TEST RESULTS ===
tfjs-layers: PASS
tfjs-node: FAIL
tfjs-converter: PASS
Final result: FAIL
That gives who's looking at it a complete picture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @nsthorat, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 45 at r3 (raw file):
Previously, caisq (Shanqing Cai) wrote…
if [ $LAYERS_EXIT_CODE -ne 0 ]; then echo 'Layers build failed'; fi
Can we do echoing not only when something fails, but also when something passes?
E.g.,
=== INTEGRATION TEST RESULTS ===
tfjs-layers: PASS
tfjs-node: FAIL
tfjs-converter: PASSFinal result: FAIL
That gives who's looking at it a complete picture.
Done. Added screenshot of output to the PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @dsmilkov, @nsthorat, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 60 at r4 (raw file):
print_status "${RED}Final result" "$FINAL_EXIT_CODE" "${NC}"
I think you should use green or default white color when the final result is pass. Red should only be used when the final result is fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @caisq, @nsthorat, @nkreeger, and @pyu10055)
scripts/test-integration.sh, line 60 at r4 (raw file):
Previously, caisq (Shanqing Cai) wrote…
print_status "${RED}Final result" "$FINAL_EXIT_CODE" "${NC}"
I think you should use green or default white color when the final result is pass. Red should only be used when the final result is fail.
Done (did blue/red => better for color blind folks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 6 files at r1, 1 of 3 files at r2, 1 of 1 files at r5.
Reviewable status:complete! 1 of 1 approvals obtained (waiting on @caisq, @nsthorat, @nkreeger, and @pyu10055)
layers
and node
when we modify version.ts
version.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 2 of 1 approvals obtained (waiting on @caisq, @dsmilkov, @nkreeger, and @pyu10055)
.travis.yml, line 23 at r5 (raw file):
node_js: '8'
Food for thought - Node 10 is now LTS https://nodejs.org/en/
#1379 added a unit test that failed in travis due to numerical precision: https://travis-ci.org/tensorflow/tfjs-core/jobs/451654174#L801 This PR: - fixes that test - Also fixes `test-travis.sh` to make sure we don't forward webgl --> cpu except for the last browser run -- probably caused during conflict resolving of #1371 and #1372 (https://reviewable.io/reviews/tensorflow/tfjs-core/1371#-LQ_a2y92YYLRMiYWqhC) DEV
Run a 3rd travis job (integration) when the
src/version.ts
file is modified.The integration job clones
layers
/node
/converter
and tests those repos againstcore@master
, giving the PR author a heads up before they make a new release ofcore
.https://travis-ci.org/tensorflow/tfjs-core/builds/449534806 is an example of a Travis run. See the 3rd job (TO_TEST=integration).
Details:
yarn test-travis
toyarn run-browserstack
to better reflect the taskyarn test-travis
to align core with the other repos (layers & node).Towards tensorflow/tfjs#848
DEV
This change is