From 355db3bf04e46fa62eb73079c9461493c25759f3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 8 May 2016 23:37:07 -0700 Subject: 2946 Reorganize build system to minimize duplication while handling 3 scenarios: 1. Locally running tests with `mu test` 2. Locally running tests until some layer with `build_and_test_until` 3. Running on Linux with `test_layers` 4. Running on Travis CI with multiple sharded calls to `test_layers` One thing we drop at this point is support for OSX in test_layers. We don't need it now that we have Travis CI working. --- test_layers | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'test_layers') diff --git a/test_layers b/test_layers index a8804c41..45cc6b3c 100755 --- a/test_layers +++ b/test_layers @@ -1,16 +1,20 @@ #!/bin/bash -# Repeatedly stop building until successive layers, and run all tests built. +# Repeatedly stop building until successive layers, and run all tests built, +# while checking for undefined behavior using both UBSan and Valgrind. # -# Test all layers: -# test_layers -# Test non-app layers after x: -# test_layers x -# Test layers after x and until y (inclusive): -# test_layers x y -# Test all layers for a specific app: -# test_layers app +# Requires Linux. +# +# Usage: +# Test all layers: +# test_layers +# Test non-app layers after x: +# test_layers x +# Test layers after x and until y (inclusive): +# test_layers x y +# Test all layers for a specific app: +# test_layers app -TEST_UNTIL="./build_and_test_until" +BUILD_UNTIL="./build_until" MAKE="make" VALGRIND="valgrind --leak-check=yes --num-callers=40 -q --error-exitcode=1" @@ -19,7 +23,7 @@ do if [[ $f < $1 ]]; then continue; fi if [[ $2 && $f > $2 ]]; then exit 0; fi echo "=== $f" - $TEST_UNTIL $f || exit 1 + $BUILD_UNTIL $f || exit 1 done CXX=clang++ CFLAGS="-O3 -fsanitize=undefined -Wno-tautological-constant-out-of-range-compare" $MAKE -- cgit 1.4.1-2-gfad0