| # Copyright 2020 The ANGLE Project Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # This include iterates through a list of tests and rebases the files so they |
| # can be consumed by tests/BUILD.gn for use with TracePerfTest.cpp. |
| |
| import("../../../../gni/angle.gni") |
| |
| # TODO: anglebug.com/4496 |
| # Temporarily limit the data uploaded to a single trace to get the bots going |
| _tests = [ "trex_200" ] |
| |
| angle_trace_perf_sources = [ "perf_tests/TracePerfTest.cpp" ] |
| |
| angle_trace_perf_defines = [] |
| angle_trace_perf_data = [] |
| |
| foreach(_test, _tests) { |
| _test_dir = "${_test}" |
| _test_ctx = "${_test_dir}/${_test}_capture_context1" |
| |
| # Similar to capture replay sample, use the file index for sources |
| angle_trace_perf_sources += |
| rebase_path(read_file("${_test_ctx}_files.txt", "list lines"), |
| ".", |
| "perf_tests/restricted_traces/${_test_dir}") + |
| [ |
| "perf_tests/restricted_traces/${_test_ctx}.cpp", |
| "perf_tests/restricted_traces/${_test_ctx}.h", |
| ] |
| |
| if (is_android) { |
| _test_data_path = "/sdcard/chromium_tests_root/third_party/angle/src/tests/perf_tests/restricted_traces/${_test}" |
| } else { |
| _test_data_path = rebase_path("${_test_dir}", root_out_dir) |
| } |
| |
| angle_trace_perf_defines += |
| [ "ANGLE_TRACE_DATA_DIR_${_test}=\"${_test_data_path}\"" ] |
| |
| angle_trace_perf_data += [ "perf_tests/restricted_traces/${_test_dir}/${_test}_capture_context1.angledata.gz" ] |
| } |