diff options
author | Tobias Bosch <tbosch@google.com> | 2019-10-28 14:26:51 -0700 |
---|---|---|
committer | Tobias Bosch <tbosch@google.com> | 2019-11-01 00:05:45 +0000 |
commit | 8dd67e1063927b99ee18caa11ccee9abc1c0cbd1 (patch) | |
tree | c4a14c61db6294de2b58ab1b7b09d28c656fc047 /compiler_wrapper/print_config_flag_test.go | |
parent | b922860193acc4c2f5c9ae28e29f0f33deffcd1b (diff) | |
download | toolchain-utils-8dd67e1063927b99ee18caa11ccee9abc1c0cbd1.tar.gz |
toolchain_utils: Remove comparison to old wrapper from compiler_wrapper.
BUG=chromium:773875
TEST='go test' passes
Change-Id: Iecbe15067bf37fd86fbb8a907d42df32288821d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1884701
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Tobias Bosch <tbosch@google.com>
Diffstat (limited to 'compiler_wrapper/print_config_flag_test.go')
-rw-r--r-- | compiler_wrapper/print_config_flag_test.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/compiler_wrapper/print_config_flag_test.go b/compiler_wrapper/print_config_flag_test.go index 1b1528e8..63451edb 100644 --- a/compiler_wrapper/print_config_flag_test.go +++ b/compiler_wrapper/print_config_flag_test.go @@ -10,7 +10,7 @@ import ( ) func TestRemovePrintConfigArg(t *testing.T) { - withPrintConfigTestContext(t, func(ctx *testContext) { + withTestContext(t, func(ctx *testContext) { cmd := ctx.must(callCompiler(ctx, ctx.cfg, ctx.newCommand(gccX86_64, "-print-config", mainCc))) if err := verifyArgCount(cmd, 0, "-print-config"); err != nil { t.Error(err) @@ -19,18 +19,10 @@ func TestRemovePrintConfigArg(t *testing.T) { } func TestPrintConfig(t *testing.T) { - withPrintConfigTestContext(t, func(ctx *testContext) { + withTestContext(t, func(ctx *testContext) { ctx.must(callCompiler(ctx, ctx.cfg, ctx.newCommand(gccX86_64, "-print-config", mainCc))) if !strings.Contains(ctx.stderrString(), "wrapper config: main.config{") { t.Errorf("config not printed to stderr. Got: %s", ctx.stderrString()) } }) } - -func withPrintConfigTestContext(t *testing.T, work func(ctx *testContext)) { - withTestContext(t, func(ctx *testContext) { - // Not comparing to old wrapper as the old wrapper doesn't have a print-config command. - ctx.cfg.oldWrapperPath = "" - work(ctx) - }) -} |