Edit

kc3-lang/angle/src/tests/capture_replay_tests/BUILD.gn

Branch :

  • Show log

    Commit

  • Author : Manh Nguyen
    Date : 2020-07-31 10:52:21
    Hash : 6aed2832
    Message : Batch capture run + change how results are logged Before, the run stages of tests in a batch were run separately by multiple subprocesses. Now the run stages of tests in a batch are batched together and run by a single subprocess. Changes how results are logged. Tests in a batch are logged together. Within a batch, tests that fail at the same stage are also logged together. Bug: angleproject:4817 Change-Id: Ie3f992c081de914f1f1f521bec2d72f06ccca238 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2331738 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>

  • src/tests/capture_replay_tests/BUILD.gn
  • # 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) {
      # 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")
      angle_executable("capture_replay_tests") {
        testonly = true
        _trace_folder_relative_path = "./" + angle_capture_replay_test_trace_dir
        _trace_sources =
            generated_sources + [
              "CompositeTests${angle_capture_replay_composite_file_id}.h",
              "CompositeTests${angle_capture_replay_composite_file_id}.cpp",
            ]
        sources = rebase_path(_trace_sources, ".", _trace_folder_relative_path) +
                  [ "CaptureReplayTests.cpp" ]
        deps = [
          "$angle_root:angle_common",
          "$angle_root:angle_compression",
          "$angle_root:libEGL_with_capture_static",
          "$angle_root/util:angle_util_static",
        ]
        configs += [
          "$angle_root:library_name_config",
          "$angle_root:libANGLE_config",
        ]
    
        suppressed_configs += [ "$angle_root:constructor_and_destructor_warnings" ]
    
        # Disable optimization to avoid optimizing huge files.
        if (!is_debug) {
          suppressed_configs += [ "//build/config/compiler:default_optimization" ]
          configs += [ "//build/config/compiler:no_optimize" ]
        }
        _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",
        ]
        include_dirs = [ "." ]
      }
    } else {
      group("capture_replay_tests") {
      }
    }