From 2535f23dd843c8abf3b53f752057e53950896f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 6 Dec 2017 15:13:02 +0100 Subject: [PATCH] run-integration-test: allow argument to be overriden This is useful for "sudo test/run-integration-tests.sh clean". --- test/run-integration-tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/run-integration-tests.sh b/test/run-integration-tests.sh index 3a54a8b17c..7d70be3fea 100755 --- a/test/run-integration-tests.sh +++ b/test/run-integration-tests.sh @@ -1,6 +1,11 @@ #!/bin/bash -e BUILD_DIR="$($(dirname "$0")/../tools/find-build-dir.sh)" +if [ $# -gt 0 ]; then + args="$@" +else + args="clean setup run" +fi ninja -C "$BUILD_DIR" @@ -13,7 +18,7 @@ cd "$(dirname "$0")" for TEST in TEST-??-* ; do echo -e "\n--x-- Starting $TEST --x--" set +e - make -C "$TEST" "BUILD_DIR=$BUILD_DIR" clean setup run + make -C "$TEST" "BUILD_DIR=$BUILD_DIR" $args RESULT=$? set -e echo "--x-- Result of $TEST: $RESULT --x--"