summaryrefslogtreecommitdiff
path: root/mesontest.py
Commit message (Collapse)AuthorAgeFilesLines
* Turn deprecated commands into errors.Jussi Pakkanen2018-03-141-4/+1
|
* Write deprecation warnings to stderr.Jussi Pakkanen2017-08-021-2/+3
|
* Print deprecation warnings on old style commands.Jussi Pakkanen2017-08-021-3/+2
|
* Turned mesontest into on internal module.Jussi Pakkanen2017-08-021-610/+6
|
* mesontest: logfilename may be undefinedDima Krasner2017-07-231-0/+1
| | | | Signed-off-by: Dima Krasner <dima@dimakrasner.com>
* Close files reliably.Jussi Pakkanen2017-07-181-54/+52
|
* Print real error if mesontest used on invalid directory.Elliott Sales de Andrade2017-07-151-9/+23
|
* Removed some dead code. Closes #1949.Jussi Pakkanen2017-07-021-2/+0
|
* Don't rebuild tests during listing.Elliott Sales de Andrade2017-06-301-1/+1
| | | | `mesontest --list` doesn't need to rebuild tests.
* can't pass args to python3 shebangRob Doolittle2017-05-261-1/+1
|
* mesontest: use unbuffered IORob Doolittle2017-05-241-1/+1
| | | | This helps when running mesontest as part of CI.
* Rearrange trys to avoid possible undefined vars.Elliott Sales de Andrade2017-05-171-4/+4
|
* Remove unused variables.Elliott Sales de Andrade2017-05-171-10/+10
|
* 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.
* Colorize terminal output of mesontest. Closes #1593.Jussi Pakkanen2017-04-101-1/+11
|
* Check that requested executables are available. Closes #1591.Jussi Pakkanen2017-04-091-0/+10
|
* Use '.exe' extension for executables for CygwinJon Turney2017-04-061-1/+5
| | | | Use '.exe' extension for executables for Cygwin when building and installing
* Use extra_paths on CygwinJon Turney2017-04-061-1/+1
| | | | | | | | Cygwin executables are still loaded by the Windows PE loader, so PATH needs to include any extra directories where required DLLs can be found. Cygwin uses a unix style ':'-separated PATH. os.pathsep is used correctly on extra_paths in meson_exe.py, but not in mesontest.py
* mesontest: Support passing test arguments at runtimeNirbheek Chauhan2017-02-231-2/+5
| | | | | | This is especially useful with the glib testing framework where you can select which tests to run within a single test executable by pasing `-p /some/test/path`
* mesontest: Fix --repeat with --gdbNirbheek Chauhan2017-02-231-3/+3
| | | | | | | | It would add --args to `wrap` repeatedly for each re-run, resulting in gdb erroring out with `--args: No such file or directory.` Also don't make --gdb and --wrapper mutually exclusive. Sometimes people want to run under a wrapper *and* run it under gdb.
* mesontest: Use shlex.split for parsing the wrapperNirbheek Chauhan2017-02-231-5/+3
| | | | | Allows people to pass arguments with spaces in them. Do this using argparse itself instead of doing an isinstance later.
* Merge pull request #1402 from centricular/test-setup-fixesJussi Pakkanen2017-02-201-7/+14
|\ | | | | Various fixes to how mesontest handles test setups.
| * mesontest: Use setup timeout multiplier if not specifiedNirbheek Chauhan2017-02-191-1/+3
| | | | | | | | | | | | | | The setup's timeout multiplier will always be set, and it will default to 1.0, so just use that. Without this, the setup's timeout multiplier was always ignored.
| * mesontest: Use test setup name in logfilesNirbheek Chauhan2017-02-191-6/+9
| | | | | | | | | | | | | | | | | | | | When using a setup, use the setup name as the namebase for the logfile instead of the wrapper. The wrapper may not be set, or it may be shared between test setups. Also don't try to use the wrapper if it's an empty list. Closes https://github.com/mesonbuild/meson/issues/1371
| * mesontest: Don't run tests if no tests were selectedNirbheek Chauhan2017-02-191-0/+2
| | | | | | | | | | | | | | | | The output is very confusing otherwise. Before it said 'No suitable tests defined' and then showed a list of tests that passed/failed. Now it will just say 'No suitable tests defined' and exit.
* | Run regen before loading test data because it might have changed.Jussi Pakkanen2017-02-191-25/+23
|/
* mesontest: Set MALLOC_PERTURB_ to a random valueNirbheek Chauhan2017-02-191-0/+9
| | | | | | This is useful enough that we can enable this for everyone. If people really don't want this, they can pass MALLOC_PERTURB_=0 in the environment or in the test.
* Merge pull request #1335 from tp-m/test-custom-target-used-in-test-cmdJussi Pakkanen2017-01-281-2/+2
|\ | | | | tests: check custom target output is created before being used in a t…
| * vs: Fix running of tests to use mesontest.pyNirbheek Chauhan2017-01-281-2/+2
| | | | | | | | | | | | | | | | 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.
* | [mesontest] Implement a quiet option.Hemmo Nieminen2017-01-281-1/+8
|/ | | | | Implement a quiet option that can be used to hide OK messages for successful tests to better highlight the failing ones.
* mesontest: Don't add '.' at the end of some printsNirbheek Chauhan2017-01-261-2/+2
| | | | | Makes it difficult to copy the filename/datetime by double-clicking since that includes the '.' at the end.
* mesontest: Don't overwrite test status on timeoutNirbheek Chauhan2017-01-261-1/+2
| | | | Earlier it would mark tests as "FAIL" even if it skipped.
* cleanup: @staticmethodMike Sinkovsky2017-01-181-0/+2
|
* cleanup: Replace assignment with augmented assignmentMike Sinkovsky2017-01-181-1/+1
|
* cleanup: Remove redundant parenthesesMike Sinkovsky2017-01-181-4/+4
|
* More readable total statistics.Jussi Pakkanen2017-01-151-2/+6
|
* mesontest: Improve test suite selection.Hemmo Nieminen2017-01-121-24/+64
| | | | | Suite option can now be given to specify in more detail which tests should be run.
* style: [E1**] IndentationMike Sinkovsky2017-01-111-2/+2
|
* mesontest: Print test stats even if in verbose mode.Hemmo Nieminen2017-01-031-10/+4
|
* mesontest: Unify testing behaviour between the test target and mesontest.Hemmo Nieminen2017-01-031-108/+130
| | | | Also add a test summary to the end of the test output.
* mesontest: Show the test command in truncated test logs.Hemmo Nieminen2017-01-031-3/+3
|
* mesontest: Remove excess newline and whitespace from test logs.Hemmo Nieminen2017-01-031-3/+1
|
* Can put external programs to test suite exe wrappers directly.Jussi Pakkanen2017-01-021-1/+1
|
* Can set envvars in test setups.Jussi Pakkanen2017-01-021-1/+7
|
* Can specify test setups and run them with mesontest.Jussi Pakkanen2017-01-021-2/+30
|
* style: fix E124 violationsIgor Gnatenko2017-01-011-2/+1
| | | | | | E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E128 violationsIgor Gnatenko2017-01-011-2/+2
| | | | | | E128: continuation line under-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E222 violationsIgor Gnatenko2017-01-011-1/+1
| | | | | | E222: multiple spaces after operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E226 violationsIgor Gnatenko2017-01-011-5/+5
| | | | | | E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E225 violationsIgor Gnatenko2017-01-011-2/+2
| | | | | | E225: missing whitespace around operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>