]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - tests/test_fixture.py
Make valgrind optional in tests.
[bcachefs-tools-debian] / tests / test_fixture.py
index 74a896bace4122597c8007f6662dceba317420f8..d8d3819e814427473b4f171a75c09f79d1650312 100644 (file)
@@ -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)