aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/ccache_flag_test.go
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-08 16:02:00 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-08 16:02:00 +0000
commitfb6e2972318a5d63365e66c35c000a6d2e096501 (patch)
tree35fa0fbaeaaddd9cc2a126a05eee3527b51e83a8 /compiler_wrapper/ccache_flag_test.go
parent2186a2d2b9783318bc8226b3eff1fd114f03a8c4 (diff)
parentb75f321fc8978b92ce3db6886ccb966768f0c7a8 (diff)
downloadtoolchain-utils-android12-mainline-tzdata2-release.tar.gz
Change-Id: If223f5dd2285da8941d62bcf5daf8e53ec9908ad
Diffstat (limited to 'compiler_wrapper/ccache_flag_test.go')
-rw-r--r--compiler_wrapper/ccache_flag_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler_wrapper/ccache_flag_test.go b/compiler_wrapper/ccache_flag_test.go
index 03a74de8..61abef06 100644
--- a/compiler_wrapper/ccache_flag_test.go
+++ b/compiler_wrapper/ccache_flag_test.go
@@ -54,6 +54,17 @@ func TestSetCacheDir(t *testing.T) {
})
}
+func TestSetCacheBaseDirToSysroot(t *testing.T) {
+ withCCacheEnabledTestContext(t, func(ctx *testContext) {
+ cmd := ctx.must(callCompiler(ctx, ctx.cfg,
+ ctx.newCommand(gccX86_64, mainCc)))
+ if err := verifyEnvUpdate(cmd,
+ "CCACHE_BASEDIR="+ctx.tempDir+"/usr/x86_64-cros-linux-gnu"); err != nil {
+ t.Error(err)
+ }
+ })
+}
+
func TestSetCacheUmask(t *testing.T) {
withCCacheEnabledTestContext(t, func(ctx *testContext) {
cmd := ctx.must(callCompiler(ctx, ctx.cfg,