tests: Fix compiler-tests.sh build args passing
Reverts this fix: https://gem5-review.googlesource.com/c/public/gem5/+/66631 While this did fix the case where no build args were passed, it broke the case where build args were passed. This fix ensures the script works in both cases. Change-Id: I6cc8cc0c2a10c801d4a59e54b070383ac8ee93ae Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66772 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Bobby Bruce <bbruce@ucdavis.edu> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Jason Lowe-Power
parent
4cae2ae4ad
commit
06f18242fe
@@ -76,7 +76,13 @@ builds_per_compiler=1
|
||||
base_url="gcr.io/gem5-test"
|
||||
|
||||
# Arguments passed into scons on every build target test.
|
||||
build_args="$@"
|
||||
if [ $# -eq 0 ];then
|
||||
# If none is sepcified by the user we pass "-j1" (compile on one thread).
|
||||
# If `build_args` is left as an empty string, this script will fail.
|
||||
build_args="-j1"
|
||||
else
|
||||
build_args="$@"
|
||||
fi
|
||||
|
||||
# Testing directory variables
|
||||
mkdir -p "${build_dir}" # Create the build directory if it doesn't exist.
|
||||
@@ -135,7 +141,7 @@ for compiler in ${images[@]}; do
|
||||
docker run --rm -v "${gem5_root}":"/gem5" -u $UID:$GID \
|
||||
-w /gem5 --memory="${docker_mem_limit}" $repo_name \
|
||||
/usr/bin/env python3 /usr/bin/scons --ignore-style \
|
||||
"${build_out} ${build_args}"
|
||||
"${build_out}" "${build_args}"
|
||||
}>"${build_stdout}" 2>"${build_stderr}"
|
||||
result=$?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user