Author: rnk
Date: Wed Sep 11 13:56:25 2019
New Revision: 371663
URL: http://llvm.org/viewvc/llvm-project?rev=371663&view=rev
Log:
Start porting ivfsoverlay tests to Windows
Part of PR43272, the changes are:
1. Use @ as the sed pattern delimiter instead of : so that the drive
letter in lit substitutions isn't an issue.
2. Use the %/t and %/S substitutions to get paths with forward slashes
to work around string quoting issues in the yaml file.
3. Replace REQUIRES:shell with XFAIL:windows. These tests should pass on
Windows, but do not for reasons that are not yet understood. We would
like to know if they pass unexpectedly.
I was able to remove the XFAILs from two tests, since they already pass
with my sed fix:
clang/test/VFS/module_missing_vfs.m
clang/test/VFS/test_nonmodular.c
Reviewers: amccarth
Differential Revision: https://reviews.llvm.org/D67454
Modified:
cfe/trunk/test/Index/index-module-with-vfs.m
cfe/trunk/test/Modules/crash-vfs-ivfsoverlay.m
cfe/trunk/test/Modules/double-quotes.m
cfe/trunk/test/Modules/framework-public-includes-private.m
cfe/trunk/test/VFS/external-names.c
cfe/trunk/test/VFS/framework-import.m
cfe/trunk/test/VFS/implicit-include.c
cfe/trunk/test/VFS/include-mixed-real-and-virtual.c
cfe/trunk/test/VFS/include-real-from-virtual.c
cfe/trunk/test/VFS/include-virtual-from-real.c
cfe/trunk/test/VFS/include.c
cfe/trunk/test/VFS/incomplete-umbrella.m
cfe/trunk/test/VFS/module-import.m
cfe/trunk/test/VFS/module_missing_vfs.m
cfe/trunk/test/VFS/real-path-found-first.m
cfe/trunk/test/VFS/relative-path.c
cfe/trunk/test/VFS/subframework-symlink.m
cfe/trunk/test/VFS/test_nonmodular.c
cfe/trunk/test/VFS/umbrella-framework-import-skipnonexist.m
cfe/trunk/test/VFS/vfsroot-include.c
cfe/trunk/test/VFS/vfsroot-module.m
cfe/trunk/test/VFS/vfsroot-with-overlay.c
Modified: cfe/trunk/test/Index/index-module-with-vfs.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/index-module-with-vfs.m?rev=371663&r1=371662&r2=371663&view=diff
==
--- cfe/trunk/test/Index/index-module-with-vfs.m (original)
+++ cfe/trunk/test/Index/index-module-with-vfs.m Wed Sep 11 13:56:25 2019
@@ -1,4 +1,6 @@
-// REQUIRES: shell
+// FIXME: PR43272
+// XFAIL: windows
+
@import ModuleNeedsVFS;
void foo() {
@@ -7,11 +9,11 @@ void foo() {
}
// RUN: rm -rf %t.cache
-// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g"
%S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g"
%S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache -fmodules -F
%t -I %t \
// RUN: -ivfsoverlay %t.yaml -Xclang -fdisable-module-hash |
FileCheck %s
-// CHECK: [importedASTFile]: {{.*}}ModuleNeedsVFS.pcm | loc: 2:1 | name:
"ModuleNeedsVFS" | isImplicit: 0
+// CHECK: [importedASTFile]: {{.*}}ModuleNeedsVFS.pcm | loc: 4:1 | name:
"ModuleNeedsVFS" | isImplicit: 0
// CHECK: [indexEntityReference]: kind: function | name: module_needs_vfs
// CHECK: [indexEntityReference]: kind: function | name: base_module_needs_vfs
Modified: cfe/trunk/test/Modules/crash-vfs-ivfsoverlay.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/crash-vfs-ivfsoverlay.m?rev=371663&r1=371662&r2=371663&view=diff
==
--- cfe/trunk/test/Modules/crash-vfs-ivfsoverlay.m (original)
+++ cfe/trunk/test/Modules/crash-vfs-ivfsoverlay.m Wed Sep 11 13:56:25 2019
@@ -1,9 +1,9 @@
-// REQUIRES: crash-recovery, shell, system-darwin
+// REQUIRES: crash-recovery, system-darwin
// RUN: rm -rf %t
// RUN: mkdir -p %t/m
// RUN: cp %S/../VFS/Inputs/actual_module2.map %t/actual_module2.map
-// RUN: sed -e "s:INPUT_DIR:%t:g" -e "s:OUT_DIR:%t/example:g" \
+// RUN: sed -e "s@INPUT_DIR@%/t@g" -e "s@OUT_DIR@%/t/example@g" \
// RUN: %S/../VFS/Inputs/vfsoverlay2.yaml > %t/srcvfs.yaml
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
Modified: cfe/trunk/test/Modules/double-quotes.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/double-quotes.m?rev=371663&r1=371662&r2=371663&view=diff
==
--- cfe/trunk/test/Modules/double-quotes.m (original)
+++ cfe/trunk/test/Modules/double-quotes.m Wed Sep 11 13:56:25 2019
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// FIXME: PR43272
+// XFAIL: windows
// RUN: rm -rf %t
// RUN: mkdir %t
@@ -6,7 +7,7 @@
// RUN: %hmaptool write %S/Inputs/double-quotes/a.hmap.json %t/a.hmap
// RUN: %hmaptool write %S/Inputs/double-quotes/x.hmap.json %t/x.hmap
-// RUN: sed -e "s:TEST_DIR:%S/Inputs/double-quotes:g" \
+// RUN: sed -e "s@TEST_DIR@%/S/Inputs/double-quotes@g" \
// RUN: %S/Inputs/double-quotes/z.yaml > %t/z.yaml
// The output with and without modules should be th