r277576 - [clang/test] Fix a flaky unittest on windows

Etienne Bergeron via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 23:10:15 PDT 2016


Author: etienneb
Date: Wed Aug  3 01:10:15 2016
New Revision: 277576

URL: http://llvm.org/viewvc/llvm-project?rev=277576&view=rev
Log:
[clang/test] Fix a flaky unittest on windows

Summary:
The append operator on a shell command for quick command-line is
causing trouble on windows. [NFC]
The easiest way to fix them is to avoid using them.

This patch is an attempt to fix this broken build bot:
  clang-x86-win2008-selfhost

http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9523

Reviewers: rnk

Subscribers: cfe-commits, chrisha

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

Modified:
    cfe/trunk/test/Modules/no-stale-modtime.m

Modified: cfe/trunk/test/Modules/no-stale-modtime.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/no-stale-modtime.m?rev=277576&r1=277575&r2=277576&view=diff
==============================================================================
--- cfe/trunk/test/Modules/no-stale-modtime.m (original)
+++ cfe/trunk/test/Modules/no-stale-modtime.m Wed Aug  3 01:10:15 2016
@@ -7,9 +7,13 @@
 // RUN: echo '@import l; @import r;' > %t/b.h
 // RUN: echo '@import t; // fromt l' > %t/l.h
 // RUN: echo '@import t; // fromt r' > %t/r.h
-// RUN: echo '// top' > %t/t.h
-// RUN: echo 'module b { header "b.h" } module l { header "l.h" }' > %t/module.map
-// RUN: echo 'module r { header "r.h" } module t { header "t.h" }' >> %t/module.map
+
+// RUN: echo '// top' > %t/t.h-1
+// RUN: cat %t/t.h-1 > %t/t.h
+
+// RUN: echo 'module b { header "b.h" } module l { header "l.h" }' > %t/module.map-1
+// RUN: echo 'module r { header "r.h" } module t { header "t.h" }' > %t/module.map-2
+// RUN: cat %t/module.map-1 %t/module.map-2 > %t/module.map
 
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \
 // RUN:     -I %t -fsyntax-only %s -Rmodule-build 2>&1 \
@@ -18,7 +22,9 @@
 // RUN:     -I %t -fsyntax-only %s -Rmodule-build -verify
 
 // Add an identifier to ensure everything depending on t is out of date
-// RUN: echo 'extern int a;' >> %t/t.h
+// RUN: echo 'extern int a;' > %t/t.h-2
+// RUN: cat %t/t.h-1 %t/t.h-2 > %t/t.h
+
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \
 // RUN:     -I %t -fsyntax-only %s -Rmodule-build 2>&1 \
 // RUN: | FileCheck -check-prefix=REBUILD-ALL %s




More information about the cfe-commits mailing list