<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - No tests for -ivfsoverlay run on Windows"
   href="https://bugs.llvm.org/show_bug.cgi?id=43272">43272</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>No tests for -ivfsoverlay run on Windows
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bigcheesegs@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk, sammccall@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>