120 return 1 |
120 return 1 |
121 |
121 |
122 if is_pyscript: |
122 if is_pyscript: |
123 script = os.path.abspath(os.path.join('..', *os.path.split(program))) |
123 script = os.path.abspath(os.path.join('..', *os.path.split(program))) |
124 argv = [self.env['PYTHON'], script] + arguments |
124 argv = [self.env['PYTHON'], script] + arguments |
125 wutils.run_argv(argv, cwd=trace_output_path) |
125 try: |
126 else: |
126 wutils.run_argv(argv, cwd=trace_output_path) |
127 wutils.run_program(program, |
127 except Utils.WafError, ex: |
128 command_template=wutils.get_command_template(self.env, arguments), |
128 print >> sys.stderr, ex |
129 cwd=trace_output_path) |
129 return 1 |
|
130 else: |
|
131 try: |
|
132 wutils.run_program(program, |
|
133 command_template=wutils.get_command_template(self.env, arguments), |
|
134 cwd=trace_output_path) |
|
135 except Utils.WafError, ex: |
|
136 print >> sys.stderr, ex |
|
137 return 1 |
130 |
138 |
131 if Options.options.verbose: |
139 if Options.options.verbose: |
132 #diffCmd = "diff traces " + refTestDirName + " | head" |
140 #diffCmd = "diff traces " + refTestDirName + " | head" |
133 diffCmd = subprocess.Popen([self.env['DIFF'], trace_output_path, reference_traces_path], |
141 diffCmd = subprocess.Popen([self.env['DIFF'], trace_output_path, reference_traces_path], |
134 stdout=subprocess.PIPE) |
142 stdout=subprocess.PIPE) |
152 |
160 |
153 def run_reference_generate(self, trace_output_path, program, arguments, is_pyscript): |
161 def run_reference_generate(self, trace_output_path, program, arguments, is_pyscript): |
154 if is_pyscript: |
162 if is_pyscript: |
155 script = os.path.abspath(os.path.join('..', *os.path.split(program))) |
163 script = os.path.abspath(os.path.join('..', *os.path.split(program))) |
156 argv = [self.env['PYTHON'], script] + arguments |
164 argv = [self.env['PYTHON'], script] + arguments |
157 retval = wutils.run_argv(argv, cwd=trace_output_path) |
165 try: |
158 else: |
166 retval = wutils.run_argv(argv, cwd=trace_output_path) |
159 retval = wutils.run_program(program, |
167 except Utils.WafError, ex: |
160 command_template=wutils.get_command_template(self.env, arguments), |
168 print >> sys.stderr, ex |
161 cwd=trace_output_path) |
169 return 1 |
|
170 else: |
|
171 try: |
|
172 retval = wutils.run_program(program, |
|
173 command_template=wutils.get_command_template(self.env, arguments), |
|
174 cwd=trace_output_path) |
|
175 except Utils.WafError, ex: |
|
176 print >> sys.stderr, ex |
|
177 return 1 |
162 return retval |
178 return retval |
163 |
179 |
164 |
180 |
165 class regression_test_collector_task(Task.TaskBase): |
181 class regression_test_collector_task(Task.TaskBase): |
166 after = 'regression_test_task' |
182 after = 'regression_test_task' |