[clang] 6030a07 - Fix hidden-redecls.m test for some environments

Konstantin Schwarz via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 00:51:23 PDT 2020


Author: Konstantin Schwarz
Date: 2020-10-16T09:51:13+02:00
New Revision: 6030a075164c7016b29a67680ed5c9e7c5932109

URL: https://github.com/llvm/llvm-project/commit/6030a075164c7016b29a67680ed5c9e7c5932109
DIFF: https://github.com/llvm/llvm-project/commit/6030a075164c7016b29a67680ed5c9e7c5932109.diff

LOG: Fix hidden-redecls.m test for some environments

This test was failing in our CI environment, because Jenkins mounts the workspaces into Docker containers using their full path, i.e. /home/jenkins/workspaces/llvm-build.
We've seen permission denied errors because /home/jenkins is mounted with root permissions and the default cache directory under Linux is $HOME/.cache.

The fix is to explicitly provide the -fmodules-cache-path, which the other tests already seem to provide.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D89453

Added: 
    

Modified: 
    clang/test/Index/hidden-redecls.m

Removed: 
    


################################################################################
diff  --git a/clang/test/Index/hidden-redecls.m b/clang/test/Index/hidden-redecls.m
index 1735c0b5e184..ba34e69db85e 100644
--- a/clang/test/Index/hidden-redecls.m
+++ b/clang/test/Index/hidden-redecls.m
@@ -7,6 +7,7 @@ - (void)top_method;
 // p1_method in protocol P1 is hidden since module_redecls.sub hasn't been
 // imported yet. Check it is still indexed.
 
-// RUN: c-index-test -index-file-full %s -isystem %S/Inputs -fmodules -target x86_64-apple-macosx10.7 | FileCheck %s
+// RUN: rm -rf %t
+// RUN: c-index-test -index-file-full %s -isystem %S/Inputs -fmodules -fmodules-cache-path=%t -target x86_64-apple-macosx10.7 | FileCheck %s
 // CHECK: [indexDeclaration]: kind: objc-instance-method | name: p1_method | {{.*}} | loc: {{.*}}hidden-redecls-sub.h:2:9 | {{.*}} | isRedecl: 0
 // CHECK: [indexDeclaration]: kind: objc-instance-method | name: p1_method | {{.*}} | loc: {{.*}}hidden-redecls-sub.h:3:9 | {{.*}} | isRedecl: 1


        


More information about the cfe-commits mailing list