Author: Jan Svoboda
Date: 2025-05-19T12:11:11-07:00
New Revision: 175f8a444b296ba956505a5760805f05a175111b

URL: 
https://github.com/llvm/llvm-project/commit/175f8a444b296ba956505a5760805f05a175111b
DIFF: 
https://github.com/llvm/llvm-project/commit/175f8a444b296ba956505a5760805f05a175111b.diff

LOG: [clang] Attempt to fix 
"test/Modules/fmodules-validate-once-per-build-session.c"

This test started failing after 7a242387: 
https://lab.llvm.org/buildbot/#/builders/154/builds/16276. There seem to be two 
bugs:
* The `-fno-modules-force-validate-user-headers` flag was passed on the wrong 
line.
* Changing source files was being done without an explicit `sleep`, meaning 
there was a possibility of the files maintaining their old modification time 
and not triggering the expected rebuilds.

Added: 
    

Modified: 
    clang/test/Modules/fmodules-validate-once-per-build-session.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Modules/fmodules-validate-once-per-build-session.c 
b/clang/test/Modules/fmodules-validate-once-per-build-session.c
index f873755d4cc9b..d9d79b001e30c 100644
--- a/clang/test/Modules/fmodules-validate-once-per-build-session.c
+++ b/clang/test/Modules/fmodules-validate-once-per-build-session.c
@@ -60,6 +60,7 @@
 
 // ===
 // Change the sources.
+// RUN: sleep 1
 // RUN: echo 'void meow2(void);' > %t/Inputs/foo.h
 // RUN: echo 'module Bar { header "bar.h" export * }' > %t/Inputs/bar.modulemap
 
@@ -95,7 +96,7 @@
 // ===
 // Recompile the module if the today's date is before 01 January 2100.
 // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash 
-fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs 
-fmodules-validate-system-headers -fbuild-session-timestamp=4102441200 
-fmodules-validate-once-per-build-session %s
-// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash 
-fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs 
-fno-modules-force-validate-user-headers -fmodules-validate-system-headers 
-fbuild-session-timestamp=4102441200 -fmodules-validate-once-per-build-session 
%s
+// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash 
-fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs 
-fmodules-validate-system-headers -fbuild-session-timestamp=4102441200 
-fmodules-validate-once-per-build-session %s
 // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash 
-fmodules-cache-path=%t/modules-cache-user-no-force -fsyntax-only -I %t/Inputs 
-fno-modules-force-validate-user-headers -fmodules-validate-system-headers 
-fbuild-session-timestamp=4102441200 -fmodules-validate-once-per-build-session 
%s
 // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
 // RUN: ls -R %t/modules-cache | grep Bar.pcm.timestamp


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to