NAKAMURA Takumi
bac0d769cd
raw_ostream: [PR6745] Tweak formatting (double)%e for Windows hosts.
...
On MSVCRT and compatible, output of %e is incompatible to Posix by default. Number of exponent digits should be at least 2. "%+03d"
FIXME: Implement our formatter in future!
llvm-svn: 127872
2011-03-18 09:30:10 +00:00
NAKAMURA Takumi
920139ca08
lit/ProgressBar.py: [PR7919] Improve line wrap for XN-incapable terminals.
...
On Win32 console, emitting char to col#79 causes linefeed, and the cursor will not return to col#79 upper line with backspace.
llvm-svn: 127696
2011-03-15 21:07:44 +00:00
NAKAMURA Takumi
250c357ce7
utils/lit/lit/TestRunner.py: bash is available with MSYS on Python/W32. Then we can execute "bash tests".
...
llvm-svn: 127074
2011-03-05 09:46:53 +00:00
NAKAMURA Takumi
f86dd9e3ec
On Windows hosts, Python scripts in test/Scripts did not accept binary files from stdin. The environment variable "PYTHONUNBUFFERED" makes stdin as binary. Thanks to Danil Malyshev!
...
llvm-svn: 127072
2011-03-05 09:46:36 +00:00
NAKAMURA Takumi
5850225f52
lit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workaround [PR6745] for mingw's tests. Danil Malyshev suggested this.
...
FIXME: It does not improve MSVC's issue.
[Danil Malyshev] Defining PRINTF_EXPONENT_DIGITS env is the suggested way to make MinGW ANSI/POSIX compatible. This is not only about the case we are discussing, but in general, I'd like to have explicitly defined compatibility mode for all the tests running on MinGW.
llvm-svn: 125725
2011-02-17 05:56:41 +00:00
NAKAMURA Takumi
0117c36184
lit/TestFormats.py: Unittests may be found with suffix .exe also on Cygwin.
...
llvm-svn: 125273
2011-02-10 09:11:57 +00:00
NAKAMURA Takumi
32e9c83870
lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.
...
llvm-svn: 125272
2011-02-10 09:11:48 +00:00
NAKAMURA Takumi
edfec9d04b
lit/LitConfig.py: Add the new method getToolsPath(dir,paths,tools).
...
It seeks tools(eg. [cmp, grep, sed]) in same directory, to be sane.
It seeks "bash" only in the directory found at last time. Or bash would be insane (against other tools).
llvm-svn: 125175
2011-02-09 04:19:15 +00:00
NAKAMURA Takumi
b5c0b4667e
lit/Util.py: Add two functions, checkToolsPath(dir,tools) and whichTools(tools,paths).
...
checkToolsPath(dir,tools):
return True if "dir" contains all "tools".
whichTools(tools,paths):
return a directory that contains all "tools" in "paths".
Or return None when all "tools" were not met.
llvm-svn: 125174
2011-02-09 04:19:06 +00:00
Francois Pichet
7c9eab8fef
On Windows, replace each occurrence of '\' by '\\' on the replacement string. This is necessary to prevent re.sub from replacing escape sequences occurring in path.
...
For example:
llvm\tools\clang\test
was replaced by
llvm <tab> ools\clang <tab> est
llvm-svn: 123070
2011-01-08 18:09:48 +00:00
Francois Pichet
984b3c3c2f
Disable r122754 on Windows: was causing all lit tests to fail.
...
llvm-svn: 122808
2011-01-04 10:23:42 +00:00
David Greene
dc276c315c
Reapply 122341 to fix PR8199 now that clang changes are in.
...
llvm-svn: 122754
2011-01-03 17:30:25 +00:00
David Greene
be57ab185f
Revert 122341. It breaks some darwin tests.
...
llvm-svn: 122346
2010-12-21 17:25:43 +00:00
David Greene
a93adab324
Fix PR 8199. This patch prepends the build tool dir to LLVM programs
...
being tested. This ensures that we test the tools just built and not
some random tools that might happen to be in the user's PATH. This
makes LLVM testing much more stable and predictable.
llvm-svn: 122341
2010-12-21 16:55:53 +00:00
NAKAMURA Takumi
182ea825a9
utils/lit/lit/TestFormats.py: [PR8438] unittests: Seek *Tests (not BUILD_MODE/*Tests) under whole unittests/ if BUILD_MODE == '.'
...
llvm-svn: 121118
2010-12-07 07:41:32 +00:00
NAKAMURA Takumi
1801996111
lit.GoogleTest: On case-insensitive filesystem, matching should be case-insensitive when directory name is checked with test_sub_dir.
...
On MSVS8, ${CMAKE_CFG_INTDIR}, aka $(OutDir), has capitalized name(eg. Debug), although $(OutDir) is made with lower case(eg. debug).
llvm-svn: 119781
2010-11-19 03:19:26 +00:00
Daniel Dunbar
a9dd1998cc
lit: Fix a subtle resource usage bug when executing tests using the internal
...
shell runner.
We would inadvertently end up holding on to handles to the temporary files
longer than we should have been. On Win32, where open handles lock some file
operations, this caused problems in tests which would try to move temporary
files around (as Clang does by default now).
Many thanks to Francois Pichet for the excellent detective work on this.
llvm-svn: 115040
2010-09-29 15:59:37 +00:00
Michael J. Spencer
5d28c8428f
Test unittests built with CMake.
...
llvm-svn: 114726
2010-09-24 09:01:22 +00:00
Michael J. Spencer
1444f47deb
Fix whitespace.
...
llvm-svn: 114724
2010-09-24 09:00:56 +00:00
Daniel Dunbar
c4f3990f01
lit: Bump version to 0.2.0dev, for no apparent reason.
...
llvm-svn: 114262
2010-09-18 02:28:15 +00:00
Daniel Dunbar
196024ce1b
lit: Tweak setup.py.
...
llvm-svn: 114261
2010-09-18 02:28:12 +00:00
Daniel Dunbar
07cc4f6b33
lit: These TODOs are done(ish).
...
llvm-svn: 114260
2010-09-18 02:28:09 +00:00
Duncan Sands
922563cc6d
Some of the tests build an executable with llvm-gcc. For this to work, llvm-gcc
...
needs to find some libraries, which may require searching the directories given
by LIBRARY_PATH on curiously configured systems. So pass on LIBRARY_PATH.
llvm-svn: 114186
2010-09-17 17:05:27 +00:00
Daniel Dunbar
3b2ad1d045
lit: Expose FileBasedTest object and Test module via 'lit' object that gets
...
exposed to config files.
llvm-svn: 113923
2010-09-15 03:52:38 +00:00
Daniel Dunbar
2c11b449e0
lit: Rename main lit module to main.py, lit/lit/lit.py was a bit too, err,
...
alliterate.
llvm-svn: 113922
2010-09-15 03:52:31 +00:00
Daniel Dunbar
27b91a7410
lit/GoogleTest: Add .exe to the suffix when looking for tests.
...
llvm-svn: 111487
2010-08-19 00:22:45 +00:00
Dan Gohman
ac6a3c4c66
Expand uses of python 2.6's "A if B else C" syntax into regular
...
if-else statements, to hopefully support older pythons (PR7850).
llvm-svn: 110638
2010-08-10 01:03:34 +00:00
Dan Gohman
988bfce174
Print a message when a test failure is due to stderr output
...
alone, rather than just an exit code.
llvm-svn: 110208
2010-08-04 16:42:38 +00:00
Dan Gohman
4f9c40c521
Change the logic which interprets output on stderr as an error so that
...
it doesn't modify the exit code or the stdout contents, and so that it
doesn't clutter the output with "Command has output on stderr!".
llvm-svn: 110171
2010-08-04 00:12:31 +00:00
Dan Gohman
794172ca9c
Don't print "Command output (stdout):" when the command has no output,
...
and same for stderr, to avoid clutter in the output.
llvm-svn: 110169
2010-08-04 00:05:16 +00:00
Dan Gohman
c70c6b144a
Use the regular conditional operator syntax instead of a clever hack.
...
llvm-svn: 110168
2010-08-04 00:00:13 +00:00
Daniel Dunbar
38a867aca6
lit: Allow clients to define predefined parameters.
...
llvm-svn: 109999
2010-08-02 00:39:38 +00:00
Daniel Dunbar
29dc45b650
lit: Add some example tests for previous commit.
...
llvm-svn: 109071
2010-07-22 00:40:19 +00:00
Daniel Dunbar
cfa3896d98
lit: Add support for 'REQUIRES: feature-one, feature-two, ...' in the
...
integrated-test formats (sh and tcl style). The particular features which get
recognized are up to the test suite itself to define.
llvm-svn: 109062
2010-07-21 23:39:57 +00:00
Daniel Dunbar
0892ee503a
lit: Replace /dev/null in scripts with temporary files on Windows.
...
llvm-svn: 105888
2010-06-12 16:00:10 +00:00
Daniel Dunbar
c85504540e
lit: Add a forgotten default argument.
...
llvm-svn: 105858
2010-06-11 23:47:36 +00:00
Daniel Dunbar
43c2cb63ae
lit: When running Tcl style tests on Windows, substitute slashes to avoid Tcl
...
quoting problems. Not particularly ideal, but should work ok. Based on a patch by
Michael Spencer!
llvm-svn: 105855
2010-06-11 23:27:45 +00:00
Daniel Dunbar
04c4a399aa
lit: Add another place to look for bash.
...
llvm-svn: 104189
2010-05-19 23:56:09 +00:00
Daniel Dunbar
12a78f502a
lit: Fix a sh lexing bug which caused annotate-token.m to fail when run with the
...
internal shell parser; we weren't lexing the quotes in a command like::
clang -DFOO='hello'
correctly.
llvm-svn: 103652
2010-05-12 21:47:58 +00:00
Daniel Dunbar
cf925cb272
lit: Fix OneCommandPerFileTest format when tests are specified directly.
...
llvm-svn: 103626
2010-05-12 17:56:44 +00:00
Daniel Dunbar
6b3b0a405e
lit: Add support for 'lit ... @foo', which reads a list of tests to run from
...
foo.
llvm-svn: 103625
2010-05-12 17:56:42 +00:00
Daniel Dunbar
d6e76fb20c
lit: Allow test_format to be None.
...
llvm-svn: 103091
2010-05-05 17:22:35 +00:00
Daniel Dunbar
c1ba0c96e3
lit: Add support to OneCommandPerFileTest format to take input directory from input path.
...
llvm-svn: 100846
2010-04-09 02:15:10 +00:00
Chris Lattner
5109d3e55d
add newlines at end of files.
...
llvm-svn: 100706
2010-04-07 22:54:55 +00:00
Daniel Dunbar
3f183ae5cb
Add a FIXME.
...
llvm-svn: 100034
2010-03-31 19:14:05 +00:00
Daniel Dunbar
6e0dbca6c4
lit: Make sure to close any files we open as part of redirection.
...
PR6753.
llvm-svn: 100032
2010-03-31 18:48:43 +00:00
Daniel Dunbar
e810155805
lit: Add LitTestCase and lit.load_test_suite, for adapting lit based suites for
...
use with Python's unittest.
llvm-svn: 99498
2010-03-25 07:10:01 +00:00
Jeffrey Yasskin
544cfd76e7
When we don't pass --vg-leak to lit, pass --leak-check=no to valgrind.
...
llvm-svn: 99112
2010-03-21 01:47:33 +00:00
Jeffrey Yasskin
2f87b54f1a
Add support for XFAILing valgrind runs with memory leak checking independently
...
of runs without leak checking. We add -vg to the triple for non-checked runs,
or -vg_leak for checked runs. Also use this to XFAIL the TableGen tests, since
tablegen leaks like a sieve. This includes some valgrindArgs refactoring.
llvm-svn: 99103
2010-03-20 23:08:45 +00:00
Ben Holt
b7d3d99181
Test commit (removed extra blank line)
...
llvm-svn: 98988
2010-03-19 21:12:29 +00:00