def test_bad_returncode(): """ If glean doesn't return zero it should be a fail Currently clean returns 127 if piglit can't find it's libs (LD_LIBRARY_PATH isn't set properly), and then marks such tests as pass, when they obviously are not. """ if not os.path.exists('bin'): raise SkipTest("This test requires a working, built version of piglit") # Clearing the environment should remove the piglit/lib from # LD_LIBRARY_PATH os.environ = {} test = GleanTest('basic') test.run() assert test.result['result'] == 'fail', "Result should have been fail"
def test_bad_returncode(): """ If glean doesn't return zero it should be a fail Currently clean returns 127 if piglit can't find it's libs (LD_LIBRARY_PATH isn't set properly), and then marks such tests as pass, when they obviously are not. """ if not os.path.exists("bin"): raise SkipTest("This test requires a working, built version of piglit") # Clearing the environment should remove the piglit/lib from # LD_LIBRARY_PATH os.environ = {} test = GleanTest("basic") test.run() assert test.result["result"] == "fail", "Result should have been fail"