diff options
author | Tobias Bosch <tbosch@google.com> | 2019-08-13 09:22:36 -0700 |
---|---|---|
committer | Tobias Bosch <tbosch@google.com> | 2019-08-13 18:42:24 +0000 |
commit | 1b336f8d1c5ddb9a977fd182cc32ddbfec68d1d2 (patch) | |
tree | c757e8fd195e904ad088fcb0292c7a7c4bbfb6a9 /compiler_wrapper/testdata/cros_hardened_golden/clang_path.json | |
parent | caf583bca202cd1c5b3ae75e03073cba105f5e6d (diff) | |
download | toolchain-utils-1b336f8d1c5ddb9a977fd182cc32ddbfec68d1d2.tar.gz |
Add more golden tests for wrapper paths
Especially for:
- calling the wrapper with absolute path
- calling the wrapper in a deep directory
- calling a symlinked wrapper
BUG=chromium:773875
TEST=unit test
Change-Id: Ib01562d6c40d8d2ae0c439081fc04625663dcd07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1752524
Tested-by: Tobias Bosch <tbosch@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/testdata/cros_hardened_golden/clang_path.json')
-rw-r--r-- | compiler_wrapper/testdata/cros_hardened_golden/clang_path.json | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json index d838707a..a2a03b72 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json @@ -361,5 +361,140 @@ "exitcode": 1 } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "/tmp/stable/x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "/usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "a/b/c/d/e/f/g/x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "a/b/usr/bin/clang", + "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-Ba/b/bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "symlinked/x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "a/b/usr/bin/clang", + "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-Ba/b/bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] } ] |