diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-11-25 23:29:06 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-11-25 23:29:06 +0200 |
| commit | 26873801bcc74a6739eee1cf0e1c20207c588fff (patch) | |
| tree | 63dce1229bec1b7bdd9a0cdb60e21f7d49d2d682 /run_tests.py | |
| parent | 3cbe9d32fa8cf7a92cf3bad2821a204e8cf357e6 (diff) | |
| download | meson-26873801bcc74a6739eee1cf0e1c20207c588fff.tar.gz | |
Can define benchmarks and run them.
Diffstat (limited to 'run_tests.py')
| -rwxr-xr-x | run_tests.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/run_tests.py b/run_tests.py index f6a6a8137..e84d6100a 100755 --- a/run_tests.py +++ b/run_tests.py @@ -21,7 +21,7 @@ import sys import environment import mesonlib import mlog -import meson, meson_test +import meson, meson_test, meson_benchmark import argparse import xml.etree.ElementTree as ET import time @@ -87,7 +87,7 @@ def setup_commands(backend): compile_commands = [ninja_command, '-v'] else: compile_commands = [ninja_command] - test_commands = [ninja_command, 'test'] + test_commands = [ninja_command, 'test', 'benchmark'] install_commands = [ninja_command, 'install'] def platform_fix_filename(fname): @@ -165,11 +165,12 @@ def run_test_inprocess(testdir): sys.stderr = mystderr = StringIO() old_cwd = os.getcwd() os.chdir(testdir) - returncode = meson_test.run(['meson-private/meson_test_setup.dat']) + returncode_test = meson_test.run(['meson-private/meson_test_setup.dat']) + returncode_benchmark = meson_benchmark.run(['meson-private/meson_benchmark_setup.dat']) sys.stdout = old_stdout sys.stderr = old_stderr os.chdir(old_cwd) - return (returncode, mystdout.getvalue(), mystderr.getvalue()) + return (max(returncode_test, returncode_benchmark), mystdout.getvalue(), mystderr.getvalue()) def run_test(testdir, extra_args, should_succeed): |
