MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / visualize_results

Method visualize_results

test/parallel_testsuite.py:219–238  ·  view source on GitHub ↗
(self, results)

Source from the content-addressed store, hash-verified

217 return sorted(self, key=test_key, reverse=True)
218
219 def visualize_results(self, results):
220 assert EMTEST_VISUALIZE
221 # Sort the results back into alphabetical order. Running the tests in
222 # parallel causes mis-orderings, this makes the results more readable.
223 results = sorted(results, key=lambda res: str(res.test))
224
225 # shared data structures are hard in the python multi-processing world, so
226 # use a file to share the flaky test information across test processes.
227 flaky_tests = utils.read_file(common.flaky_tests_log_filename).split() if os.path.isfile(common.flaky_tests_log_filename) else []
228 # Extract only the test short names
229 flaky_tests = [x.split('.')[-1] for x in flaky_tests]
230
231 for r in results:
232 r.log_test_run_for_visualization(flaky_tests)
233
234 # Generate the parallel test run visualization
235 emprofile.create_profiling_graph(utils.path_from_root('out/graph'))
236 # Cleanup temp files that were used for the visualization
237 emprofile.delete_profiler_logs()
238 utils.delete_file(common.flaky_tests_log_filename)
239
240
241class BufferedParallelTestResult(BufferingMixin, unittest.TestResult):

Callers 1

runMethod · 0.95

Calls 2

splitMethod · 0.80

Tested by

no test coverage detected