This is an archive of the discontinued LLVM Phabricator instance.

[lit] Fix shtest-format test on Windows
AbandonedPublic

Authored by modocache on Dec 17 2016, 8:41 PM.

Details

Summary

I'm not sure why, but when external_shell tests run 'cat' on a
non-existent file on my Windows environment, it *passes*. That
causes the shtest-format test to fail.

Running 'tail' on a non-existent file falis on Windows as it should, so
use that instead.

Event Timeline

modocache updated this revision to Diff 81869.Dec 17 2016, 8:41 PM
modocache retitled this revision from to [lit] Fix shtest-format test on Windows.
modocache updated this object.
modocache added a subscriber: llvm-commits.
ddunbar edited edge metadata.Dec 17 2016, 11:19 PM

Why don't we make this use an script we define to test the failure mode, rather than depend on an external tool, to make the test more reliable.

delcypher edited edge metadata.Dec 18 2016, 2:18 AM

Why don't we make this use an script we define to test the failure mode, rather than depend on an external tool, to make the test more reliable.

+1

Given that Python is already a dependency we can write the script in that.

@ddunbar - do you mean something like:

# RUN: python -c "import os, sys; sys.exit (not os.path.isfile(sys.argv[1]))" does-not-exist
rnk accepted this revision.Jul 27 2017, 9:59 AM

Personally, I think if this works, we should do it. Adding more python scripts to do simple things should be more of a last resort.

This revision is now accepted and ready to land.Jul 27 2017, 9:59 AM
modocache abandoned this revision.Nov 21 2019, 8:19 PM

Sorry for the noise bringing up this change, I don't think I'll be pursuing this after all.