[llvm-bugs] [Bug 43272] New: No tests for -ivfsoverlay run on Windows

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 10 16:19:11 PDT 2019


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: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: bigcheesegs at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk,
                    sammccall at 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 at INPUT_DIR@%/S/Inputs at g" -e "s at OUT_DIR@%/t at g" -e
"s at EXTERNAL_NAMES@true@" %S/Inputs/use-external-names.yaml > %t.external.yaml
// RUN: sed -e "s at INPUT_DIR@%/S/Inputs at g" -e "s at OUT_DIR@%/t at g" -e
"s at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190910/6b17fdde/attachment.html>


More information about the llvm-bugs mailing list