Jason Lowe-Power has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/66772?usp=email )
Change subject: tests: Fix compiler-tests.sh build args passing
......................................................................
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 <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M tests/compiler-tests.sh
1 file changed, 31 insertions(+), 2 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
Bobby Bruce: Looks good to me, approved
Jason Lowe-Power: Looks good to me, approved
kokoro: Regressions pass
diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index f16e8e5..f5d4bb1 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -76,7 +76,13 @@
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 @@
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=$?
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/66772?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6cc8cc0c2a10c801d4a59e54b070383ac8ee93ae
Gerrit-Change-Number: 66772
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org