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_noccache_golden | |
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_noccache_golden')
-rw-r--r-- | compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json | 114 | ||||
-rw-r--r-- | compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json | 93 |
2 files changed, 207 insertions, 0 deletions
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json index 78169313..ce07459e 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json @@ -319,5 +319,119 @@ "exitcode": 1 } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "/tmp/stable/x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/clang", + "args": [ + "--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" + ] + } + } + ] + }, + { + "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": "a/b/usr/bin/clang", + "args": [ + "--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" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "symlinked/x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "a/b/usr/bin/clang", + "args": [ + "--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" + ] + } + } + ] } ] diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json index 59cbf865..66957f5b 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json @@ -66,5 +66,98 @@ "exitcode": 1 } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "/tmp/stable/x86_64-cros-linux-gnu-gcc", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/tmp/stable/x86_64-cros-linux-gnu-gcc.real", + "args": [ + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-fno-reorder-blocks-and-partition", + "-Wno-unused-local-typedefs", + "-Wno-maybe-uninitialized", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-mno-movbe" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc.real", + "args": [ + "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", + "-fno-reorder-blocks-and-partition", + "-Wno-unused-local-typedefs", + "-Wno-maybe-uninitialized", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-mno-movbe" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "symlinked/x86_64-cros-linux-gnu-gcc", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "symlinked/x86_64-cros-linux-gnu-gcc.real", + "args": [ + "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", + "-fno-reorder-blocks-and-partition", + "-Wno-unused-local-typedefs", + "-Wno-maybe-uninitialized", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-mno-movbe" + ] + } + } + ] } ] |