diff options
author | Ryan Beltran <ryanbeltran@chromium.org> | 2021-02-22 23:58:40 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-24 21:38:15 +0000 |
commit | 7c59ee050a4e4935f9ac505f2776d8eea1c4d557 (patch) | |
tree | 6680aadfb4ff06c16d9553f8b1cd25fdb3161b67 /compiler_wrapper/ccache_flag_test.go | |
parent | 2e0f7c655333c4336937f72a6ceca9d9fe1f4ea9 (diff) | |
download | toolchain-utils-7c59ee050a4e4935f9ac505f2776d8eea1c4d557.tar.gz |
compiler_wrapper: disable goma, ccache w/ rusage
Disables Goma and CCahce when rusage monitoring is requested.
This allows for usable metrics to be produced for more packages.
BUG=chromium:1156314
TEST=Modified and ran unit tests
Change-Id: I36415b4df6ce033b23ff8055e900233886e1889d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2713228
Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Denis Nikitin <denik@chromium.org>
Diffstat (limited to 'compiler_wrapper/ccache_flag_test.go')
-rw-r--r-- | compiler_wrapper/ccache_flag_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler_wrapper/ccache_flag_test.go b/compiler_wrapper/ccache_flag_test.go index 03a74de8..2b18c8ca 100644 --- a/compiler_wrapper/ccache_flag_test.go +++ b/compiler_wrapper/ccache_flag_test.go @@ -5,6 +5,7 @@ package main import ( + "path/filepath" "testing" ) @@ -160,3 +161,14 @@ func withCCacheEnabledTestContext(t *testing.T, work func(ctx *testContext)) { work(ctx) }) } + +func TestRusagePreventsCCache(t *testing.T) { + withCCacheEnabledTestContext(t, func(ctx *testContext) { + ctx.env = append(ctx.env, "TOOLCHAIN_RUSAGE_OUTPUT="+filepath.Join(ctx.tempDir, "rusage.log")) + cmd := ctx.must(callCompiler(ctx, ctx.cfg, + ctx.newCommand(gccX86_64, mainCc))) + if err := verifyPath(cmd, gccX86_64+".real"); err != nil { + t.Error(err) + } + }) +} |