Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |
| 3 | # This script runs tests taken from the github CI for the Double-Conversion library. |
| 4 | # For more information, please see: https://github.com/google/double-conversion/blob/master/.github/workflows/ci.yml#L60 |
| 5 | |
| 6 | # Count the number of failed tests |
| 7 | NUM_FAILS=0 |
| 8 | |
| 9 | # Run all tests using ctest |
| 10 | ctest -V |
| 11 | |
| 12 | # VCount the number of failed tests by checking the LastTest.log file generated by ctest |
| 13 | NUM_FAILS=$(grep -c "Failed" Testing/Temporary/LastTest.log) |
| 14 | |
| 15 | # Run the tests directly as well, just in case we forgot to add it to ctest |
| 16 | test/cctest/cctest |
| 17 | if [ $? -ne 0 ]; then |
| 18 | # If the test failed, increment the number of failed tests |
| 19 | NUM_FAILS=$(expr $NUM_FAILS + 1) |
| 20 | fi |
| 21 | |
| 22 | # Return the number of failed tests |
| 23 | exit $NUM_FAILS |