diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-09-21 22:05:43 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-09-21 22:05:43 +0000 |
commit | 73fde5d5e2d64f4806fef172dbc064a8e5228694 (patch) | |
tree | 3e4cabab5a57ae288c245cff9a1a6ff7926a3207 /compiler_wrapper/iwyu_flag_test.go | |
parent | 40214b48188358a80b7478bfff21d4814dd9177c (diff) | |
parent | 0348d10214299073ea59bda4987dd8813a9e7812 (diff) | |
download | toolchain-utils-73fde5d5e2d64f4806fef172dbc064a8e5228694.tar.gz |
Snap for 10843824 from 0348d10214299073ea59bda4987dd8813a9e7812 to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: Ia39ecafdc4b00a0b2505b638c14b80c02e34d4b6
Diffstat (limited to 'compiler_wrapper/iwyu_flag_test.go')
-rw-r--r-- | compiler_wrapper/iwyu_flag_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler_wrapper/iwyu_flag_test.go b/compiler_wrapper/iwyu_flag_test.go index 76135944..e2db3b48 100644 --- a/compiler_wrapper/iwyu_flag_test.go +++ b/compiler_wrapper/iwyu_flag_test.go @@ -84,7 +84,7 @@ func TestUseIWYUBasedOnFileExtension(t *testing.T) { ctx.cmdCount = 0 ctx.must(callCompiler(ctx, ctx.cfg, ctx.newCommand(clangX86_64, tt.args...))) - if ctx.cmdCount > 1 && !tt.iwyu { + if ctx.cmdCount == 2 && !tt.iwyu { t.Errorf("expected a call to iwyu but got none for args %s", tt.args) } if ctx.cmdCount == 1 && tt.iwyu { @@ -129,7 +129,8 @@ func TestIWYUFiltersIWYUFlags(t *testing.T) { func withIWYUTestContext(t *testing.T, work func(ctx *testContext)) { withTestContext(t, func(ctx *testContext) { - ctx.env = []string{"WITH_IWYU=1"} + artifactDir := t.TempDir() + ctx.env = []string{"WITH_IWYU=1", "CROS_ARTIFACTS_TMP_DIR=" + artifactDir} work(ctx) }) } |