commit | c85fca1957cc32343b4db155fcdc70fddcb5ba62 | [log] [tgz] |
---|---|---|
author | Geoffrey Martin-Noble <gcmn@google.com> | Tue Feb 18 10:50:05 2020 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Feb 18 10:51:17 2020 -0800 |
tree | 63ed3237b3aab7fb5e8ed016a15fb6a2ed4f91f3 | |
parent | a927976977f454e5ae2f1afb6700a5dba41755f8 [diff] |
CTest: Delete tmpdir if it wasn't previously If a previous test run was interrupted, it might not have cleaned up any temp directories and a subsequent run could fail on `mkdir`. Delete the temporary directory before trying to create it. Depends on https://github.com/google/iree/pull/775 Closes https://github.com/google/iree/pull/778 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/778 from GMNGeoffrey:ctest-cleanup 2339d9aa2e1f5a0bb3aa43b4f2b6e12c6fd7057b PiperOrigin-RevId: 295770807
diff --git a/build_tools/cmake/run_test.sh b/build_tools/cmake/run_test.sh index 50eed16..0248fc1 100755 --- a/build_tools/cmake/run_test.sh +++ b/build_tools/cmake/run_test.sh
@@ -26,6 +26,7 @@ } echo "Creating test environment" +rm -rf "${TEST_TMPDIR?}" # In case this wasn't cleaned up previously mkdir "${TEST_TMPDIR?}" trap cleanup EXIT # Execute whatever we were passed.