https://bugs.llvm.org/show_bug.cgi?id=43272
Bug ID: 43272
Summary: No tests for -ivfsoverlay run on Windows
Product: clang
Version: 8.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: r...@google.com
CC: bigchees...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk,
sammcc...@google.com
The largest source of REQUIRES:shell tests in clang/test seems to come from
tests for -ivfsoverlay. Nobody seems to have taken the time to get these tests
to pass on Windows, so they are marked as REQUIRES:shell. However, they do not
need bash, these tests would pass on Linux with lit's internal shell, so we
should replace that with UNSUPPORTED:system-windows first.
Second, these tests don't port to Windows due to these sed commands:
// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" -e
"s:EXTERNAL_NAMES:true:" %S/Inputs/use-external-names.yaml > %t.external.yaml
// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" -e
"s:EXTERNAL_NAMES:false:" %S/Inputs/use-external-names.yaml > %t.yaml
This is very easily fixed by avoiding colons and using `%/t` to work around the
string escaping issues:
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" -e
"s@EXTERNAL_NAMES@true@" %S/Inputs/use-external-names.yaml > %t.external.yaml
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" -e
"s@EXTERNAL_NAMES@false@" %S/Inputs/use-external-names.yaml > %t.yaml
At this point, I'm stuck, because the tests still don't pass. The yaml files
look like this now:
{
'version': 0,
'use-external-names': true,
'roots': [{ 'type': 'file', 'name':
'C:/src/llvm-project/build/tools/clang/test/VFS/Output/external-names.c.tmp/external-names.h',
'external-contents':
'C:/src/llvm-project/clang/test/VFS/Inputs/external-names.h'
}]
}
If I use "native" paths for 'name' instead, then the test passes. Now it looks
like this:
'name':
'C:\\src\\llvm-project\\build\\tools\\clang\\test\\VFS\\Output\\external-names.c.tmp\\external-names.h',
I can find a place in the code to insert llvm::sys::path::native, but I'm
wondering if this hides a deeper issue, so I figured I'd file a bug for it.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs