Skip to content

Commit 175f8a4

Browse files
committed
[clang] Attempt to fix "test/Modules/fmodules-validate-once-per-build-session.c"
This test started failing after 7a24238: 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.
1 parent 811b809 commit 175f8a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060

6161
// ===
6262
// Change the sources.
63+
// RUN: sleep 1
6364
// RUN: echo 'void meow2(void);' > %t/Inputs/foo.h
6465
// RUN: echo 'module Bar { header "bar.h" export * }' > %t/Inputs/bar.modulemap
6566

@@ -95,7 +96,7 @@
9596
// ===
9697
// Recompile the module if the today's date is before 01 January 2100.
9798
// 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
98-
// 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
99+
// 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
99100
// 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
100101
// RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
101102
// RUN: ls -R %t/modules-cache | grep Bar.pcm.timestamp

0 commit comments

Comments
 (0)