[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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user