From c9de1810d3330a925b9d70bad7bb51d9f78042dc Mon Sep 17 00:00:00 2001 From: Michael Berlin Date: Thu, 23 Jul 2015 00:29:23 -0700 Subject: [PATCH] Travis: Add functionality to specify multiple make targets per test. This allows us to better binpack the different tests across the 5 available Travis test slots. --- .travis.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e2203ec02f..e4338e901f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,6 +69,7 @@ env: # As of 07/2015 this value works best in a Travis CI container. - VT_GO_PARALLEL=4 matrix: + # NOTE: Use "" if you specify a space separated list of multiple targets. - MAKE_TARGET=java_vtgate_client_test - MAKE_TARGET=unit_test_goveralls - MAKE_TARGET=small_integration_test @@ -86,8 +87,19 @@ script: - source dev.env # Log GOMAXPROCS (should be 2 as of 07/2015). - go run travis/log_gomaxprocs.go + # TODO(mberlin): Readd travis_retry when done testing. - | - travis_retry /usr/bin/time -f "CPU: %P Memory: %M kB" make build $MAKE_TARGET + return_value=1 + for target in $MAKE_TARGET; do + echo "Running: make $target" + /usr/bin/time -f "elapsed: %E CPU: %P Memory: %M kB" make $target + return_value=$? + if [ $return_value -ne 0 ]; then + echo "ERROR: make $target failed with code: $return_value. Please fix the problem and re-trigger the test." + break + fi + done + [ $return_value -eq 0 ] || false after_failure: # In case of errors, output log files to make it easier to debug the error. # List all available files.