summaryrefslogtreecommitdiff
path: root/utils/lit
Commit message (Collapse)AuthorAge
* Fix test syntax to work with non-bash /bin/sh.Joerg Sonnenberger2014-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206119 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Fix non-function style print statement.Daniel Dunbar2014-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203573 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Bump dev version number.Daniel Dunbar2014-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203498 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add a README.txt.Daniel Dunbar2014-03-10
| | | | | | - Also, update MANIFEST.in and utils/check-sdist. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203497 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add --version option.Daniel Dunbar2014-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203496 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Provide source locations in cfg files with older Python versionsAlp Toker2014-01-11
| | | | | | | | | 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 (!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199009 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: execfile() isn't present in Python 3.3Alp Toker2014-01-11
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199006 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Provide file location in cfg error messagesAlp Toker2014-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198766 91177308-0d34-0410-b5e6-96231b3b80d8
* Python compatibility fix for r198150Alp Toker2013-12-29
| | | | | | | | Remove the stat call error reporting for now. It wasn't essential so silent fallback should be fine here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198155 91177308-0d34-0410-b5e6-96231b3b80d8
* Prospective Python 3 fix for r198150Alp Toker2013-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198152 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Incremental test schedulingAlp Toker2013-12-29
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198150 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak lit/TestingConfig.py Py3-compatible. has_key is dead.NAKAMURA Takumi2013-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197462 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: multiprocessing platform fix attemptAlp Toker2013-10-28
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193516 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the comment about BSD versions in r193465Alp Toker2013-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193508 91177308-0d34-0410-b5e6-96231b3b80d8
* self.path may be empty or otherwise miss the normal system directories,Joerg Sonnenberger2013-10-26
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193471 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Issue a note when multiprocessing fails to loadAlp Toker2013-10-26
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193465 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a referenced before assignment in r193463Alp Toker2013-10-26
| | | | | | Some versions of Python on the builders seem strict about this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193464 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: handle late multiprocessing errors gracefullyAlp Toker2013-10-26
| | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193463 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix the FreeBSD build, disable multiprocessingAlp Toker2013-10-26
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193457 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the openbsd bot.Rafael Espindola2013-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193413 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually switch the default to use multiprocessingRafael Espindola2013-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193282 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Stop hacking the GIL check interval.Daniel Dunbar2013-10-23
| | | | | | | - This was never a big win, and is irrelevant now that we commonly use multiprocessing based parallelism. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193280 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Use multiprocessing based parallelism by default, on Unix.Daniel Dunbar2013-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193279 91177308-0d34-0410-b5e6-96231b3b80d8
* Lit: LIT_PRESERVES_TMP should be aware of TMPDIR, too.NAKAMURA Takumi2013-10-17
| | | | | | TMPDIR is preferred in Unix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192891 91177308-0d34-0410-b5e6-96231b3b80d8
* Lit: Introduce an environment variable, $LIT_PRESERVES_TMP, to preserve TMP ↵NAKAMURA Takumi2013-10-17
| | | | | | | | (and TEMP). This is intended to check how many temporary files would be generated in automated builders. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192887 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add an --output option, for writing results in a machine readable form.Daniel Dunbar2013-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190738 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add support for attach arbitrary metrics to test results.Daniel Dunbar2013-09-11
| | | | | | | | | - 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190535 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Allow config files to pass arbitrary values to child configs.Daniel Dunbar2013-09-03
| | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189885 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] [tests] Add missing test input file.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189561 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Fix internal shell's argv[0] handling.Daniel Dunbar2013-08-29
| | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189559 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add support for multiprocessing, under --use-processes for now.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189556 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Implement --max-time support by using provider cancel method.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189555 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Refactor test execution logic into lit.run.Run.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189554 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Put display lock inside the ThreadResultsConsumer.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189553 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Factor out a results consumer interface for test execution.Daniel Dunbar2013-08-29
| | | | | | - Also, change TestProvider interface to operate on test indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189552 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Move top-level execute code into Run object.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189551 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Factor out Run class to capture configuration + discovered tests.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189550 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Change lit.Test.ResultCode to be unique across pickling.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189549 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add a TODO.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189546 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Update shtest format to return lit.Test.Result objects.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189545 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Update LitTestCase to support lit.Test.Result.Daniel Dunbar2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189544 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Fix a couple lingering Py3 compat issues in ProgressBar.Daniel Dunbar2013-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188951 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Lift XFAIL handling to core infrastructure.Daniel Dunbar2013-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188949 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Allow formats to return lit.Test.Result instances directly.Daniel Dunbar2013-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188948 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Factor out a separate Test.Result() object.Daniel Dunbar2013-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188947 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Simplify --time-tests code.Daniel Dunbar2013-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188946 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Extract TestFormat base class, for future use.Daniel Dunbar2013-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188945 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Rewrite TODO list, and elaborate on some things.Daniel Dunbar2013-08-16
| | | | | | | - If anyone is interested in lit's feature set, I'd appreciate any comments on the elaborated items. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188590 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Remove some done TODOs.Daniel Dunbar2013-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188502 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Add test coverage of gtest format.Daniel Dunbar2013-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188417 91177308-0d34-0410-b5e6-96231b3b80d8