[Mesa-dev] [PATCH v2 0/4] glsl/tests: remove generated files

Connor Abbott cwabbott0 at gmail.com
Tue May 27 18:23:01 PDT 2014


While trying to modify the lower_jumps unit tests to account for my SSA
changes, I realized that the tests were not in sync with the file that
generated them. There were two problems:

-The *.expected files all had the same number of digits after the
decimal place (6) whereas the *.out files had 1 digit in "0.0" and 6
digits in "1.000000" when printing constants, which led to failures due
to diffs like:

-       ((if (expression bool > (var_ref b) (constant float (0.000000)))
+       ((if (expression bool > (var_ref b) (constant float (0.0)))


-Loops were incorrect in the input files.

This series fixes both problems, and then removes the generated tests so
that stuff like this won't happen again.

v2: actually generate the test files

Connor Abbott (4):
  glsl: be more consistent about printing constants
  glsl/tests/lower_jumps: fix generated sexpr's for loops
  glsl/tests: call create_test_cases.py in optimization-test
  glsl/tests: remove generated tests from the repo

 src/glsl/ir_print_visitor.cpp                      |  2 +-
 src/glsl/tests/lower_jumps/.gitignore              |  2 ++
 src/glsl/tests/lower_jumps/create_test_cases.py    |  2 +-
 src/glsl/tests/lower_jumps/lower_breaks_1.opt_test | 13 ----------
 .../lower_jumps/lower_breaks_1.opt_test.expected   |  5 ----
 src/glsl/tests/lower_jumps/lower_breaks_2.opt_test | 15 -----------
 .../lower_jumps/lower_breaks_2.opt_test.expected   |  7 ------
 src/glsl/tests/lower_jumps/lower_breaks_3.opt_test | 17 -------------
 .../lower_jumps/lower_breaks_3.opt_test.expected   |  8 ------
 src/glsl/tests/lower_jumps/lower_breaks_4.opt_test | 15 -----------
 .../lower_jumps/lower_breaks_4.opt_test.expected   |  7 ------
 src/glsl/tests/lower_jumps/lower_breaks_5.opt_test | 16 ------------
 .../lower_jumps/lower_breaks_5.opt_test.expected   |  7 ------
 src/glsl/tests/lower_jumps/lower_breaks_6.opt_test | 29 ----------------------
 .../lower_jumps/lower_breaks_6.opt_test.expected   | 29 ----------------------
 .../lower_guarded_conditional_break.opt_test       | 21 ----------------
 ...wer_guarded_conditional_break.opt_test.expected | 20 ---------------
 .../lower_jumps/lower_pulled_out_jump.opt_test     | 28 ---------------------
 .../lower_pulled_out_jump.opt_test.expected        | 25 -------------------
 .../tests/lower_jumps/lower_returns_1.opt_test     | 12 ---------
 .../lower_jumps/lower_returns_1.opt_test.expected  |  4 ---
 .../tests/lower_jumps/lower_returns_2.opt_test     | 13 ----------
 .../lower_jumps/lower_returns_2.opt_test.expected  |  5 ----
 .../tests/lower_jumps/lower_returns_3.opt_test     | 20 ---------------
 .../lower_jumps/lower_returns_3.opt_test.expected  | 21 ----------------
 .../tests/lower_jumps/lower_returns_4.opt_test     | 14 -----------
 .../lower_jumps/lower_returns_4.opt_test.expected  | 16 ------------
 .../lower_jumps/lower_returns_main_false.opt_test  | 17 -------------
 .../lower_returns_main_false.opt_test.expected     |  8 ------
 .../lower_jumps/lower_returns_main_true.opt_test   | 17 -------------
 .../lower_returns_main_true.opt_test.expected      | 13 ----------
 .../lower_jumps/lower_returns_sub_false.opt_test   | 16 ------------
 .../lower_returns_sub_false.opt_test.expected      |  8 ------
 .../lower_jumps/lower_returns_sub_true.opt_test    | 16 ------------
 .../lower_returns_sub_true.opt_test.expected       | 13 ----------
 .../lower_jumps/lower_unified_returns.opt_test     | 26 -------------------
 .../lower_unified_returns.opt_test.expected        | 21 ----------------
 .../remove_continue_at_end_of_loop.opt_test        | 13 ----------
 ...emove_continue_at_end_of_loop.opt_test.expected |  5 ----
 ..._non_void_at_end_of_loop_lower_nothing.opt_test | 16 ------------
 ..._at_end_of_loop_lower_nothing.opt_test.expected |  8 ------
 ...n_non_void_at_end_of_loop_lower_return.opt_test | 16 ------------
 ...d_at_end_of_loop_lower_return.opt_test.expected | 19 --------------
 ..._at_end_of_loop_lower_return_and_break.opt_test | 16 ------------
 ...f_loop_lower_return_and_break.opt_test.expected | 19 --------------
 ...turn_void_at_end_of_loop_lower_nothing.opt_test | 14 -----------
 ..._at_end_of_loop_lower_nothing.opt_test.expected |  6 -----
 ...eturn_void_at_end_of_loop_lower_return.opt_test | 14 -----------
 ...d_at_end_of_loop_lower_return.opt_test.expected | 11 --------
 ..._at_end_of_loop_lower_return_and_break.opt_test | 14 -----------
 ...f_loop_lower_return_and_break.opt_test.expected | 11 --------
 src/glsl/tests/optimization-test                   |  8 ++++++
 52 files changed, 12 insertions(+), 706 deletions(-)
 delete mode 100755 src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_breaks_2.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_breaks_3.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_breaks_5.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_breaks_6.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_1.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_1.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_2.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_2.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_3.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_4.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/lower_unified_returns.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test.expected
 delete mode 100755 src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
 delete mode 100644 src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test.expected

-- 
1.8.3.1



More information about the mesa-dev mailing list