diff --git a/src/compiler/glsl/tests/lower_jumps/create_test_cases.py b/src/compiler/glsl/tests/lower_jumps/create_test_cases.py index 3be1079bc14..defff2ed34f 100644 --- a/src/compiler/glsl/tests/lower_jumps/create_test_cases.py +++ b/src/compiler/glsl/tests/lower_jumps/create_test_cases.py @@ -21,6 +21,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import argparse import os import os.path import re @@ -30,6 +31,7 @@ import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # For access to sexps.py, which is in parent dir from sexps import * +outdir = "." def make_test_case(f_name, ret_type, body): """Create a simple optimization test case consisting of a single function with the given name, return type, and body. @@ -289,14 +291,14 @@ def create_test_case(doc_string, input_sexp, expected_sexp, test_name, pull_out_jumps, lower_sub_return, lower_main_return, lower_continue, lower_break)) args = ['../../glsl_test', 'optpass', '--quiet', '--input-ir', optimization] - test_file = '{0}.opt_test'.format(test_name) + test_file = os.path.join(outdir, '{0}.opt_test'.format(test_name)) with open(test_file, 'w') as f: f.write('#!/usr/bin/env bash\n#\n# This file was generated by create_test_cases.py.\n#\n') f.write(doc_string) f.write('{0} <