From 2ed43238994e3fcb938c238f1b132385abfb4d7e Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Mon, 12 Dec 2022 13:52:22 -0800 Subject: [PATCH] tests: Fix compiler-tests.sh for no build args passed case When a user ran "tests/compiler-tests.sh" without passing any arguments, the compiler tests would fail with: ``` scons: Reading SConscript files ... Error: No existing build directory and no variant for /gem5 ``` However, when passed with arguments, such as: ``` ./tests/compiler-tests.sh -j6 ``` the tests passed. The fix for this is to merge the "$build_out" and "$build_args" into a single string when executing the docker. I do not know exactly why this works, but it does fix the error. Change-Id: Ibcd316668b60fb7706f0ee05ab6dadf56228319d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66631 Maintainer: Jason Lowe-Power Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- tests/compiler-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh index e01d9de347..f16e8e5fdb 100755 --- a/tests/compiler-tests.sh +++ b/tests/compiler-tests.sh @@ -135,7 +135,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=$?