def test_bad_returncode(): """ Result is 'Fail' when returncode is not 0 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. """ test = GleanTest('basic') test.result['returncode'] = 1 test.interpret_result() assert test.result['result'] == 'fail', "Result should have been fail"
def test_globalParams_assignment(): """ Test to ensure that GleanTest.globalParams are correctly assigned Specifically this tests for a bug where globalParams only affected instances of GleanTest created after globalParams were set, so changing the globalParams value had unexpected results. If this test passes the GleanTest.command attributes will be the same in the instance created before the globalParams assignment and the one created after. A failure means the that globalParams are not being added to tests initialized before it is set. """ test1 = GleanTest('basic') GleanTest.globalParams = ['--quick'] test2 = GleanTest('basic') assert test1.command == test2.command
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"
def test_initialize_gleantest(): """ Test that GleanTest initilizes """ test = GleanTest('name') assert test
# # Minimal tests to check whether the installation is working # from framework.profile import TestProfile from framework.gleantest import GleanTest __all__ = ['profile'] profile = TestProfile() profile.tests['glean/basic'] = GleanTest('basic') profile.tests['glean/readPixSanity'] = GleanTest('readPixSanity')