diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/dc/files/run-ptest')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/dc/files/run-ptest | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/dc/files/run-ptest b/meta-openembedded/meta-oe/recipes-support/dc/files/run-ptest new file mode 100644 index 0000000000..9240a3f851 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/dc/files/run-ptest @@ -0,0 +1,23 @@ +#!/bin/sh + +# This script runs tests taken from the github CI for the Double-Conversion library. +# For more information, please see: https://github.com/google/double-conversion/blob/master/.github/workflows/ci.yml#L60 + +# Count the number of failed tests +NUM_FAILS=0 + +# Run all tests using ctest +ctest -V + +# VCount the number of failed tests by checking the LastTest.log file generated by ctest +NUM_FAILS=$(grep -c "Failed" Testing/Temporary/LastTest.log) + +# Run the tests directly as well, just in case we forgot to add it to ctest +test/cctest/cctest +if [ $? -ne 0 ]; then + # If the test failed, increment the number of failed tests + NUM_FAILS=$(expr $NUM_FAILS + 1) +fi + +# Return the number of failed tests +exit $NUM_FAILS |