From 6e91a98f6ba02857e381c0f199c1494c6f1d7839 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Wed, 9 Jan 2019 17:36:38 -0800 Subject: Avoid $(location) in syscall tests. Instead just find the syscall_test_runner binary in the shell script. PiperOrigin-RevId: 228621230 Change-Id: I274ee0874e47d53f59474b1ac730ee45e3dff977 --- test/syscalls/build_defs.bzl | 4 +--- test/syscalls/syscall_test_runner.sh | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/syscalls/build_defs.bzl b/test/syscalls/build_defs.bzl index f0c914095..d6c2a1290 100644 --- a/test/syscalls/build_defs.bzl +++ b/test/syscalls/build_defs.bzl @@ -34,9 +34,7 @@ def _syscall_test(test, shard_count, size, platform): test, ], args = [ - # First argument is location to syscall_test_runner go binary. - "$(location :syscall_test_runner)", - # Rest of arguments are passed directly to syscall_test_runner binary. + # Arguments are passed directly to syscall_test_runner binary. "--test-name=" + test_name, "--platform=" + platform, "--debug=false", diff --git a/test/syscalls/syscall_test_runner.sh b/test/syscalls/syscall_test_runner.sh index de479f68c..4f3790137 100755 --- a/test/syscalls/syscall_test_runner.sh +++ b/test/syscalls/syscall_test_runner.sh @@ -20,6 +20,8 @@ set -euf -o pipefail -# The syscall test runner binary and arguments have all been passed as arguments -# to this shell script. -exec "$@" +# Get location of syscall_test_runner binary. +readonly runner=$(find ${TEST_SRCDIR} -name syscall_test_runner) + +# Pass the arguments of this script directly to the runner. +exec "${runner}" "$@" -- cgit v1.2.3