Daniel Dunbar
6dac00702c
[lit] Remove old ExamplesTests directory.
...
- The actual tests have better coverage than those, and they weren't useful
anymore.
llvm-svn: 188110
2013-08-09 21:39:36 +00:00
Daniel Dunbar
ab320a673f
[lit] Move ManyTests examples to lit/examples/many-tests.
...
llvm-svn: 188109
2013-08-09 21:39:28 +00:00
Daniel Dunbar
c38c6f068b
[lit] Drop deprecated aliases for lit and old module names.
...
llvm-svn: 188108
2013-08-09 21:39:24 +00:00
Daniel Dunbar
72868c74f3
[lit] Update lit's own tests to use lit_config and lit package, as appropriate.
...
llvm-svn: 188107
2013-08-09 21:39:17 +00:00
Daniel Dunbar
2fc495370a
[lit] Fix typo.
...
- Noticed by edward-san (IRC).
llvm-svn: 188096
2013-08-09 19:39:42 +00:00
Daniel Dunbar
6465325e42
[lit] Rename lit.{TestFormats,Util} to their aliased names {formats,util}.
...
- With compatibility hack in lit.__init__, so this hopefully shouldn't break
anything.
llvm-svn: 188040
2013-08-09 00:37:15 +00:00
Daniel Dunbar
f511d30d8b
[lit] Inject the lit specific config object as 'lit_config' when loading config files.
...
- Injecting it as 'lit' is gross, since that name should be used to refer to
the actual package. For now both are available so it is possibly to cleanup
test config files incrementally.
llvm-svn: 188039
2013-08-09 00:37:05 +00:00
Daniel Dunbar
e97b673cf5
[lit] Split TestingConfig.frompath() into separate ctor and load methods.
...
llvm-svn: 188038
2013-08-09 00:36:58 +00:00
Daniel Dunbar
6928bb62ba
[lit] Eliminate mustExist parameter from TestingConfig.frompath().
...
llvm-svn: 188034
2013-08-09 00:09:02 +00:00
Daniel Dunbar
b963b0b51a
[lit] Only create config copies when a local config file is present.
...
llvm-svn: 188033
2013-08-09 00:08:56 +00:00
Daniel Dunbar
5d8ab529c2
[lit] Eliminate parent argument from TestingConfig.frompath(), which is effectively unused.
...
llvm-svn: 188032
2013-08-09 00:08:46 +00:00
Daniel Dunbar
c4477dfd92
[lit] Change --show-{tests,suites} to exit after printing.
...
- This is a more sensible behavior than printing and also running tests.
llvm-svn: 188009
2013-08-08 20:59:25 +00:00
Daniel Dunbar
b647d5d21d
[lit] Remove --repeat option, which wasn't that useful.
...
llvm-svn: 188008
2013-08-08 20:59:20 +00:00
Daniel Dunbar
e7b9e5fcd0
[lit] Eliminate some nested imports.
...
llvm-svn: 188007
2013-08-08 20:59:16 +00:00
Daniel Dunbar
2d100cda0c
[lit] Remove on_clone member, which is no longer used.
...
llvm-svn: 188006
2013-08-08 20:59:13 +00:00
Daniel Dunbar
e80b42a838
[lit] Remove unnecessary list copy.
...
llvm-svn: 187934
2013-08-07 23:10:20 +00:00
Daniel Dunbar
403eeea0cf
[lit] Always list individual UNRESOLVED tests.
...
llvm-svn: 187933
2013-08-07 23:10:05 +00:00
Daniel Dunbar
9ee3bb89c9
[lit] Explicitly convert dict items() result to a list.
...
llvm-svn: 187932
2013-08-07 23:10:01 +00:00
Daniel Dunbar
6468a5ccab
[lit] Make string encoding issues explicit.
...
llvm-svn: 187931
2013-08-07 23:09:55 +00:00
Daniel Dunbar
16606887c4
[lit] Report the traceback when config import fails.
...
llvm-svn: 187920
2013-08-07 21:43:34 +00:00
Daniel Dunbar
df1ed9b886
[lit] Avoid comparisons with None.
...
llvm-svn: 187919
2013-08-07 21:43:23 +00:00
Daniel Dunbar
f6dc230bef
[lit] Use list comprehensions instead of map().
...
llvm-svn: 187918
2013-08-07 21:43:17 +00:00
Daniel Dunbar
1047d9a412
[lit] Avoid deprecated dict.has_key() method.
...
llvm-svn: 187917
2013-08-07 21:43:12 +00:00
NAKAMURA Takumi
50985962d6
lit/LitConfig.py: Fixup for msys bash.
...
llvm-svn: 187896
2013-08-07 17:21:23 +00:00
NAKAMURA Takumi
c97b753cf4
Lit: Fixup in r187886.
...
llvm-svn: 187887
2013-08-07 12:53:53 +00:00
NAKAMURA Takumi
aa7cea9369
Lit: Resurrect --no-execute dropped in r187852.
...
For now, builders in bb.pgr.jp are using it.
llvm-svn: 187886
2013-08-07 12:44:29 +00:00
Daniel Dunbar
4e06f0d106
[lit] Use py2&3 compatible exec() syntax.
...
llvm-svn: 187862
2013-08-07 03:25:28 +00:00
Daniel Dunbar
c9568b84b7
[lit] Use newer StringIO class.
...
llvm-svn: 187861
2013-08-07 03:24:20 +00:00
Daniel Dunbar
3957a8f07f
[lit] Use modern absolute/relative import style.
...
llvm-svn: 187860
2013-08-07 03:23:12 +00:00
Daniel Dunbar
679a82023e
[lit] Avoid __cmp__ and cmp().
...
llvm-svn: 187859
2013-08-07 03:22:02 +00:00
Daniel Dunbar
3a90aebd3a
[lit] Avoid use of iterator .next() method.
...
llvm-svn: 187858
2013-08-07 03:20:54 +00:00
Daniel Dunbar
a3ef2f2dd8
[lit] Use .write() methods instead of print statement.
...
llvm-svn: 187857
2013-08-07 03:19:45 +00:00
Daniel Dunbar
bc2f287c63
[lit] Use dual-compatible print() syntax where possible.
...
llvm-svn: 187856
2013-08-07 03:18:36 +00:00
Daniel Dunbar
318e8976b6
[lit] Remove use of deprecated parameter tuple unpacking.
...
llvm-svn: 187855
2013-08-07 03:17:27 +00:00
Daniel Dunbar
7defa7a74c
[lit] Remove uses of deprecated except syntax.
...
- Since we only have a few of these, use the cumbersome method of getting the
exception object from 'sys' to retain the current pre-2.6 compatibility.
llvm-svn: 187854
2013-08-07 03:16:19 +00:00
Daniel Dunbar
5b09842179
[lit] Use more modern syntax for constructing exceptions.
...
llvm-svn: 187853
2013-08-07 03:15:10 +00:00
Daniel Dunbar
a155dcd166
[lit] Drop --no-execute, which isn't generally useful.
...
llvm-svn: 187852
2013-08-07 03:14:00 +00:00
Daniel Dunbar
668c61f687
[lit] tests: Change discovery test to use --show-tests.
...
llvm-svn: 187851
2013-08-07 03:12:51 +00:00
Daniel Dunbar
2c687fe7b9
[lit] Add a --show-tests option.
...
llvm-svn: 187850
2013-08-07 03:11:42 +00:00
Daniel Dunbar
2a5c39de55
[lit] Remove dead ignoreStdError argument.
...
llvm-svn: 187849
2013-08-07 03:08:46 +00:00
Rafael Espindola
8e0f635fe8
Move the default back to pipefail. I accidentally reverted it before.
...
llvm-svn: 187271
2013-07-26 23:22:43 +00:00
Rafael Espindola
0fe236d873
Propagate pipefail when cloning.
...
llvm-svn: 187268
2013-07-26 23:17:38 +00:00
Rafael Espindola
2a2a0973b8
Use pipefail when available.
...
This change makes test with RUN lines like
RUN: opt ... | FileCheck
fail if opt fails, even if it prints what FileCheck wants. Enabling this
found some interesting cases of broken tests that were not being noticed
because opt (or some other tool) was crashing late.
Pipefail is used when the shell supports it or when using the internal
python based tester.
llvm-svn: 187261
2013-07-26 22:32:58 +00:00
Nico Rieck
b21ebec2c4
lit: Support cancellation on Windows
...
The current machinery using KeyboardInterrupt for canceling doesn't work
with multiple threads on Windows as it just cancels the currently run tests
but the runners continue.
We install a handler for Ctrl-C which stops the provider from providing any
more tests to the runners. Together with aborting all currently running
tests, this brings lit to a halt.
llvm-svn: 186695
2013-07-19 17:08:08 +00:00
Galina Kistanova
5308abb22a
Fixed bug when tests in executable partially used absolute paths.
...
llvm-svn: 182910
2013-05-30 04:56:28 +00:00
Alexey Samsonov
1eba4e3254
Revert r182715 and r182758
...
llvm-svn: 182761
2013-05-28 10:08:08 +00:00
Alexey Samsonov
b262d264d4
Fixup for r182715: provide correct arg to --gtest-filter
...
llvm-svn: 182758
2013-05-28 09:40:42 +00:00
Galina Kistanova
a035f3b2ce
Fixed bug when tests in executable partially used absolute paths.
...
llvm-svn: 182715
2013-05-26 03:58:41 +00:00
Daniel Dunbar
175aed579d
lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root.
...
llvm-svn: 179402
2013-04-12 19:09:09 +00:00
Daniel Dunbar
b5e9727ee5
lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).
...
llvm-svn: 179401
2013-04-12 19:08:57 +00:00
Daniel Dunbar
9448e8594f
lit: Don't descend into .git directories during test discovery.
...
llvm-svn: 179249
2013-04-11 00:31:35 +00:00
Daniel Dunbar
2e4a49ae25
lit: Shorten a metavar to make --help look nicer.
...
llvm-svn: 179248
2013-04-11 00:31:27 +00:00
Daniel Dunbar
970faff8c1
lit: Add a test for discovery when exact test names are given.
...
llvm-svn: 179247
2013-04-11 00:31:22 +00:00
Daniel Dunbar
99a67ed76e
lit: Add a trivial test of the basic progress bar.
...
llvm-svn: 179243
2013-04-11 00:05:37 +00:00
Reid Kleckner
e23604da5f
[lit] Avoid CRLFs in bash scripts on Windows
...
Native Windows Python will do line ending translation by default, which
we don't want in bash scripts. If we're not native Windows Python, then
'b' is ignored.
llvm-svn: 177602
2013-03-20 23:32:14 +00:00
NAKAMURA Takumi
4be6c00cee
lit.TestFormats.GoogleTest: Honor LitConfig.noExecute, or --no-execute were ignored.
...
llvm-svn: 176930
2013-03-13 06:16:33 +00:00
Daniel Dunbar
d2cc63f10b
[lit] Add a display function for lit.Test.TestResult.
...
llvm-svn: 174667
2013-02-07 21:34:34 +00:00
Daniel Dunbar
38d3798b94
[lit] Add a test for internal shell execution behaviors.
...
llvm-svn: 174102
2013-01-31 22:15:20 +00:00
Daniel Dunbar
f36e032c41
[lit] Change to raise InternalShellError for all command execution issues.
...
llvm-svn: 174101
2013-01-31 22:15:15 +00:00
Daniel Dunbar
a17da6294d
[lit] Fix bug where InternalShellError messages were discarded.
...
- Also, change the exit code to match 'sh'.
llvm-svn: 174089
2013-01-31 20:58:16 +00:00
Daniel Dunbar
281e4b1f92
[lit] Fix a shell parsing bug with ';' not separated by whitespace.
...
- Testing finds bugs, who knew.
llvm-svn: 174087
2013-01-31 20:51:17 +00:00
Daniel Dunbar
14b8265f5f
[lit] Add a test for the various ShTest format features.
...
llvm-svn: 174072
2013-01-31 18:05:01 +00:00
Daniel Dunbar
e29de8355b
[lit] TestRunner: Eliminate failDueToStderr argument, which is now unused.
...
llvm-svn: 174071
2013-01-31 18:04:45 +00:00
Daniel Dunbar
69db719f86
[lit] Delete the now-unused SyntaxCheckTest format.
...
- Also, kill the pointless LitFormats module.
llvm-svn: 174070
2013-01-31 18:04:38 +00:00
Daniel Dunbar
ae1f040d76
[lit] Move unittest adaptor code into discovery module.
...
- Also, add a test for it.
llvm-svn: 174019
2013-01-31 01:23:39 +00:00
Daniel Dunbar
25baa132f3
[lit] Run the ShUtil tests as part of the test suite.
...
llvm-svn: 174018
2013-01-31 01:23:26 +00:00
Daniel Dunbar
33d340e23b
[lit] Set parallel mode for coverage tests.
...
llvm-svn: 174017
2013-01-31 01:23:18 +00:00
Daniel Dunbar
151e231e82
[lit] Move discovery code into its own module.
...
llvm-svn: 174014
2013-01-31 01:14:01 +00:00
Daniel Dunbar
b399246c91
[lit] Add a MANIFEST file and a script for sanity checking the source dist.
...
llvm-svn: 174002
2013-01-31 00:21:59 +00:00
Daniel Dunbar
f74e41ab47
[lit] Add a basic discovery test.
...
llvm-svn: 174001
2013-01-31 00:21:51 +00:00
Daniel Dunbar
d00a5e5455
[lit] Add a script for checking test coverage.
...
llvm-svn: 174000
2013-01-31 00:21:44 +00:00
Daniel Dunbar
40722cc9ff
[lit] Add a test suite for lit itself.
...
llvm-svn: 173999
2013-01-31 00:21:39 +00:00
Alexey Samsonov
c865abe747
[lit] Make GoogleTest test runner correctly discover tests in the source root
...
llvm-svn: 173907
2013-01-30 07:27:45 +00:00
Daniel Dunbar
a4db5d0839
[lit] Add some TODO notes to myself.
...
llvm-svn: 173857
2013-01-30 00:12:24 +00:00
NAKAMURA Takumi
e5297c4636
lit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compatible.
...
llvm-svn: 173421
2013-01-25 06:30:36 +00:00
Dmitri Gribenko
6f3290e599
Remove support for Tcl test format since nobody uses it
...
llvm-svn: 172794
2013-01-18 06:57:01 +00:00
Eli Bendersky
8d5f8dc485
Fix comment typo
...
llvm-svn: 171113
2012-12-26 18:15:42 +00:00
Richard Smith
0ab6c5d9d8
PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test!
...
llvm-svn: 169446
2012-12-05 23:15:33 +00:00
Richard Smith
69c87b0914
PR10867. lit would interpret
...
RUN: a
RUN: b || true
as "a && (b || true)" in Tcl mode, and as "(a && b) || true" in sh mode.
Everyone seems to (quite reasonably) write tests assuming the Tcl behavior,
so use that in sh mode too.
llvm-svn: 169441
2012-12-05 22:54:26 +00:00
Daniel Dunbar
2555a4fc08
lit: Add a simple test suite for checking test runner parallelism.
...
llvm-svn: 169038
2012-11-30 21:34:04 +00:00
Daniel Dunbar
93a39dfdf3
lit: Bump the version to .3.
...
llvm-svn: 168750
2012-11-28 00:06:11 +00:00
Eric Christopher
950d8703b1
Remove the CellSPU port.
...
Approved by Chris Lattner.
llvm-svn: 167984
2012-11-14 22:09:20 +00:00
Alexander Kornienko
317adfc8b7
Added %(line), %(line+<number>), %(line-<number>) substitutions to lit
...
llvm-svn: 167971
2012-11-14 20:26:19 +00:00
Daniel Dunbar
a3d9cabf8f
lit: Rename the valgrind leaks feature to match what is currently used
...
(vg_leak).
llvm-svn: 166306
2012-10-19 20:29:30 +00:00
Daniel Dunbar
a3514551a1
lit: Remove support for XTARGET.
...
- The XTARGET feature (inherited from old DG tests) was just confusing (and
barely ever used). The same effect can now be achieved with a combination of
the more useful REQUIRES and XFAIL.
llvm-svn: 166305
2012-10-19 20:29:27 +00:00
Daniel Dunbar
519a349c8a
lit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
...
- These can be used with the XFAIL options.
llvm-svn: 166303
2012-10-19 20:12:00 +00:00
Daniel Dunbar
315bcbd145
lit: Propagate TERM variable in environment, some tools can do really obscure
...
odd things if this is missing.
llvm-svn: 166289
2012-10-19 17:23:34 +00:00
Daniel Dunbar
f1706edf5d
lit: Allow XFAIL: lines to also refer to "features".
...
llvm-svn: 166224
2012-10-18 20:43:04 +00:00
NAKAMURA Takumi
78ddd58743
lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
...
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists.
llvm-svn: 163469
2012-09-08 12:07:24 +00:00
NAKAMURA Takumi
ab6151d6c4
lit: Show actually created count of threads. The incorrect threads count is printed if the number of tests are less than the number of default threads.
...
Thanks to Vinson Lee, reported in PR13620.
llvm-svn: 162078
2012-08-17 04:15:41 +00:00
Daniel Dunbar
2f529107a7
lit: Use close_fds=True on UNIX, to avoid file descriptor pollution of
...
subprocesses.
llvm-svn: 160556
2012-07-20 18:29:34 +00:00
Chandler Carruth
498525e4bb
Revert r159528 which taught lit's builtin shell test runner about the
...
'|&' bash syntax. We have lots of users with a bash on their system
which doesn't support this syntax, and as bash is still significantly
faster, we should support them.
The test suite has already been updated to cope with this.
llvm-svn: 159580
2012-07-02 20:43:21 +00:00
Chandler Carruth
a25971326f
Teach the built-in shell test runner in lit to handle '|&'-style pipes.
...
This is directly cloned from the logic in the TCL test bits of lit.
Hopefully will fix most of the windows build bot fallout.
llvm-svn: 159528
2012-07-02 13:10:15 +00:00
NAKAMURA Takumi
a087dae052
Lit: rewind WinWaitReleased() stuff in TestRunner.
...
r145222 "lit/TestRunner.py: [Win32] Introduce WinWaitReleased(f), to wait for file handles to be released by children."
r145223 "lit/TestRunner.py: Use RemoveForce()."
r145381 "lit/TestRunner.py: Try to catch ERROR_FILE_NOT_FOUND, too."
r152916 "lit/TestRunner.py: [Win32] Check all opened_files[] released, rather than (obsoleted) written_files[]."
r153172 "lit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python Win32 Extensions."
llvm-svn: 156381
2012-05-08 14:31:52 +00:00
Eli Bendersky
6330877a3e
Fix lit failure on cmake-clang-x64_64-linux bot, apparently due to its having
...
a very (*very*) old version of Python (2.4?)
llvm-svn: 153409
2012-03-25 09:42:28 +00:00
Eli Bendersky
f33086052d
Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
...
* Removed test/lib/llvm.exp - it is no longer needed
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
left in the test suite so this code is no longer required. test/lit.cfg is
now much shorter and clearer
* Removed a lot of duplicate code in lit.local.cfg files that need access to
the root configuration, by adding a "root" attribute to the TestingConfig
object. This attribute is dynamically computed to provide the same
information as was previously provided by the custom getRoot functions.
* Documented the config.root attribute in docs/CommandGuide/lit.pod
llvm-svn: 153408
2012-03-25 09:02:19 +00:00
Eric Christopher
64a232343a
Remove the C backend.
...
llvm-svn: 153307
2012-03-23 05:50:46 +00:00
Nico Weber
d998e8450e
Add a ${pathsep} variable to lit that expands to : (or ; on win32).
...
This is in braces so that it doesn't conflict with the existing %p.
It uses braces instead of parens because parens would have to be
regex-escaped.
llvm-svn: 153213
2012-03-21 19:56:42 +00:00
NAKAMURA Takumi
98b18777a4
lit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python Win32 Extensions.
...
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.
Disable win32file at ImportError. Thanks to Francois to let me know.
FIXME: Could we report warning or notification if win32file were not found?
llvm-svn: 153172
2012-03-21 07:49:44 +00:00
Francois Pichet
b7ae23fb66
Revert r152915. Chapuni's WinWaitReleased refactoring: It doesn't work for me
...
llvm-svn: 152958
2012-03-16 22:50:01 +00:00
NAKAMURA Takumi
16d5af118c
lit/TestRunner.py: [Win32] Check all opened_files[] released, rather than (obsoleted) written_files[].
...
In previous case,
RUN: foo -o %t
RUN: FileCheck < %t
RUN: bar -o %t
2nd read handle might prevent manipulation of 3rd %t in bar, to remove and rename.
llvm-svn: 152916
2012-03-16 10:48:10 +00:00
NAKAMURA Takumi
ee4d317725
lit/TestRunner.py: [Win32] Rework WinWaitReleased().
...
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.
llvm-svn: 152915
2012-03-16 10:48:03 +00:00
NAKAMURA Takumi
c114e0cf3c
lit: Pass %INCLUDE% to tests on Win32. clang may expect existence of %INCLUDE% in vcvarsall.bat.
...
llvm-svn: 152588
2012-03-13 00:02:06 +00:00
Duncan Sands
d30d8c82cb
Honour --config-prefix also for lit.local.cfg.
...
llvm-svn: 151977
2012-03-03 13:30:56 +00:00
Andrew Trick
5470205ad2
This is a small patch with a couple of improvements for running lit with --debug:
...
1. Added a status note when a config file is loaded directly with load_config. This helps notice loads of lit.cfg from lit.site.cfg
2. Added a status note on the result of a config load. Previously, it was just notifying that it tries to load a config file. Now it will also say whether the load succeeded or the file wasn't found
The two changes give better visibility into which config files were actually loaded by lit. The effect is only on --debug runs.
Patch by Eli Bendersky!
llvm-svn: 149932
2012-02-06 23:34:52 +00:00
Daniel Dunbar
9619961e1b
[lit] Add a --filter option which is useful when dealing with virtual test
...
paths.
llvm-svn: 148362
2012-01-18 00:03:12 +00:00
Argyrios Kyrtzidis
cd8fe08e4d
Disable the crash reporter when running lit tests.
...
llvm-svn: 147965
2012-01-11 20:53:25 +00:00
Daniel Dunbar
600b23b225
lit/lit.TestRunner: Add an extra_substitutions argument for executeShTest --
...
useful for test suites which want to piggyback onto the "shtest" format style.
llvm-svn: 147684
2012-01-06 21:39:06 +00:00
NAKAMURA Takumi
0e5bae7191
lit/TestRunner.py: Try to catch ERROR_FILE_NOT_FOUND, too.
...
Thanks to Francois, to let me know.
llvm-svn: 145381
2011-11-29 06:40:50 +00:00
NAKAMURA Takumi
a0d652e71b
lit/TestRunner.py: Use RemoveForce().
...
llvm-svn: 145223
2011-11-28 01:55:08 +00:00
NAKAMURA Takumi
57fc5adca0
lit/TestRunner.py: [Win32] Introduce WinWaitReleased(f), to wait for file handles to be released by children.
...
When wait() has finished, opened handles (especially writing stdout to file) might not be released immediately.
To wait for released, poll to attempt renaming.
llvm-svn: 145222
2011-11-28 01:55:01 +00:00
Dan Gohman
4c9fca99c9
Remove the Alpha backend.
...
llvm-svn: 143164
2011-10-27 22:56:32 +00:00
Daniel Dunbar
e800a9cb70
lit: Drop some unneeded code from example tests.
...
- Also, cleanup site.exp files in example tests.
llvm-svn: 143141
2011-10-27 20:59:19 +00:00
Dan Gohman
b43c36f391
Remove the Blackfin backend.
...
llvm-svn: 142880
2011-10-25 00:05:42 +00:00
Dan Gohman
dfc96aea90
Remove the SystemZ backend.
...
llvm-svn: 142878
2011-10-24 23:48:32 +00:00
NAKAMURA Takumi
93f3082118
lit: Normalize pathsep slashes also on %T.
...
On Python-w32 with mingw msys bash, %T was replaced to "x:\foo\bar...". msys bash cannot handle DOSish paths.
llvm-svn: 138852
2011-08-31 03:56:17 +00:00
Andrew Trick
d74c19449e
Lit option for ignoring stderr output.
...
This is useful for testing a build a temporarily hand instrumented
build.
Patch by arrowdodger!
llvm-svn: 138804
2011-08-30 17:42:33 +00:00
Douglas Gregor
37e94d06ba
lit: Add %T as a replacement for the output directory
...
llvm-svn: 138640
2011-08-26 19:05:18 +00:00
NAKAMURA Takumi
9f1761c3e0
utils/lit/lit/TestingConfig.py: Pass TEMP and TMP to tests on Win32 hosts.
...
Win32 GetTempPath() tends to pick up %WINDIR% when neither TEMP nor TMP was found. %WINDIR% should not be treated writable on recent Windows OS.
llvm-svn: 138192
2011-08-20 05:44:58 +00:00
NAKAMURA Takumi
9b4ae4bb1c
utils/lit/lit/TestingConfig.py: Split out environment vars for Win32.
...
llvm-svn: 138191
2011-08-20 05:44:52 +00:00
NAKAMURA Takumi
e3d5a79fd1
lit/LitConfig.py: Demote Win32 message "Unable to find 'bash.exe'" from Warning to Note.
...
llvm-svn: 134809
2011-07-09 07:19:50 +00:00
Jordy Rose
1c32720248
Use subprocess.Popen instead of popen2 to stop a deprecation warning when running lit on OS X
...
llvm-svn: 134324
2011-07-02 17:28:55 +00:00
Andrew Trick
67ff0718a4
lit support for REQUIRES: asserts.
...
Take #2 . Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.
llvm-svn: 133664
2011-06-22 23:23:19 +00:00
Andrew Trick
6132fb5127
Add support to lit for build mode requirements. e.g.
...
REQUIRES: Asserts
REQUIRES: Debug
This required chaining test configuration properties. It seems like a
generally good thing to do.
llvm-svn: 133131
2011-06-16 01:33:35 +00:00
Chris Lattner
0ab5e2cded
Fix a ton of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129558
2011-04-15 05:18:47 +00:00
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