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.
This commit is contained in:
Michael Berlin 2015-07-23 00:29:23 -07:00
Родитель fafa040dea
Коммит c9de1810d3
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -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.