Skip to content
Snippets Groups Projects

Check if SCDAQ actually successfully runs in CI

Merged Dinyar Rabady requested to merge fix/ci_test_success_check into master
+ 23
1
#!/bin/sh
#!/bin/bash
echo "building scdaq locally"
cd src
make all
@@ -10,6 +10,28 @@ tar -xzvf gmt_testfile.tar.gz
cd ../../
echo "Starting scdaq test with GMT P5 capture file: check for crash"
timeout 20s src/scdaq --config test/config/scdaq-gmt.conf | uniq
GMTRET="${PIPESTATUS[0]}"
echo "#############################################################################"
echo "Starting scdaq test with CALO P5 capture file: check for crash"
timeout 20s src/scdaq --config test/config/scdaq-calo.conf | uniq
CALORET="${PIPESTATUS[0]}"
if [[ "$GMTRET" -ne 124 ]]; then # We expect to fail with a timeout because scdaq isn't supposed to return.
echo "SCDAQ test for GMT failed with exit code ${GMTRET}!"
GMT_FAILED=true
elif [[ $(find test/data -name "*scout_GMT*" | wc -l) -eq 0 ]]; then
echo "SCDAQ test for GMT failed, no output files found!"
GMT_FAILED=true
fi
if [[ "$CALORET" -ne 124 ]]; then # We expect to fail with a timeout because scdaq isn't supposed to return.
echo "SCDAQ test for CALO failed with exit code ${CALORET}!"
CALO_FAILED=true
elif [[ $(find test/data -name "*scout_CALO*" | wc -l) -eq 0 ]]; then
echo "SCDAQ test for CALO failed, no output files found!"
CALO_FAILED=true
fi
if [[ $GMT_FAILED = true || $CALO_FAILED = true ]]; then
exit 1
fi
echo "test run finished"
Loading