Specifically this adds initializer tests which would have exposed the bug in 90a256411.
Signed-off-by: Dylan Baker <[email protected]> --- framework/tests/exectest_test.py | 29 +++++++++++++++++++++++++++++ framework/tests/gleantest_tests.py | 7 ++++++- framework/tests/glsl_parser_tests.py | 29 +++++++++++++++++++++++++++++ framework/tests/gtest_tests.py | 30 ++++++++++++++++++++++++++++++ framework/tests/opencv_tests.py | 29 +++++++++++++++++++++++++++++ framework/tests/shader_test_tests.py | 29 +++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 framework/tests/exectest_test.py create mode 100644 framework/tests/glsl_parser_tests.py create mode 100644 framework/tests/gtest_tests.py create mode 100644 framework/tests/opencv_tests.py create mode 100644 framework/tests/shader_test_tests.py diff --git a/framework/tests/exectest_test.py b/framework/tests/exectest_test.py new file mode 100644 index 0000000..6c22a07 --- /dev/null +++ b/framework/tests/exectest_test.py @@ -0,0 +1,29 @@ +# Copyright (c) 2014 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Tests for the exectest module """ + +from framework.exectest import PlainExecTest + + +def test_initialize_plainexectest(): + """ Test that PlainExecTest initializes correctly """ + test = PlainExecTest('/bin/true') + assert test diff --git a/framework/tests/gleantest_tests.py b/framework/tests/gleantest_tests.py index ba2c3a5..a1c030a 100644 --- a/framework/tests/gleantest_tests.py +++ b/framework/tests/gleantest_tests.py @@ -18,12 +18,17 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. - """ Tests for the glean class. Requires Nose """ from framework.gleantest import GleanTest +def test_initialize_gleantest(): + """ Test that GleanTest initilizes """ + test = GleanTest('name') + assert test + + def test_globalParams_assignment(): """ Test to ensure that GleanTest.globalParams are correctly assigned diff --git a/framework/tests/glsl_parser_tests.py b/framework/tests/glsl_parser_tests.py new file mode 100644 index 0000000..309c0a1 --- /dev/null +++ b/framework/tests/glsl_parser_tests.py @@ -0,0 +1,29 @@ +# Copyright (c) 2014 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Module for testing glsl_parser_test """ + +from framework.glsl_parser_test import GLSLParserTest + + +def test_glslparser_initializer(): + """ Test that GLSLParserTest initializes """ + test = GLSLParserTest('spec/glsl-es-1.00/execution/sanity.shader_test') + assert test diff --git a/framework/tests/gtest_tests.py b/framework/tests/gtest_tests.py new file mode 100644 index 0000000..4f7a3f6 --- /dev/null +++ b/framework/tests/gtest_tests.py @@ -0,0 +1,30 @@ +# Copyright (c) 2014 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Module providing tests for gtest """ + + +from framework.gtest import GTest + + +def test_initialize_gtest(): + """ Test that GTest successfully initializes correctly """ + test = GTest('/bin/true') + assert test diff --git a/framework/tests/opencv_tests.py b/framework/tests/opencv_tests.py new file mode 100644 index 0000000..4658a9e --- /dev/null +++ b/framework/tests/opencv_tests.py @@ -0,0 +1,29 @@ +# Copyright (c) 2014 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Module for testing opencv """ + +from framework.opencv import OpenCVTest + + +def test_initialize_opencvtest(): + """ Test that opencvtest initializes correctly """ + test = OpenCVTest('test_prog', 'testname') + assert test diff --git a/framework/tests/shader_test_tests.py b/framework/tests/shader_test_tests.py new file mode 100644 index 0000000..c0ec7d9 --- /dev/null +++ b/framework/tests/shader_test_tests.py @@ -0,0 +1,29 @@ +# Copyright (c) 2014 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Module with tests for shader_test """ + +from framework.shader_test import ShaderTest + + +def test_initialize_shader_test(): + """ Test that ShaderTest initializes """ + test = ShaderTest(['loopfunc.shader_test']) + assert test -- 1.9.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
