summaryrefslogtreecommitdiff
path: root/run_project_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Run the boost test on osx on travis.Benjamin Redelings2018-01-011-1/+5
|
* Use deterministic builddir so CCache works across invocations.Jussi Pakkanen2017-12-181-1/+10
|
* Make the full test suite runnable with an external command.Jussi Pakkanen2017-11-201-2/+19
|
* Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen2017-11-201-1/+1
|
* Tests can be run with an external Meson command.Jussi Pakkanen2017-11-201-3/+3
|
* Moved prebuilt static library under unit tests.Jussi Pakkanen2017-09-301-53/+17
|
* Moved prebuilt object test under unittests.Jussi Pakkanen2017-09-301-5/+3
|
* tests: Only error for lines starting with tabsNirbheek Chauhan2017-09-201-1/+1
| | | | Otherwise we can't even use tabs for testing.
* Try to use 2x the number of cores.Jussi Pakkanen2017-08-311-0/+6
|
* Turned mesontest into on internal module.Jussi Pakkanen2017-08-021-3/+3
|
* Handle objc compiler missing more reliably.Jussi Pakkanen2017-08-021-2/+5
|
* Support implibs for executables on WindowsJon Turney2017-07-201-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean 'implib' kwarg to executable(). If true, it is permitted to use the returned build target object in link_with: On platforms where this makes sense (e.g. Windows), an implib is generated for the executable and used when linking. Otherwise, it has no effect. (Rather than checking if it is a StaticLibrary or SharedLibary, BuildTarget subclasses gain the is_linkable_target method to test if they can appear in link_with:) Also install any executable implib in a similar way to a shared library implib, i.e. placing the implib in the appropriate place Add tests of: - a shared_module containing a reference to a symbol which is known (at link time) to be provided by the executable - trying to link with non-implib executables (should fail) - installing the implib (This last one needs a little enhancement of the installed file checking as this is the first install test we have which needs to work with either MSVC-style or GCC-style implib filenames)
* Close files reliably.Jussi Pakkanen2017-07-181-2/+7
|
* Split out languages from compilers.pyAlistair Thomas2017-06-231-1/+0
|
* Add some colour to test output.Elliott Sales de Andrade2017-06-221-7/+26
| | | | Bold the section names and colourize errors&skips.
* Merge pull request #1924 from mesonbuild/tingping/yelp-fixesJussi Pakkanen2017-06-211-1/+2
|\ | | | | Various yelp fixes
| * tests: Always consider symlink as valid installed filePatrick Griffis2017-06-171-1/+2
| | | | | | | | | | An installed symlink might point to a non-existing file (because DESTDIR is set) so just always accept them.
* | tests: Add Boost unit tests and project tests on WindowsNirbheek Chauhan2017-06-101-3/+10
| | | | | | | | | | | | Boost tests are disabled on Windows for now because the detection is actually completely broken. Once that's fixed (after the release) we can enable it again.
* | tests: Increase dependencies coverage a bit moreNirbheek Chauhan2017-06-101-1/+1
| |
* | unit tests: Add class to generate failing testsNirbheek Chauhan2017-06-091-13/+1
|/ | | | | | | | | It is not feasible to test all failure modes by creating projects in `test cases/failing` that would be an explosion of files, and that mechanism is too coarse anyway. We have no way to ensure that the expected error is being raised. See FailureTests.test_dependency for an example.
* Create helper function for a rmtree that works reliably on Windows.Jussi Pakkanen2017-05-211-18/+5
|
* Remove unused variables.Elliott Sales de Andrade2017-05-171-1/+0
|
* Remove unnecessary __init__ methods.Elliott Sales de Andrade2017-05-171-3/+0
|
* Skip ObjectiveC/C++ tests if ObjC compiler is not availableTim-Philipp Müller2017-05-131-1/+21
|
* project tests: Also regen before buildingNirbheek Chauhan2017-05-091-3/+7
| | | | | | | | | This actually caught a cached-dependency related bug for me that the test-time regen did not. I also increased the ninja wait time to 1 second because that's actually how long you need to sleep to be guaranteed that a change will be detected. Must poke upstream about https://github.com/ninja-build/ninja/issues/371
* Store and print test logs of executed projects.Jussi Pakkanen2017-05-051-2/+8
|
* Don't use len() to test emptiness vs not emptinessDylan Baker2017-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson has a common pattern of using 'if len(foo) == 0:' or 'if len(foo) != 0:', however, this is a common anti-pattern in python. Instead tests for emptiness/non-emptiness should be done with a simple 'if foo:' or 'if not foo:' Consider the following: >>> import timeit >>> timeit.timeit('if len([]) == 0: pass') 0.10730923599840025 >>> timeit.timeit('if not []: pass') 0.030033907998586074 >>> timeit.timeit('if len(['a', 'b', 'c', 'd']) == 0: pass') 0.1154778649979562 >>> timeit.timeit("if not ['a', 'b', 'c', 'd']: pass") 0.08259823200205574 >>> timeit.timeit('if len("") == 0: pass') 0.089759664999292 >>> timeit.timeit('if not "": pass') 0.02340641999762738 >>> timeit.timeit('if len("foo") == 0: pass') 0.08848102600313723 >>> timeit.timeit('if not "foo": pass') 0.04032287199879647 And for the one additional case of 'if len(foo.strip()) == 0', which can be replaced with 'if not foo.isspace()' >>> timeit.timeit('if len(" ".strip()) == 0: pass') 0.15294511600222904 >>> timeit.timeit('if " ".isspace(): pass') 0.09413968399894657 >>> timeit.timeit('if len(" abc".strip()) == 0: pass') 0.2023209120015963 >>> timeit.timeit('if " abc".isspace(): pass') 0.09571301700270851 In other words, it's always a win to not use len(), when you don't actually want to check the length.
* Warn when directory numbers are non-unique.Elliott Sales de Andrade2017-04-291-0/+7
|
* Shorten detect_tests_to_run.Elliott Sales de Andrade2017-04-291-21/+24
| | | | | Remove some duplication with a list comprehension, and invert conditions instead of long ternary statements.
* tests: Move appveyor platform workaround to run_tests.pyNirbheek Chauhan2017-04-091-15/+0
| | | | This is also needed for the unit tests
* unit tests: Fix running specific targets with MSBuildNirbheek Chauhan2017-04-091-10/+13
| | | | | | /t:targetname syntax doesn't work, but running the vcxproj does work Also use the Backend enum everywhere.
* run_project_tests: Clean on backends that can't installNirbheek Chauhan2017-04-091-46/+34
| | | | | | | | Also sets more groundwork for running unit tests with backends other that Ninja. Transferring global state to executors is totally broken in Python 3.4 so just serialize all the commands.
* project tests: Add a new BuildStep called validateNirbheek Chauhan2017-04-091-1/+2
|
* run_project_tests: Clean-up backend detection a bitNirbheek Chauhan2017-04-091-36/+28
| | | | | Set a global variable that has it so other places can use it, and error out on unknown backends
* tests: Factor out common code to run_testsNirbheek Chauhan2017-04-091-24/+13
| | | | | | And use generic build/clean/test/install commands in the unit tests, just like project tests. This sets the groundwork for running the unit tests with all backends.
* Ignore missing .pdb files when not using MSVSJon Turney2017-04-061-0/+3
| | | | This fixes 'test cases/windows/1 basic' on Cygwin
* Don't run framework tests on CygwinJon Turney2017-04-061-1/+1
|
* Run test cases/windows/ tests on CygwinJon Turney2017-04-061-1/+1
| | | | | Also, always run 'test cases/windows/5 resources' on Cygwin since it can handle args containing spaces correctly.
* Use '.exe' extension for executables for CygwinJon Turney2017-04-061-1/+1
| | | | Use '.exe' extension for executables for Cygwin when building and installing
* Use correct shared library naming for CygwinJon Turney2017-04-061-7/+14
| | | | Use correct shared library naming for Cygwin when building and installing
* project tests: Don't look for PDB files on MinGW/GCCNirbheek Chauhan2017-03-281-1/+2
|
* project tests: DummyExecutor for MSYS2 and OpenBSDNirbheek Chauhan2017-03-281-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added and tested on MSYS2/MinGW which doesn't implement the required semaphore locks in the multiprocessing module: Traceback (most recent call last): File "C:/msys64/mingw64/lib/python3.5\multiprocessing\synchronize.py", line 29, in <module> from _multiprocessing import SemLock, sem_unlink ImportError: cannot import name 'sem_unlink' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "run_project_tests.py", line 560, in <module> (passing_tests, failing_tests, skipped_tests) = run_tests(all_tests, 'meson-test-run', options.extra_args) File "run_project_tests.py", line 406, in run_tests executor = conc.ProcessPoolExecutor(max_workers=num_workers) File "F:/msys64/mingw64/lib/python3.5\concurrent\futures\process.py", line 390, in __init__ EXTRA_QUEUED_CALLS) File "F:/msys64/mingw64/lib/python3.5\multiprocessing\context.py", line 101, in Queue return Queue(maxsize, ctx=self.get_context()) File "F:/msys64/mingw64/lib/python3.5\multiprocessing\queues.py", line 42, in __init__ self._rlock = ctx.Lock() File "F:/msys64/mingw64/lib/python3.5\multiprocessing\context.py", line 65, in Lock from .synchronize import Lock File "F:/msys64/mingw64/lib/python3.5\multiprocessing\synchronize.py", line 34, 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. See also: https://bugs.python.org/issue3770 https://github.com/mesonbuild/meson/issues/1323 According to 3770, the same problem also exists on OpenBSD, so this will potentially also be useful there.
* project tests: Print meson log instead of stdout for configure failuresNirbheek Chauhan2017-03-141-17/+33
|
* tests/windows: Tests for #1444Nirbheek Chauhan2017-03-031-0/+3
| | | | Check that pdb files are installed
* vs: Fix running of tests to use mesontest.pyNirbheek Chauhan2017-01-281-9/+39
| | | | | | | | Back in November when this broke, we didn't notice because our tests are run in-process, so we don't check that `msbuild RUN_TESTS.vcxproj` and `ninja test` actually work. Now we do.
* No longer require a binary called python3 on Windows. The default name is ↵Jussi Pakkanen2017-01-231-0/+2
| | | | "python".
* cleanup: Remove redundant parenthesesMike Sinkovsky2017-01-181-5/+5
|
* style: [E251] unexpected spaces around keyword / parameter equalsMike Sinkovsky2017-01-111-1/+1
|
* style: [E301] expected 1 blank line, found 0Mike Sinkovsky2017-01-111-0/+2
|
* We only need Ninja 1.5.x for the core codeNirbheek Chauhan2017-01-091-1/+2
| | | | | | | This change helps us run on older distros such as Ubuntu LTS which is very lazy in updating even non-core and stable packages such as Ninja. Ninja 1.6.x is only needed for running the tests.