aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-02-20 14:56:45 -0500
committerGitHub <noreply@github.com>2017-02-20 14:56:45 -0500
commitd6614ba811e18e1b0f0d0cab502a7c770ee499c8 (patch)
tree7799f8abaa453c7df72c59fcf96f2324f13adbef /run_unittests.py
parent98af711ca6f166bacf2b9c6e697026f5b323827a (diff)
parentf90f17b25089ac173929c955e35956d19f3a5e2a (diff)
downloadmeson-d6614ba811e18e1b0f0d0cab502a7c770ee499c8.zip
meson-d6614ba811e18e1b0f0d0cab502a7c770ee499c8.tar.gz
meson-d6614ba811e18e1b0f0d0cab502a7c770ee499c8.tar.bz2
Merge pull request #1402 from centricular/test-setup-fixes
Various fixes to how mesontest handles test setups.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 8c8844d..16ff354 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -602,9 +602,11 @@ class AllPlatformTests(BasePlatformTests):
testdir = os.path.join(self.unit_test_dir, '2 testsetups')
self.init(testdir)
self.build()
+ # Run tests without setup
self.run_tests()
with open(os.path.join(self.logdir, 'testlog.txt')) as f:
basic_log = f.read()
+ # Run buggy test with setup that has env that will make it fail
self.assertRaises(subprocess.CalledProcessError,
self._run, self.mtest_command + ['--setup=valgrind'])
with open(os.path.join(self.logdir, 'testlog-valgrind.txt')) as f:
@@ -613,6 +615,14 @@ class AllPlatformTests(BasePlatformTests):
self.assertFalse('Memcheck' in basic_log)
self.assertTrue('TEST_ENV is set' in vg_log)
self.assertTrue('Memcheck' in vg_log)
+ # Run buggy test with setup without env that will pass
+ self._run(self.mtest_command + ['--setup=wrapper'])
+ # Setup with no properties works
+ self._run(self.mtest_command + ['--setup=empty'])
+ # Setup with only env works
+ self._run(self.mtest_command + ['--setup=onlyenv'])
+ # Setup with only a timeout works
+ self._run(self.mtest_command + ['--setup=timeout'])
def assertFailedTestCount(self, failure_count, command):
try: