Hash :
78dde332
Author :
Date :
2021-03-29T17:31:52
Move restricted traces to CIPD. All traces are now stored as DEPS entries in CIPD. The auto-generation script generates the DEPS entries. Note that we don't include DEPS in the list of generated outputs to simplify other rollers. Also we update auto-generation to include full sources list to allow 'gn analyze' to work successfully. Usees a trace fixture for common code. This will enable a more compact trace without as much repeated code. We must land a set of re-trace traces to avoid breakage. Also includes a python script for uploading new traces to CIPD. The script first checks if traces are already present in the cloud, and if so it skips the upload. It will take a while to complete as the number of traces grows larger as it takes a few seconds per trace. The traces in this patch are also re-traced to use the common fixture code instead of including duplicated code in each trace. They now form a simple common interface and the autogenerated cpp is now simply a list of properties. I've also updated the capture/replay tests to use the simpler common entry point integration. There is less auto-generated glue code now. We now use a new serialized string query extension instead of calling directly into ANGLE's internals. Also includes a docs update. The capture/replay sample is broken and we'll need to update it in a follow-up CL. Also includes a few necessary fixes to the retracing script. Bug: angleproject:5811 Change-Id: I977bc6dc56843c8966377fc445ae97e91e17319a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797833 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@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
# 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",
]
}
# TODO (nguyenmh): http://anglebug.com/4758:
# turn angle_executable into angle_test when adding android support
import(
"${angle_capture_replay_test_trace_dir}/traces${angle_capture_replay_composite_file_id}.gni")
# Build each trace into a module. Use a short name to work around file path limits on Windows.
_trace_counter = 1
_traces = []
foreach(_trace_data, trace_data) {
_trace = _trace_data[0]
_target = "cr_trace_" + _trace_counter
_trace_counter += 1
angle_trace(_target) {
trace_name = _trace
trace_dir = angle_capture_replay_test_trace_dir
trace_ctx = _trace_data[1]
sources = _trace_data[2]
fixture = ":angle_capture_replay_tests_fixture"
output_name = _trace
}
_traces += [ ":${_target}" ]
}
angle_executable("capture_replay_tests") {
testonly = true
sources = [
"${angle_capture_replay_test_trace_dir}/CompositeTests${angle_capture_replay_composite_file_id}.cpp",
"${angle_capture_replay_test_trace_dir}/CompositeTests${angle_capture_replay_composite_file_id}.h",
"CaptureReplayTests.cpp",
]
deps = [
":angle_capture_replay_tests_fixture",
"$angle_root:angle_common",
"$angle_root:angle_compression",
] + _traces
configs += [
"$angle_root:library_name_config",
"$angle_root:libANGLE_config",
]
defines = []
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_COMPOSITE_TESTS_HEADER=" +
angle_capture_replay_test_trace_dir +
"/CompositeTests${angle_capture_replay_composite_file_id}.h",
"ANGLE_REPLAY_EXPORT=",
]
include_dirs = [ "." ]
}
} else {
group("capture_replay_tests") {
}
}