diff --git a/.github/workflows/c_apps.sh b/.github/workflows/c_apps.sh index 5594273d..08d6586b 100755 --- a/.github/workflows/c_apps.sh +++ b/.github/workflows/c_apps.sh @@ -31,7 +31,9 @@ case "$(uname)" in sudo rm -f /swapfile sudo apt clean # shellcheck disable=SC2046 - docker rmi $(docker image ls -aq) + if [ -n "$(docker image ls -aq)" ]; then + docker rmi $(docker image ls -aq) + fi df -h ;; diff --git a/.github/workflows/cxx_apps.yml b/.github/workflows/cxx_apps.yml index 6bd1fdb1..87a73df2 100644 --- a/.github/workflows/cxx_apps.yml +++ b/.github/workflows/cxx_apps.yml @@ -67,6 +67,6 @@ jobs: - name: build_step_nix run: | - .github/workflows/cxx_apps.sh .github/workflows/cxx_apps_semantics_preserving.sh + .github/workflows/cxx_apps.sh shell: bash diff --git a/.github/workflows/cxx_apps_semantics_preserving.sh b/.github/workflows/cxx_apps_semantics_preserving.sh index 3ffe48de..62be2fa4 100755 --- a/.github/workflows/cxx_apps_semantics_preserving.sh +++ b/.github/workflows/cxx_apps_semantics_preserving.sh @@ -31,7 +31,9 @@ case "$(uname)" in sudo rm -f /swapfile sudo apt clean # shellcheck disable=SC2046 - docker rmi $(docker image ls -aq) + if [ -n "$(docker image ls -aq)" ]; then + docker rmi $(docker image ls -aq) + fi df -h ;; @@ -93,19 +95,6 @@ pushd examples/math cmake --build build ${DREDD_EXECUTABLE} --semantics-preserving-coverage-instrumentation -p build/compile_commands.json --mutation-info-file mutation-info.json math/src/*.cc ./build/mathtest/mathtest - NUM_MUTANTS=`python3 ${DREDD_ROOT}/scripts/query_mutant_info.py mutation-info.json --largest-mutant-id` - EXPECTED_NUM_MUTANTS=1132 - if [ ${NUM_MUTANTS} -ne ${EXPECTED_NUM_MUTANTS} ] - then - echo "Found ${NUM_MUTANTS} mutants when mutating the math library source code. Expected ${EXPECTED_NUM_MUTANTS}. If Dredd changed recently, the expected value may just need to be updated, if it still looks sensible. Otherwise, there is likely a problem." - exit 1 - fi - - # Display info about every mutant, just to check that the script that displays mutant info does not error. - for mutant in `seq 0 ${NUM_MUTANTS}` - do - python3 ${DREDD_ROOT}/scripts/query_mutant_info.py mutation-info.json --show-info-for-mutant ${mutant} --path-prefix-replacement ${DREDD_ROOT}/examples/math/math ${DREDD_ROOT}/examples/math/math-original > /dev/null - done popd echo "examples/threaded: check that a simple concurrent program runs OK after mutation" @@ -156,13 +145,6 @@ pushd SPIRV-Tools ./build/test/val/test_val_capability ./build/test/val/test_val_fghijklmnop ./build/test/val/test_val_rstuvw - NUM_MUTANTS=`python3 ${DREDD_ROOT}/scripts/query_mutant_info.py mutation-info.json --largest-mutant-id` - EXPECTED_NUM_MUTANTS=67998 - if [ ${NUM_MUTANTS} -ne ${EXPECTED_NUM_MUTANTS} ] - then - echo "Found ${NUM_MUTANTS} mutants when mutating the SPIR-V validator source code. Expected ${EXPECTED_NUM_MUTANTS}. If Dredd changed recently, the expected value may just need to be updated, if it still looks sensible. Otherwise, there is likely a problem." - exit 1 - fi popd echo "LLVM: check that InstCombine builds after mutation" @@ -182,13 +164,6 @@ pushd llvm-project done ${DREDD_EXECUTABLE} --semantics-preserving-coverage-instrumentation --mutation-info-file mutation-info.json -p "${DREDD_ROOT}/llvm-project/build/compile_commands.json" "${FILES[@]}" cmake --build build --target LLVMInstCombine - NUM_MUTANTS=`python3 ${DREDD_ROOT}/scripts/query_mutant_info.py mutation-info.json --largest-mutant-id` - EXPECTED_NUM_MUTANTS=97675 - if [ ${NUM_MUTANTS} -ne ${EXPECTED_NUM_MUTANTS} ] - then - echo "Found ${NUM_MUTANTS} mutants when mutating the LLVM source code. Expected ${EXPECTED_NUM_MUTANTS}. If Dredd changed recently, the expected value may just need to be updated, if it still looks sensible. Otherwise, there is likely a problem." - exit 1 - fi popd echo "Finished"