• Xiyuan Xia's avatar
    cros: Run gtest perf test on device · 36607112
    Xiyuan Xia authored
    - Add --trace-dir=PATH to chromeos/test_runner.py
      When present, test_runner script passes the switch with
      device local path (e.g. /tmp) to gtest to generate trace
      file on device and collects the trace files back to PATH
      on host afterwards.
    - Update run_gtest_benchmark.py to map the trace file path
      in the test result json collected by test_runner script
      so that processor scripts could find and computer metrics
      from the trace file.
    
    Example usage:
    
    For developers:
      tools/perf/run_gtest_benchmark.py
        out_${SDK_BOARD}/Release/bin/run_interactive_ui_tests
        --device=$DUT
        --gtest_filter=All/OverviewAnimationsTest.EnterExit/7
        --output-dir=/tmp/perf_output
        --output-format=histograms
        --dbus-stub --stop-ui
    
    For perf bots:
      testing/scripts/run_performance_tests.py
        --isolated-script-test-output=/tmp/perf_output/output.json
        --non-telemetry=true
        --use-gtest-benchmark-script
        --gtest-benchmark-name=interactive_ui_tests
        tools/perf/run_gtest_benchmark.py
          out_${SDK_BOARD}/Release/bin/run_interactive_ui_tests
          --device=$DUT
          --output-format=histograms
          --dbus-stub --stop-ui
    
    Bug: 945711
    Change-Id: Ia6911921b8354d7763be96c30a8877c9d598f103
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1974587
    Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
    Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#726402}
    36607112
test_runner.py 32.8 KB