[clang] 68592fa - [ClangScanDeps][test] Avoid writing to readonly dirs (#179733)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 4 11:53:51 PST 2026
Author: Jordan Rupprecht
Date: 2026-02-04T13:53:45-06:00
New Revision: 68592fa7ee61f2bd5c648105203f002b5f6067e9
URL: https://github.com/llvm/llvm-project/commit/68592fa7ee61f2bd5c648105203f002b5f6067e9
DIFF: https://github.com/llvm/llvm-project/commit/68592fa7ee61f2bd5c648105203f002b5f6067e9.diff
LOG: [ClangScanDeps][test] Avoid writing to readonly dirs (#179733)
Writing files to the current dir fails when tests are run in an
environment w/ a readonly build tree. The normal fix is to write to an
explicitly writeable dir (i.e. `-o %t/info.json`), but since we don't
actually do anything w/ info.json, just write to `/dev/null` instead.
Added:
Modified:
clang/test/ClangScanDeps/prune-scanning-modules.m
Removed:
################################################################################
diff --git a/clang/test/ClangScanDeps/prune-scanning-modules.m b/clang/test/ClangScanDeps/prune-scanning-modules.m
index 8ceac9fd0ae38..0afcbd1313d65 100644
--- a/clang/test/ClangScanDeps/prune-scanning-modules.m
+++ b/clang/test/ClangScanDeps/prune-scanning-modules.m
@@ -8,14 +8,14 @@
// Check no pruning happens because pcms are new enough.
// RUN: touch -m -a -t 201101010000 %t/modules.timestamp
-// RUN: clang-scan-deps -j 1 -format experimental-full -o info.json -- %clang -fmodules -F %t/Frameworks \
+// RUN: clang-scan-deps -j 1 -format experimental-full -o /dev/null -- %clang -fmodules -F %t/Frameworks \
// RUN: -fmodules-cache-path=%t/cache %t/prune.m -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600
// RUN: ls -R %t | grep ^Module.*pcm
// RUN: ls -R %t | grep DependsOnModule.*pcm
// Check no pruning happens because modules.timestamp is new enough.
// RUN: find %t/cache -name DependsOnModule*.pcm | sed -e 's/\\/\//g' | xargs touch -a -t 201101010000
-// RUN: clang-scan-deps -j 1 -format experimental-full -o info.json -- %clang -fmodules -F %t/Frameworks \
+// RUN: clang-scan-deps -j 1 -format experimental-full -o /dev/null -- %clang -fmodules -F %t/Frameworks \
// RUN: -fmodules-cache-path=%t/cache %t/prune.m -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600
// RUN: ls -R %t/cache | grep ^Module.*pcm
// RUN: ls -R %t/cache | grep DependsOnModule.*pcm
@@ -24,7 +24,7 @@
// RUN: touch -m -a -t 201101010000 %t/cache/modules.timestamp
// RUN: find %t/cache -name DependsOnModule*.pcm | sed -e 's/\\/\//g' | xargs touch -a -t 201101010000
// RUN: find %t/cache -name Module*.pcm | sed -e 's/\\/\//g' | xargs touch -a -t 201101010000
-// RUN: clang-scan-deps -j 1 -format experimental-full -o info.json -- %clang -fmodules -F %t/Frameworks -DSKIP_MODULE \
+// RUN: clang-scan-deps -j 1 -format experimental-full -o /dev/null -- %clang -fmodules -F %t/Frameworks -DSKIP_MODULE \
// RUN: -fmodules-cache-path=%t/cache %t/prune.m -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600
// RUN: ls -R %t/cache | not grep ^Module.*pcm
// RUN: ls -R %t/cache | not grep DependsOnModule.*pcm
More information about the cfe-commits
mailing list