[lit] Port googletest lit tests to Windows
authorReid Kleckner <rnk@google.com>
Fri, 28 Jul 2017 01:05:55 +0000 (01:05 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 28 Jul 2017 01:05:55 +0000 (01:05 +0000)
commit4ca8d21ef371fc7caacd32fbd6af81dfea3f23c9
tree7b2d8595cb0c0f676a0bfd75422ef30681a74dab
parente70a472bad63666ce16a68947352806d07294015
[lit] Port googletest lit tests to Windows

Summary:
The technique of directly calling subprocess.Popen on a python script
doesn't work on Windows. The executable path of the command must refer
to a valid win32 executable.

Instead, rename all the python scripts masquerading as gtest executables
to have .py extensions, so we can easily detect then and call the python
executable for them. Do this on Linux as well as Windows for
consistency.

The test suite directory names also come out in lower-case on Windows.
We can consider removing that in a later patch. This change just updates
the FileCheck lines to match on Windows.

Fixes PR33933

Reviewers: modocache, mgorny

Subscribers: llvm-commits

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

llvm-svn: 309347
llvm/utils/lit/lit/formats/googletest.py
llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py [moved from llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest with 100% similarity, mode: 0644]
llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py [moved from llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest with 100% similarity, mode: 0644]
llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py [moved from llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest with 100% similarity, mode: 0644]
llvm/utils/lit/tests/googletest-format.py
llvm/utils/lit/tests/googletest-timeout.py
llvm/utils/lit/tests/googletest-upstream-format.py