Hash :
b930b9d3
Author :
Date :
2021-09-08T09:08:28
Capture/Replay: Remove redundant "capture" from label old: trex_200_capture_context1_frame001.cpp new: trex_200_context1_frame001.cpp The 'capture' word wasn't really adding any useful information. Take it out so the filenames are a bit shorter. Bug: angleproject:5133 Change-Id: Ibd7d47df2aa1f24a641c5d5b2a6dd14d6ce240e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3149370 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
# 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.
import("../../../gni/angle.gni")
declare_args() {
# Determines if we build the capture_replay_tests. Off by default.
angle_build_capture_replay_tests = false
# Set the trace directory. Default is traces
angle_capture_replay_test_trace_dir = "traces"
angle_capture_replay_composite_file_id = 1
}
if (angle_build_capture_replay_tests) {
assert(angle_with_capture_by_default, "Must build with capture by default.")
angle_trace_fixture("angle_capture_replay_tests_fixture") {
gl_header = "angle_trace_gl.h"
public_deps = [
"$angle_root:libEGL",
"$angle_root/util:angle_util",
]
}
_dir = angle_capture_replay_test_trace_dir
# Build each trace into a module. Use a short name to work around file path limits on Windows.
# TODO(jmadill): Merge this config with restricted traces. http://anglebug.com/5133
_test_names_file = "test_names_${angle_capture_replay_composite_file_id}.json"
_test_names_json = read_file("$_dir/$_test_names_file", "json")
_trace_counter = 1
_traces = []
foreach(_trace, _test_names_json.traces) {
_trace_json_path = "$_dir/$_trace.json"
# This extra empty step is needed to prevent GN from warning on reassignment.
_trace_data = {
}
_trace_data = read_file(_trace_json_path, "json")
_ctx = _trace_data.WindowSurfaceContextID
_target = "cr_trace_${_trace_counter}"
_trace_counter += 1
angle_trace(_target) {
trace_prefix = "$_dir/${_trace}_context${_ctx}"
sources = rebase_path(_trace_data.TraceFiles, ".", _dir)
data = []
fixture = ":angle_capture_replay_tests_fixture"
output_name = _trace
}
_traces += [ ":${_target}" ]
}
angle_executable("capture_replay_tests") {
testonly = true
sources = [ "CaptureReplayTests.cpp" ]
data = [ "$_dir/$_test_names_file" ]
deps = [
":angle_capture_replay_tests_fixture",
"$angle_root:angle_common",
"$angle_root:angle_compression",
"$angle_root/util:angle_frame_capture_test_utils",
] + _traces
configs += [
"$angle_root:library_name_config",
"$angle_root:libANGLE_config",
]
defines = []
if ((is_linux || is_chromeos) && !is_component_build) {
# Set rpath to find shared libs in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
suppressed_configs += [ "$angle_root:constructor_and_destructor_warnings" ]
# Disable optimization to avoid optimizing huge files.
_trace_folder_relative_path = "./" + angle_capture_replay_test_trace_dir
_data_path = rebase_path(_trace_folder_relative_path, root_out_dir)
defines = [
"ANGLE_CAPTURE_REPLAY_TEST_DATA_DIR=\"${_data_path}\"",
"ANGLE_CAPTURE_REPLAY_TEST_NAMES_PATH=\"${_data_path}/${_test_names_file}\"",
"ANGLE_REPLAY_EXPORT=",
]
include_dirs = [ "." ]
}
} else {
group("capture_replay_tests") {
}
}