utils,tests: Enable passing of build args to compiler-tests.sh
authorBobby R. Bruce <bbruce@ucdavis.edu>
Thu, 23 Jul 2020 16:29:51 +0000 (09:29 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Wed, 5 Aug 2020 17:53:55 +0000 (17:53 +0000)
Previously we passed "-j `nproc`" to the scons. This a greedy approach
that should not be default. This change was introduced so the "-j" flag
may be passed via the "util/compiler-tests.sh" script.

Change-Id: I2e891ae3a9819770bd3ef15b95b81b7f5b71f7fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31734
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/compiler-tests.sh

index c586c273e226f341472cf706f89a82938000f3df..c8fce4b29111f8774e844bf1df078b72a07a8cab 100755 (executable)
@@ -8,7 +8,6 @@
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 gem5_root="${dir}/.."
 build_dir="${gem5_root}/build"
-num_cores=`nproc`
 
 # All Docker images in the gem5 testing GCR which we want to compile with.
 images=("gcc-version-10"
@@ -61,7 +60,7 @@ builds_per_compiler=1
 base_url="gcr.io/gem5-test"
 
 # Arguments passed into scons on every build target test.
-build_args="-j ${num_cores}"
+build_args="$@"
 
 # Testing directory variables
 mkdir -p "${build_dir}" # Create the build directory if it doesn't exist.