[Piglit] [PATCH 00/49] Port python framework tests from nose to pytest

Dylan Baker dylan at pnwbakers.com
Fri Jul 29 18:38:46 UTC 2016


This series is a massive cleanup of the python testing framework, and
some bug fixes that go along with that.

The biggest change is the port from nose to pytest. So, why bother to
port from nose? A couple of good reasons, nose is unmaintained, all bugs
remain opened and unfixed, some of them are bugs that affect our suite.
The second reason is that nose doesn't provide a lot of helpers, which
means I've rolled a lot of framework to make nose useful, and that has
been a source of bugs.

The second change is that we now have a defined schema for the JSON
output, this removes a bunch of tests, and provides much better testing
of the output.

This also fixes a number of bugs found in piglit as a result of the
better testing.

Dylan Baker (49):
  travis: combine noaccel and accel profiles
  generators: use main function in gen_shader_image_load_store_tests
  Generators: gen_shader_image_load_store_tests: remove duplicate tests
  Generators/genclbuiltins: Use open as context manager to ensure files
    are closed
  Generators/cl_store: Move makedirs into main
  .gitignore: update
  unittests: Port generator tests to pytest.
  unittests: port generators/test_glsl to pytest
  unittests: port generators/test_types to pytest
  unittests: port status module tests to py.test
  unittests: port grouptools_tests to pytest
  unittests: port core_tests to pytest
  unittests: port exceptions_tests to pytest
  unittests: port gtest_test to pytest
  unittests: port opencv_tests to pytest
  unittests: port gleantest_tests to py.test
  unittests: port options_tests to py.test
  unittests: port tests for glsl_parser_test to py.test
  unittests: port shader_test tests to py.test
  unittests: port dmesg tests to pytest
  unittests: port deqp tests to pytest
  unittests: port profile tests to pytest
  unittests: port results tests to pytest
  unittests: port piglit_test to pytest
  unittests: port log tests to pylint
  unittests: port base_tests to pytest
  unittests: port compressed_backend_tests to pytest
  unittests: port opengl_tests to pytest
  unittests: port summary_common tests to pytest
  unittests: port summary_html_tests to pytest
  unittests: port summary_console_tests to pytest
  unittests: port monitoring tests to pytest
  unittests: port test_lists to pytest
  unittests: port oglconform_tests to pytest
  unittests: port integration_tests to pytest
  unittests/suites/test_integration: Add tests for remaining suites
  unittests: delete run_parser_tests
  unittests: port json_backend_tests to pytest
  unittests: port backend_tests to pytest
  unittests: Port junit_backends_tests to pytest
  unittests: port json_results_update_tests to pytest
  unittests: replace json_tests with a schema and validator
  framework: remove unused nose bits
  framework: fix two bugs in status
  framework/options: Fix values for _Options.concurrent
  framework: Fix valgrind mixin.
  framework/test/glsl_parser_test: Don't error on blank C comments
  framework/test/glsl_parser_test: Add ARB_ESx to command line when
    needed
  README: update requirements for testing the framework

 .gitignore                                         |    4 +-
 .travis.yml                                        |   12 +-
 README                                             |   24 +-
 framework/dmesg.py                                 |    9 +
 framework/options.py                               |    4 +-
 framework/status.py                                |    8 +-
 framework/test/base.py                             |    4 +-
 framework/test/glsl_parser_test.py                 |    6 +-
 generated_tests/gen_cl_store_tests.py              |    3 +-
 generated_tests/gen_extensions_defined.py          |    2 +-
 .../gen_shader_image_load_store_tests.py           | 1059 ++++++++++----------
 generated_tests/genclbuiltins.py                   |   80 +-
 tox.ini                                            |   31 +-
 unittests/backends_tests.py                        |  234 -----
 unittests/base_tests.py                            |  438 --------
 unittests/compressed_backend_tests.py              |  302 ------
 unittests/core_tests.py                            |  289 ------
 unittests/deqp_tests.py                            |  282 ------
 unittests/dmesg_tests.py                           |  337 -------
 unittests/framework/__init__.py                    |    0
 unittests/framework/backends/__init__.py           |    0
 .../{ => framework/backends}/schema/junit-7.xsd    |    0
 unittests/framework/backends/schema/piglit-8.json  |  120 +++
 unittests/framework/backends/shared.py             |  153 +++
 unittests/framework/backends/test_compression.py   |  265 +++++
 unittests/framework/backends/test_json.py          |  290 ++++++
 unittests/framework/backends/test_json_update.py   |  867 ++++++++++++++++
 unittests/framework/backends/test_junit.py         |  255 +++++
 unittests/framework/backends/test_package.py       |  203 ++++
 .../{summary_html_tests.py => framework/skip.py}   |   44 +-
 unittests/framework/summary/__init__.py            |    0
 unittests/framework/summary/test_common.py         |  447 +++++++++
 .../summary/test_console.py}                       |  135 +--
 .../summary/test_html.py}                          |   21 +-
 unittests/framework/test/__init__.py               |    0
 unittests/framework/test/test_base.py              |  409 ++++++++
 unittests/framework/test/test_deqp.py              |  296 ++++++
 .../test/test_gleantest.py}                        |   67 +-
 unittests/framework/test/test_glsl_parser_test.py  |  483 +++++++++
 .../test/test_gtest.py}                            |   15 +-
 .../test/test_opencv.py}                           |    8 +-
 unittests/framework/test/test_opengl.py            |  556 ++++++++++
 unittests/framework/test/test_piglit_test.py       |  164 +++
 unittests/framework/test/test_shader_test.py       |  194 ++++
 unittests/framework/test_core.py                   |  271 +++++
 unittests/framework/test_dmesg.py                  |  374 +++++++
 .../test_exceptions.py}                            |   11 +-
 unittests/framework/test_grouptools.py             |  132 +++
 unittests/framework/test_log.py                    |  193 ++++
 unittests/framework/test_monitoring.py             |  178 ++++
 unittests/framework/test_options.py                |  221 ++++
 unittests/framework/test_profile.py                |  370 +++++++
 unittests/framework/test_results.py                |  648 ++++++++++++
 unittests/framework/test_status.py                 |  139 +++
 unittests/{gtest_tests.py => framework/utils.py}   |   32 +-
 unittests/generators/test_generators.py            |  129 ++-
 unittests/generators/test_glsl.py                  |  319 ++----
 unittests/generators/test_types.py                 |   33 +-
 unittests/glsl_parser_test_tests.py                |  525 ----------
 unittests/grouptools_tests.py                      |  130 ---
 unittests/json_backend_tests.py                    |  324 ------
 unittests/json_results_update_tests.py             |  815 ---------------
 unittests/json_tests.py                            |  164 ---
 unittests/junit_backends_tests.py                  |  331 ------
 unittests/log_tests.py                             |  171 ----
 unittests/monitoring_tests.py                      |  186 ----
 unittests/oglconform_tests.py                      |  160 ---
 unittests/opengl_tests.py                          |  532 ----------
 unittests/options_tests.py                         |  208 ----
 unittests/piglit_test_tests.py                     |  140 ---
 unittests/profile_tests.py                         |  376 -------
 unittests/results_tests.py                         |  729 --------------
 unittests/run_parser_tests.py                      |  264 -----
 unittests/shader_test_tests.py                     |  205 ----
 unittests/status_tests.py                          |  300 ------
 unittests/suites/__init__.py                       |    0
 .../test_integration.py}                           |   55 +-
 unittests/{test_lists.py => suites/test_native.py} |   48 +-
 unittests/suites/test_oglconform.py                |  163 +++
 unittests/summary_common_tests.py                  |  424 --------
 unittests/utils/__init__.py                        |    1 -
 unittests/utils/nose.py                            |  417 --------
 unittests/utils/piglit.py                          |  189 ----
 83 files changed, 8397 insertions(+), 9630 deletions(-)
 delete mode 100644 unittests/backends_tests.py
 delete mode 100644 unittests/base_tests.py
 delete mode 100644 unittests/compressed_backend_tests.py
 delete mode 100644 unittests/core_tests.py
 delete mode 100644 unittests/deqp_tests.py
 delete mode 100644 unittests/dmesg_tests.py
 create mode 100644 unittests/framework/__init__.py
 create mode 100644 unittests/framework/backends/__init__.py
 rename unittests/{ => framework/backends}/schema/junit-7.xsd (100%)
 create mode 100644 unittests/framework/backends/schema/piglit-8.json
 create mode 100644 unittests/framework/backends/shared.py
 create mode 100644 unittests/framework/backends/test_compression.py
 create mode 100644 unittests/framework/backends/test_json.py
 create mode 100644 unittests/framework/backends/test_json_update.py
 create mode 100644 unittests/framework/backends/test_junit.py
 create mode 100644 unittests/framework/backends/test_package.py
 copy unittests/{summary_html_tests.py => framework/skip.py} (61%)
 create mode 100644 unittests/framework/summary/__init__.py
 create mode 100644 unittests/framework/summary/test_common.py
 rename unittests/{summary_console_tests.py => framework/summary/test_console.py} (56%)
 rename unittests/{summary_html_tests.py => framework/summary/test_html.py} (73%)
 create mode 100644 unittests/framework/test/__init__.py
 create mode 100644 unittests/framework/test/test_base.py
 create mode 100644 unittests/framework/test/test_deqp.py
 rename unittests/{gleantest_tests.py => framework/test/test_gleantest.py} (70%)
 create mode 100644 unittests/framework/test/test_glsl_parser_test.py
 copy unittests/{gtest_tests.py => framework/test/test_gtest.py} (84%)
 rename unittests/{opencv_tests.py => framework/test/test_opencv.py} (89%)
 create mode 100644 unittests/framework/test/test_opengl.py
 create mode 100644 unittests/framework/test/test_piglit_test.py
 create mode 100644 unittests/framework/test/test_shader_test.py
 create mode 100644 unittests/framework/test_core.py
 create mode 100644 unittests/framework/test_dmesg.py
 rename unittests/{exceptions_tests.py => framework/test_exceptions.py} (89%)
 create mode 100644 unittests/framework/test_grouptools.py
 create mode 100644 unittests/framework/test_log.py
 create mode 100644 unittests/framework/test_monitoring.py
 create mode 100644 unittests/framework/test_options.py
 create mode 100644 unittests/framework/test_profile.py
 create mode 100644 unittests/framework/test_results.py
 create mode 100644 unittests/framework/test_status.py
 rename unittests/{gtest_tests.py => framework/utils.py} (68%)
 delete mode 100644 unittests/glsl_parser_test_tests.py
 delete mode 100644 unittests/grouptools_tests.py
 delete mode 100644 unittests/json_backend_tests.py
 delete mode 100644 unittests/json_results_update_tests.py
 delete mode 100644 unittests/json_tests.py
 delete mode 100644 unittests/junit_backends_tests.py
 delete mode 100644 unittests/log_tests.py
 delete mode 100644 unittests/monitoring_tests.py
 delete mode 100644 unittests/oglconform_tests.py
 delete mode 100644 unittests/opengl_tests.py
 delete mode 100644 unittests/options_tests.py
 delete mode 100644 unittests/piglit_test_tests.py
 delete mode 100644 unittests/profile_tests.py
 delete mode 100644 unittests/results_tests.py
 delete mode 100644 unittests/run_parser_tests.py
 delete mode 100644 unittests/shader_test_tests.py
 delete mode 100644 unittests/status_tests.py
 create mode 100644 unittests/suites/__init__.py
 rename unittests/{integration_tests.py => suites/test_integration.py} (76%)
 rename unittests/{test_lists.py => suites/test_native.py} (64%)
 create mode 100644 unittests/suites/test_oglconform.py
 delete mode 100644 unittests/summary_common_tests.py
 delete mode 100644 unittests/utils/__init__.py
 delete mode 100644 unittests/utils/nose.py
 delete mode 100644 unittests/utils/piglit.py

-- 
2.9.0



More information about the Piglit mailing list