4040 run_integration_tests.sh [TEST_PATTERNS...]
4141
4242TEST_PATTERNS: Name of test you wish to execute. Wildcard (*) supported.
43- Default: '*'
43+ Default: '*.sh '
4444EOT
4545 ;;
4646 -* )
@@ -60,7 +60,7 @@ if ! docker --version; then
6060fi
6161
6262if [[ ${# TEST_PATTERNS[@]} -eq 0 ]]; then
63- TEST_PATTERNS=(" *" )
63+ TEST_PATTERNS=(" *.sh " )
6464fi
6565
6666SELF_DIR=$( realpath " $( dirname " $0 " ) " )
@@ -96,7 +96,7 @@ export NATIVELINK_DIR="$CACHE_DIR/nativelink"
9696mkdir -p " $NATIVELINK_DIR "
9797
9898for pattern in " ${TEST_PATTERNS[@]} " ; do
99- find " $SELF_DIR /integration_tests/" -name " $pattern " -type f -print0 | grep -v buildstream | while IFS= read -r -d $' \0' fullpath; do
99+ find " $SELF_DIR /integration_tests/" -name " $pattern " -type f -print0 | while IFS= read -r -d $' \0' fullpath; do
100100 # Cleanup.
101101 echo " Cleaning up cache directories NATIVELINK_DIR: $NATIVELINK_DIR "
102102 echo " Checking for existence of the NATIVELINK_DIR"
@@ -109,11 +109,13 @@ for pattern in "${TEST_PATTERNS[@]}"; do
109109 bazel --output_base=" $BAZEL_CACHE_DIR " clean
110110 FILENAME=$( basename " $fullpath " )
111111 echo " Running test $FILENAME "
112- sudo docker compose up -d
112+ sudo env RUST_LOG=info docker compose up -d
113113 if perl -e ' alarm shift; exec @ARGV' 30 bash -c ' until sudo docker compose logs | grep -q "Ready, listening on"; do sleep 1; done' ; then
114114 echo " String 'Ready, listening on' found in the logs."
115115 else
116116 echo " String 'Ready, listening on' not found in the logs within the given time."
117+ sudo docker compose logs
118+ exit 1
117119 fi
118120 set +e
119121 bash -euo pipefail " $fullpath "
0 commit comments