diff options
author | Justin Husted <sigstop@gmail.com> | 2019-11-18 13:51:31 -0800 |
---|---|---|
committer | Justin Husted <sigstop@gmail.com> | 2019-11-18 13:51:31 -0800 |
commit | 049dd7b79e94c0d4a9a290ff6c435401a22b5549 (patch) | |
tree | ac647e363cb1a0c39734f3c5aba5d43610624b4f /tests/test_fixture.py | |
parent | a00998c4cdf834ebce00bedabd2804fe5376a63c (diff) |
Make valgrind optional in tests.
Add an option to disable valgrind in the test suite, via the variable:
BCACHEFS_TEST_USE_VALGRIND=no
Additionally, note how to run tests in parallel in the INSTALL documentation.
Signed-off-by: Justin Husted <sigstop@gmail.com>
Diffstat (limited to 'tests/test_fixture.py')
-rw-r--r-- | tests/test_fixture.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_fixture.py b/tests/test_fixture.py index 74a896ba..d8d3819e 100644 --- a/tests/test_fixture.py +++ b/tests/test_fixture.py @@ -29,26 +29,32 @@ def test_segfault(): ret = util.run(helper, 'segfault') assert ret.returncode == -signal.SIGSEGV +@pytest.mark.skipif(not util.ENABLE_VALGRIND, reason="no valgrind") def test_check(): with pytest.raises(subprocess.CalledProcessError): ret = util.run(helper, 'abort', check=True) +@pytest.mark.skipif(not util.ENABLE_VALGRIND, reason="no valgrind") def test_leak(): with pytest.raises(util.ValgrindFailedError): ret = util.run(helper, 'leak', valgrind=True) +@pytest.mark.skipif(not util.ENABLE_VALGRIND, reason="no valgrind") def test_undefined(): with pytest.raises(util.ValgrindFailedError): ret = util.run(helper, 'undefined', valgrind=True) +@pytest.mark.skipif(not util.ENABLE_VALGRIND, reason="no valgrind") def test_undefined_branch(): with pytest.raises(util.ValgrindFailedError): ret = util.run(helper, 'undefined_branch', valgrind=True) +@pytest.mark.skipif(not util.ENABLE_VALGRIND, reason="no valgrind") def test_read_after_free(): with pytest.raises(util.ValgrindFailedError): ret = util.run(helper, 'read_after_free', valgrind=True) +@pytest.mark.skipif(not util.ENABLE_VALGRIND, reason="no valgrind") def test_write_after_free(): with pytest.raises(util.ValgrindFailedError): ret = util.run(helper, 'write_after_free', valgrind=True) |