This is an archive of the discontinued LLVM Phabricator instance.

[lit] Fix shtest-shell tests on Windows
AbandonedPublic

Authored by modocache on Dec 13 2016, 9:38 PM.

Details

Summary

Tests in shtest-shell include RUN statements that attempt to
execute .sh shellscript files directly. On Windows, these would fail
with:

Could not create process (C:\path\to\llvm\utils\lit\tests\Inputs\shtest-shell/write-to-stderr.sh)
due to [Error 193] %1 is not a valid Win32 application

Instead of shellscripts, use Python scripts, and execute them with
the Python executable being used to run lit in the first place. This
succeeds on all environments.

Event Timeline

modocache updated this revision to Diff 81346.Dec 13 2016, 9:38 PM
modocache retitled this revision from to [lit] Fix shtest-shell tests on Windows.
modocache updated this object.
modocache added a subscriber: llvm-commits.
modocache abandoned this revision.Jul 27 2017, 7:50 AM
modocache added a subscriber: rnk.

The equivalent of this change was committed by @rnk in rL309200. I slightly prefer this change because the version of Python that is currently running is used to execute the shell tests, whereas rL309200 may use Python 3 to run the tests, but shell out to Python 2.

utils/lit/tests/Inputs/shtest-shell/write-to-stderr.sh