From b440355cbce50c189ed7a3d42586f6eb0fc5887f Mon Sep 17 00:00:00 2001 From: Matt Sinclair Date: Sat, 7 Jan 2023 16:08:11 -0600 Subject: [PATCH] tests: cleanup m5out directly in weekly The weekly test script was implicitly assuming that no m5out directory existed in the folder where the script was run. However, if a prior test ran and failed, it would not clean up its m5out directory, causing the weekly tests to fail. This commit resolves this by removing the m5out directory before trying to run any tests in the weekly script. Moreover, we also update the weekly script to explicitly remove this m5out directory at the end of the script. Change-Id: If10c59034528e171cc2c5dacb928b3a81d6b8c50 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67198 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce Tested-by: kokoro --- tests/weekly.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/weekly.sh b/tests/weekly.sh index c7f834b7a5..f9d3e4bc04 100755 --- a/tests/weekly.sh +++ b/tests/weekly.sh @@ -70,13 +70,14 @@ mkdir -p tests/testing-results # GPU weekly tests start here # before pulling gem5 resources, make sure it doesn't exist already -docker run --rm --volume "${gem5_root}":"${gem5_root}" -w \ +docker run -u $UID:$GID --rm --volume "${gem5_root}":"${gem5_root}" -w \ "${gem5_root}" --memory="${docker_mem_limit}" \ gcr.io/gem5-test/gcn-gpu:${tag} bash -c \ "rm -rf ${gem5_root}/gem5-resources" -# delete Pannotia datasets and output files in case a failed regression run left -# them around -rm -f coAuthorsDBLP.graph 1k_128k.gr result.out + +# delete m5out, Pannotia datasets, and output files in case a failed regression +# run left them around +rm -rf ${gem5_root}/m5out coAuthorsDBLP.graph 1k_128k.gr result.out # Pull gem5 resources to the root of the gem5 directory -- currently the # pre-built binares for LULESH are out-of-date and won't run correctly with @@ -383,5 +384,8 @@ docker run --rm --volume "${gem5_root}":"${gem5_root}" -w \ "${gem5_root}" --memory="${docker_mem_limit}" hacc-test-weekly bash -c \ "rm -rf ${gem5_root}/gem5-resources" +# Delete the gem5 m5out folder we created +rm -rf ${gem5_root}/m5out + # delete Pannotia datasets we downloaded and output files it created rm -f coAuthorsDBLP.graph 1k_128k.gr result.out