diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-12-28 22:08:23 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-12-28 22:08:23 +0200 |
commit | b161e64d7decfabf42c32d3cf67170bbc1ebf49b (patch) | |
tree | 7403fa5a4522b7a4dcd1239a8b059baa09f2d813 /meson_test.py | |
parent | 90447738bb63133ad49e370198910b740c362922 (diff) | |
download | meson-b161e64d7decfabf42c32d3cf67170bbc1ebf49b.zip meson-b161e64d7decfabf42c32d3cf67170bbc1ebf49b.tar.gz meson-b161e64d7decfabf42c32d3cf67170bbc1ebf49b.tar.bz2 |
Print message when no tests are defined.
Diffstat (limited to 'meson_test.py')
-rwxr-xr-x | meson_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meson_test.py b/meson_test.py index 00f2836..556b32e 100755 --- a/meson_test.py +++ b/meson_test.py @@ -134,13 +134,16 @@ def run_tests(options, datafilename): jsonlogfile = open(jsonlogfilename, 'w') logfile.write('Log of Meson test suite run on %s.\n\n' % datetime.datetime.now().isoformat()) tests = pickle.load(open(datafilename, 'rb')) + if len(tests) == 0: + print('No tests defined.') + return numlen = len('%d' % len(tests)) varname = 'MESON_TESTTHREADS' if varname in os.environ: try: num_workers = int(os.environ[varname]) except ValueError: - write_log('Invalid value in %s, using 1 thread.' % varname) + print('Invalid value in %s, using 1 thread.' % varname) num_workers = 1 else: num_workers = multiprocessing.cpu_count() |