Daniel Dunbar
b8a82c295d
[lit] Add --version option.
...
llvm-svn: 203496
2014-03-10 21:57:48 +00:00
Alp Toker
749971901a
lit: Provide source locations in cfg files with older Python versions
...
This commit prospectively brings the benefits of r198766 to older supported
Python versions (2.5+).
Tested with Python 2.6, 2.7, 3.1 and 3.3 (!)
llvm-svn: 199009
2014-01-11 14:34:18 +00:00
Alp Toker
f0a245944e
lit: execfile() isn't present in Python 3.3
...
On the other hand, exec(compile()) doesn't work in older Python versions in the
2.x series.
This commit introduces exec(compile()) with a fallback to plain exec(). That'll
hopefully hit the sweet spot in terms of version support.
Followup to r198766 which added enhanced source locations for lit cfg parsing.
llvm-svn: 199006
2014-01-11 13:27:28 +00:00
Alp Toker
9e628916f6
lit: Provide file location in cfg error messages
...
Python doesn't do a good job at diagnosing string exec() so use execfile()
where available.
This should be a timesaver when trying to get to the bottom of build bot
failures.
Before:
File "llvm/utils/lit/lit/TestingConfig.py", line 93, in load_from_path
exec("exec data in cfg_globals")
File "<string>", line 1, in <module>
File "<string>", line 194, in <module>
NameError: name 'typo' is not defined
After:
File "llvm/utils/lit/lit/TestingConfig.py", line 95, in load_from_path
execfile(path, cfg_globals)
File "clang/test/lit.cfg", line 194, in <module>
typo
^~~~
NameError: name 'typo' is not defined
llvm-svn: 198766
2014-01-08 14:20:59 +00:00
Alp Toker
e395023eab
Python compatibility fix for r198150
...
Remove the stat call error reporting for now.
It wasn't essential so silent fallback should be fine here.
llvm-svn: 198155
2013-12-29 06:51:10 +00:00
Alp Toker
0324ee0a33
Prospective Python 3 fix for r198150
...
llvm-svn: 198152
2013-12-29 05:51:07 +00:00
Alp Toker
fdef0e0d94
lit: Incremental test scheduling
...
Add option -i to prioritize test runs by source file modification time and
previous failure state.
This optimal scheduling reduces typical test-and-fix iteration times to a
matter of seconds by rapidly answering the questions:
1) Did my recent change fix tests that were previously failing?
2) Do the tests I just wrote / modified still work?
The current implementation requires write permissions to the source tree
because it uses mtimes to track failures.
llvm-svn: 198150
2013-12-29 05:09:05 +00:00
NAKAMURA Takumi
b7bf04c02e
Tweak lit/TestingConfig.py Py3-compatible. has_key is dead.
...
llvm-svn: 197462
2013-12-17 04:14:50 +00:00
Alp Toker
d0cdc67caa
lit: multiprocessing platform fix attempt
...
The error raised by Python varies by platform(!), so let's just catch any
exception and fall back.
Thanks to Sylvestre Ledru for noticing this on a Debian / Python 2.7 system
running code coverage.
llvm-svn: 193516
2013-10-28 10:26:13 +00:00
Alp Toker
31bd72fb22
Clarify the comment about BSD versions in r193465
...
llvm-svn: 193508
2013-10-27 20:49:19 +00:00
Joerg Sonnenberger
853b460e4f
self.path may be empty or otherwise miss the normal system directories,
...
so try PATH next. Assume it is sane enough to cover the usual system
bash locations too, but the old list is not good enough for NetBSD.
llvm-svn: 193471
2013-10-26 13:25:45 +00:00
Alp Toker
54d210b205
lit: Issue a note when multiprocessing fails to load
...
If multiprocessing was requested, detected as available and subsequently failed
to initialize it's worth letting the user know about it before falling back to
threads.
This condition can arise in certain OpenBSD / FreeBSD Python versions.
llvm-svn: 193465
2013-10-26 09:29:58 +00:00
Alp Toker
6c5dbd7a0a
Fix a referenced before assignment in r193463
...
Some versions of Python on the builders seem strict about this.
llvm-svn: 193464
2013-10-26 08:46:05 +00:00
Alp Toker
9ade45482a
lit: handle late multiprocessing errors gracefully
...
This should be a better fix for lit multiprocessing failures, replacing the
OpenBSD and FreeBSD workarounds in r193413 and r193457.
Reference: http://bugs.python.org/issue3770
llvm-svn: 193463
2013-10-26 08:22:44 +00:00
Alp Toker
5853534b03
Attempt to fix the FreeBSD build, disable multiprocessing
...
Speculative quick fix based on clang-X86_64-freebsd output:
File "/usr/local/lib/python2.6/multiprocessing/synchronize.py", line 33, in <module>
" function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
llvm-svn: 193457
2013-10-26 02:43:08 +00:00
Rafael Espindola
5e82540d11
Try to fix the openbsd bot.
...
llvm-svn: 193413
2013-10-25 15:07:59 +00:00
Rafael Espindola
f059064d95
Actually switch the default to use multiprocessing
...
llvm-svn: 193282
2013-10-23 22:32:53 +00:00
Daniel Dunbar
cdca362e65
[lit] Stop hacking the GIL check interval.
...
- This was never a big win, and is irrelevant now that we commonly use
multiprocessing based parallelism.
llvm-svn: 193280
2013-10-23 22:19:32 +00:00
Daniel Dunbar
1fc709cd3e
[lit] Use multiprocessing based parallelism by default, on Unix.
...
llvm-svn: 193279
2013-10-23 22:19:07 +00:00
NAKAMURA Takumi
1c19a0f4a8
Lit: LIT_PRESERVES_TMP should be aware of TMPDIR, too.
...
TMPDIR is preferred in Unix.
llvm-svn: 192891
2013-10-17 13:11:13 +00:00
NAKAMURA Takumi
199f138a07
Lit: Introduce an environment variable, $LIT_PRESERVES_TMP, to preserve TMP (and TEMP).
...
This is intended to check how many temporary files would be generated in automated builders.
llvm-svn: 192887
2013-10-17 12:10:12 +00:00
Daniel Dunbar
cd625f4e54
[lit] Add an --output option, for writing results in a machine readable form.
...
llvm-svn: 190738
2013-09-14 01:19:17 +00:00
Daniel Dunbar
9aeba4963a
[lit] Add support for attach arbitrary metrics to test results.
...
- This is a work-in-progress and all details are subject to change, but I am
trying to build up support for allowing lit to be used as a driver for
performance tests (or other tests which might want to record information
beyond simple PASS/FAIL).
llvm-svn: 190535
2013-09-11 17:45:11 +00:00
Daniel Dunbar
dac381a323
[lit] Allow config files to pass arbitrary values to child configs.
...
- This aligns with how existing test suites end up wanting to use the local
config files, conceptually it makes sense to consider them to be inherited.
llvm-svn: 189885
2013-09-03 23:32:55 +00:00
Daniel Dunbar
9d8271b351
[lit] [tests] Add missing test input file.
...
llvm-svn: 189561
2013-08-29 03:02:34 +00:00
Daniel Dunbar
b8da61fd1b
[lit] Fix internal shell's argv[0] handling.
...
- At least on OS X, it is important for correct behavior of /bin/[ that argv[0]
is passed as written, and not as the full executable path.
llvm-svn: 189559
2013-08-29 02:52:10 +00:00
Daniel Dunbar
9a83a76b1b
[lit] Add support for multiprocessing, under --use-processes for now.
...
llvm-svn: 189556
2013-08-29 00:54:23 +00:00
Daniel Dunbar
b3954fa889
[lit] Implement --max-time support by using provider cancel method.
...
llvm-svn: 189555
2013-08-29 00:54:19 +00:00
Daniel Dunbar
57ab2df070
[lit] Refactor test execution logic into lit.run.Run.
...
llvm-svn: 189554
2013-08-29 00:54:15 +00:00
Daniel Dunbar
eecb1c1d25
[lit] Put display lock inside the ThreadResultsConsumer.
...
llvm-svn: 189553
2013-08-29 00:54:09 +00:00
Daniel Dunbar
516dc8b9be
[lit] Factor out a results consumer interface for test execution.
...
- Also, change TestProvider interface to operate on test indices.
llvm-svn: 189552
2013-08-29 00:54:02 +00:00
Daniel Dunbar
562b83a64c
[lit] Move top-level execute code into Run object.
...
llvm-svn: 189551
2013-08-29 00:48:55 +00:00
Daniel Dunbar
a1b1ca7a38
[lit] Factor out Run class to capture configuration + discovered tests.
...
llvm-svn: 189550
2013-08-29 00:48:45 +00:00
Daniel Dunbar
d73eaabc8f
[lit] Change lit.Test.ResultCode to be unique across pickling.
...
llvm-svn: 189549
2013-08-29 00:48:39 +00:00
Daniel Dunbar
89d0321774
[lit] Add a TODO.
...
llvm-svn: 189546
2013-08-29 00:41:15 +00:00
Daniel Dunbar
bef5955e22
[lit] Update shtest format to return lit.Test.Result objects.
...
llvm-svn: 189545
2013-08-29 00:41:09 +00:00
Daniel Dunbar
71c06c0cc2
[lit] Update LitTestCase to support lit.Test.Result.
...
llvm-svn: 189544
2013-08-29 00:40:59 +00:00
Daniel Dunbar
39be0b4b4c
[lit] Fix a couple lingering Py3 compat issues in ProgressBar.
...
llvm-svn: 188951
2013-08-21 22:26:47 +00:00
Daniel Dunbar
898d0d34a9
[lit] Lift XFAIL handling to core infrastructure.
...
llvm-svn: 188949
2013-08-21 22:26:42 +00:00
Daniel Dunbar
02ae385cac
[lit] Allow formats to return lit.Test.Result instances directly.
...
llvm-svn: 188948
2013-08-21 22:26:40 +00:00
Daniel Dunbar
61821065a2
[lit] Factor out a separate Test.Result() object.
...
llvm-svn: 188947
2013-08-21 22:26:37 +00:00
Daniel Dunbar
cf5599cc11
[lit] Simplify --time-tests code.
...
llvm-svn: 188946
2013-08-21 22:26:34 +00:00
Daniel Dunbar
dd003d3332
[lit] Extract TestFormat base class, for future use.
...
llvm-svn: 188945
2013-08-21 22:26:26 +00:00
Daniel Dunbar
3f0ec8045c
[lit] Rewrite TODO list, and elaborate on some things.
...
- If anyone is interested in lit's feature set, I'd appreciate any comments on
the elaborated items.
llvm-svn: 188590
2013-08-16 23:30:23 +00:00
Daniel Dunbar
730dee40ca
[lit] Remove some done TODOs.
...
llvm-svn: 188502
2013-08-15 22:52:20 +00:00
Daniel Dunbar
301d387929
[lit] Add test coverage of gtest format.
...
llvm-svn: 188417
2013-08-14 22:21:11 +00:00
Daniel Dunbar
54d613b97f
[lit] Ensure test output is converted to strings where possible.
...
- This cleans up the text output of failing tests when run under PY3.
llvm-svn: 188416
2013-08-14 22:21:01 +00:00
Daniel Dunbar
e469b981f3
[lit] Support parsing scripts with inconsistent or invalid encodings.
...
- For whatever reason, we have a lot of test files with bogus unicode
characters. This patch allows those scripts to still be parsed on Python3 by
changing the parsing logic to work on binary files, and only require the
actual script commands to be convertible to ascii.
- This patch has been tweaked to now ensure that the command strings are not of
unicode type on Python 2.6-7.
llvm-svn: 188398
2013-08-14 18:22:41 +00:00
Daniel Dunbar
16b934d624
Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings.", this doesn't work yet for bots using the internal shell.
...
llvm-svn: 188379
2013-08-14 15:55:25 +00:00
Daniel Dunbar
cf0702601a
[lit] Support parsing scripts with inconsistent or invalid encodings.
...
- For whatever reason, we have a lot of test files with bogus unicode
characters. This patch allows those scripts to still be parsed on Python3 by
changing the parsing logic to work on binary files, and only require the
actual script commands to be convertible to ascii.
llvm-svn: 188376
2013-08-14 15:24:58 +00:00
Daniel Dunbar
b7b4c11c6a
[lit] Fix a relative import issue I missed earlier.
...
llvm-svn: 188360
2013-08-14 05:07:16 +00:00
Daniel Dunbar
abb0695237
[lit] Avoid StringIO.
...
- We barely used it, and it is very hard to use in a 2.5-3 compatible
way because of changing expectations for its input types.
llvm-svn: 188359
2013-08-14 05:07:13 +00:00
Daniel Dunbar
6d0ed4cd16
[lit] Fix tests to execute lit with same python as invoked with.
...
llvm-svn: 188358
2013-08-14 05:07:09 +00:00
Daniel Dunbar
1ba25a1e56
[lit] Factor ShTest format script command parsing from other processing.
...
llvm-svn: 188357
2013-08-14 05:07:04 +00:00
Daniel Dunbar
0a4a23ebac
[lit] Move executeCommand() into lit.util.
...
llvm-svn: 188356
2013-08-14 05:07:01 +00:00
Daniel Dunbar
962fdef115
[lit] Move formats into their own subpackage.
...
llvm-svn: 188355
2013-08-14 05:06:55 +00:00
NAKAMURA Takumi
8a3357d252
Lit: Introduce "%/[STpst] into parseIntegratedTestScript(), to normalize substitutions.
...
llvm-svn: 188348
2013-08-14 02:26:31 +00:00
Daniel Dunbar
1be0c73a94
[lit] Support use of setup.py from other directories.
...
llvm-svn: 188309
2013-08-13 19:08:48 +00:00
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