tests: Abstract the docker image tag for Weekly tests

This abstraction allows us to more easily change the tags between
different gem5 releases and/or between stable and the develop branch.

Change-Id: Iad49cabac9b4000e8570162d3e12453c6d097ee2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65921
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2022-11-21 16:00:28 -08:00
committed by Bobby Bruce
parent 1e5bd5b89a
commit 38778c5a17

View File

@@ -35,6 +35,10 @@ gem5_root="${dir}/.."
# The per-container Docker memory limit.
docker_mem_limit="24g"
# The docker tag to use (varies between develop, and versions on the staging
# branch)
tag="latest"
# We assume the first two arguments are the number of threads followed by the
# GPU ISA to test. These default to 1 and GCN3_X86 is no argument is given.
threads=1
@@ -59,7 +63,7 @@ fi
# Run the gem5 very-long tests.
docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
"${gem5_root}"/tests --memory="${docker_mem_limit}" --rm \
gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest \
gcr.io/gem5-test/ubuntu-22.04_all-dependencies:${tag} \
./main.py run --length very-long -j${threads} -t${threads} -vv
mkdir -p tests/testing-results
@@ -68,7 +72,7 @@ mkdir -p tests/testing-results
# before pulling gem5 resources, make sure it doesn't exist already
docker run --rm --volume "${gem5_root}":"${gem5_root}" -w \
"${gem5_root}" --memory="${docker_mem_limit}" \
gcr.io/gem5-test/gcn-gpu:latest bash -c \
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
@@ -113,7 +117,7 @@ cd "${gem5_root}"
# avoid needing to set all of these, we instead build a docker for it, which
# has all these variables pre-set in its Dockerfile
# To avoid compiling gem5 multiple times, all GPU benchmarks will use this
docker pull gcr.io/gem5-test/gcn-gpu:latest
docker pull gcr.io/gem5-test/gcn-gpu:${tag}
docker build -t hacc-test-weekly ${gem5_root}/gem5-resources/src/gpu/halo-finder
docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \