summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests
Commit message (Collapse)AuthorAgeFilesLines
* [lit][googletest] Handle upstream gtest outputDaniel Dunbar2016-03-313-0/+61
| | | | | | | | | | | | | | | | | | | Summary: Upstream googletest prints "Running main() from gtest_main.cc" to stdout prior to running tests. LLVM removed that print statement in r61540. If a user were to use lit to run tests that use upstream googletest, however, lit reports "Running main()" as an invalid test name. To avoid such a failure, add an extra conditional to `formats/googletest.py`. Also add tests to demonstrate the modified behavior. Reviewers: abdulras, ddunbar Subscribers: ddunbar, llvm-commits, kastiglione Differential Revision: http://reviews.llvm.org/D18606 llvm-svn: 265034
* Revert "Teach the CMake build system to run lit's test suite. These can be run"Dan Liew2016-01-092-24/+2
| | | | | | | | | | | | | | This reverts r257221. This caused several build bot failures * It looks like some of the tests don't work correctly under Windows * It looks like the lit per test timeout tests fail So I'm reverting for now. Once the above failures are fixed running lit's tests can be enabled again. llvm-svn: 257268
* Teach the CMake build system to run lit's test suite. These can be runDan Liew2016-01-082-2/+24
| | | | | | | | | | | | | | | directy with ``make check-lit`` and are run as part of ``make check-all``. In principle we should run lit's testsuite before testing LLVM using lit so that any problems with lit get discovered before testing LLVM so we can bail out early. However this implementation (``check-all`` runs all tests together) seemed simpler and will still report failing lit tests. Note that the tests and the configured ``lit.site.cfg`` have to be copied into the build directory to avoid polluting the source tree. llvm-svn: 257221
* [lit] Implement support of per test timeout in lit.Dan Liew2015-12-2710-0/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should work with ShTest (executed externally or internally) and GTest test formats. To set the timeout a new option ``--timeout=`` has been added which specifies the maximum run time of an individual test in seconds. By default this 0 which causes no timeout to be enforced. The timeout can also be set from a lit configuration file by modifying the ``lit_config.maxIndividualTestTime`` property. To implement a timeout we now require the psutil Python module if a timeout is requested. This dependency is confined to the newly added ``lit.util.killProcessAndChildren()``. A note has been added into the TODO document describing how we can remove the dependency on the ``pustil`` module in the future. It would be nice to remove this immediately but that is a lot more work and Daniel Dunbar believes it is better that we get a working implementation first and then improve it. To avoid breaking the existing behaviour the psutil module will not be imported if no timeout is requested. The included testcases are derived from test cases provided by Jonathan Roelofs which were in an previous attempt to add a per test timeout to lit (http://reviews.llvm.org/D6584). Thanks Jonathan! Reviewers: ddunbar, jroelofs, cmatthews, MatzeB Subscribers: cmatthews, llvm-commits Differential Revision: http://reviews.llvm.org/D14706 llvm-svn: 256471
* [LIT] Fix discovery.py test once againEric Fiselier2015-07-211-4/+4
| | | | llvm-svn: 242758
* [LIT] Fix failing LIT testsEric Fiselier2015-06-134-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I spend some time trying to get the LIT test suite passing. Here are the changes that I needed to make on my machine. I made the following changes for the following reasons. 1. google-test.py: The Google test format now checks for "[ PASSED ] 1 test." to check if a test passes. 2. discovery.py: The output appears in a different order on my machine than it did in the test. 3. unittest-adaptor.py: The output appears in a different order on my machine than it did in the test. 4. The classname is now formed differently in `getJUnitXML(...)`. I'm not sure what is causing the output order to differ in discovery.py and unittest-adaptor.py. Does anybody have any thoughts? Reviewers: ddunbar, danalbert, jroelofs Reviewed By: jroelofs Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9864 llvm-svn: 239663
* Require python 2.7.Rafael Espindola2014-12-121-2/+0
| | | | | | | | | | | | | We were already requiring 2.5, which meant that people on old linux distros had to upgrade anyway. Requiring python 2.6 will make supporting 3.X easier as we can use the 3.X exception syntax. According to the discussion on llvmdev, there is not much value is requiring just 2.6, we may as well just require 2.7. llvm-svn: 224129
* Add a test-case for lit xunit outputChris Matthews2014-12-031-0/+10
| | | | llvm-svn: 223307
* [lit] Add an --output option, for writing results in a machine readable form.Daniel Dunbar2013-09-143-2/+27
| | | | llvm-svn: 190738
* [lit] Add support for attach arbitrary metrics to test results.Daniel Dunbar2013-09-113-0/+63
| | | | | | | | | - 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
* [lit] Allow config files to pass arbitrary values to child configs.Daniel Dunbar2013-09-032-0/+6
| | | | | | | - 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
* [lit] [tests] Add missing test input file.Daniel Dunbar2013-08-291-0/+6
| | | | llvm-svn: 189561
* [lit] Fix internal shell's argv[0] handling.Daniel Dunbar2013-08-291-1/+2
| | | | | | | - 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
* [lit] Lift XFAIL handling to core infrastructure.Daniel Dunbar2013-08-211-0/+5
| | | | llvm-svn: 188949
* [lit] Add test coverage of gtest format.Daniel Dunbar2013-08-143-0/+57
| | | | llvm-svn: 188417
* [lit] Ensure test output is converted to strings where possible.Daniel Dunbar2013-08-145-4/+43
| | | | | | - This cleans up the text output of failing tests when run under PY3. llvm-svn: 188416
* [lit] Support parsing scripts with inconsistent or invalid encodings.Daniel Dunbar2013-08-141-0/+3
| | | | | | | | | | | | - 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
* Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid ↵Daniel Dunbar2013-08-141-3/+0
| | | | | | encodings.", this doesn't work yet for bots using the internal shell. llvm-svn: 188379
* [lit] Support parsing scripts with inconsistent or invalid encodings.Daniel Dunbar2013-08-141-0/+3
| | | | | | | | | - 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
* [lit] Fix tests to execute lit with same python as invoked with.Daniel Dunbar2013-08-143-3/+6
| | | | llvm-svn: 188358
* [lit] Update lit's own tests to use lit_config and lit package, as appropriate.Daniel Dunbar2013-08-0911-4/+15
| | | | llvm-svn: 188107
* [lit] Change --show-{tests,suites} to exit after printing.Daniel Dunbar2013-08-081-10/+5
| | | | | | - This is a more sensible behavior than printing and also running tests. llvm-svn: 188009
* [lit] tests: Change discovery test to use --show-tests.Daniel Dunbar2013-08-071-25/+31
| | | | llvm-svn: 187851
* lit: Fix infinite recursion when an out-of-tree test root is located inside ↵Daniel Dunbar2013-04-124-0/+27
| | | | | | the source test root. llvm-svn: 179402
* lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).Daniel Dunbar2013-04-123-9/+60
| | | | llvm-svn: 179401
* lit: Add a test for discovery when exact test names are given.Daniel Dunbar2013-04-111-0/+15
| | | | llvm-svn: 179247
* lit: Add a trivial test of the basic progress bar.Daniel Dunbar2013-04-116-0/+22
| | | | llvm-svn: 179243
* [lit] Add a test for internal shell execution behaviors.Daniel Dunbar2013-01-3110-0/+125
| | | | llvm-svn: 174102
* [lit] Add a test for the various ShTest format features.Daniel Dunbar2013-01-3116-0/+72
| | | | llvm-svn: 174072
* [lit] Move unittest adaptor code into discovery module.Daniel Dunbar2013-01-314-0/+25
| | | | | | - Also, add a test for it. llvm-svn: 174019
* [lit] Run the ShUtil tests as part of the test suite.Daniel Dunbar2013-01-312-0/+4
| | | | llvm-svn: 174018
* [lit] Set parallel mode for coverage tests.Daniel Dunbar2013-01-311-1/+1
| | | | llvm-svn: 174017
* [lit] Add a basic discovery test.Daniel Dunbar2013-01-319-0/+41
| | | | llvm-svn: 174001
* [lit] Add a script for checking test coverage.Daniel Dunbar2013-01-311-0/+11
| | | | llvm-svn: 174000
* [lit] Add a test suite for lit itself.Daniel Dunbar2013-01-312-0/+41
llvm-svn: 173999
OpenPOWER on IntegriCloud