1# Copyright 2014 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/python.gni") 6import("//testing/test.gni") 7 8# Used by linux-gcc-rel to ensure gcc doesn't choke on clang-only flags. 9if (!is_clang) { 10 executable("empty_main") { 11 sources = [ "empty_main.cc" ] 12 13 # The bot should only check that an empty file builds fine with gcc. 14 # There's no need to check that libc++ builds with a (possibly very old) 15 # version of gcc. 16 # No need to remove "//build/config/compiler:runtime_library" from configs 17 # (to remove its subconfig "//build/config/c++:runtime_library") since 18 # empty_main.cc does not include any headers. 19 no_default_deps = true 20 } 21} 22 23# Targets needed for isolate script to execute. 24group("test_scripts_shared") { 25 data_deps = [ 26 # Used for reporting test results to RDB. 27 "//build/util:test_results", 28 ] 29 30 data = [ 31 "//testing/test_env.py", 32 "//testing/xvfb.py", 33 "//testing/scripts/common.py", 34 ] 35} 36 37script_test("test_env_py_unittests") { 38 script = "//testing/scripts/run_isolated_script_test.py" 39 args = [ 40 "@WrappedPath(" + 41 rebase_path("//testing/test_env_unittest.py", root_build_dir) + ")", 42 "--script-type=bare", 43 ] 44 data = [ 45 "//testing/test_env_test_script.py", 46 "//testing/test_env_unittest.py", 47 "//testing/test_env_user_script.py", 48 ] 49 data_deps = [ ":test_scripts_shared" ] 50} 51 52script_test("xvfb_py_unittests") { 53 script = "//testing/scripts/run_isolated_script_test.py" 54 args = [ 55 "@WrappedPath(" + 56 rebase_path("//testing/xvfb_unittest.py", root_build_dir) + ")", 57 "--script-type=bare", 58 ] 59 data = [ 60 "//testing/xvfb_test_script.py", 61 "//testing/xvfb_unittest.py", 62 ] 63 data_deps = [ ":test_scripts_shared" ] 64} 65 66group("run_perf_test") { 67 data = [ 68 "//testing/scripts/common.py", 69 "//testing/scripts/run_performance_tests.py", 70 "//tools/perf/generate_legacy_perf_dashboard_json.py", 71 "//tools/perf/core/__init__.py", 72 "//tools/perf/core/path_util.py", 73 "//tools/perf/core/results_merger.py", 74 ] 75 76 data_deps = [ 77 ":test_scripts_shared", 78 "//third_party/catapult/tracing:convert_chart_json", 79 ] 80 81 if (is_android) { 82 # Required when running with bundles (to run "bundletool"). 83 data_deps += [ "//third_party/jdk:java_data" ] 84 } 85} 86 87group("pytype_dependencies") { 88 data = [ 89 "//build/util/lib/results/", 90 "//testing/pytype_common/", 91 ] 92} 93 94group("testing_pytype") { 95 data = [ 96 "//testing/run_pytype.py", 97 98 "//testing/unexpected_passes_common/", 99 "//testing/flake_suppressor_common/", 100 "//third_party/blink/tools/", 101 "//third_party/catapult/third_party/typ/", 102 ] 103 104 data_deps = [ ":pytype_dependencies" ] 105} 106 107group("fuchsia_pytype") { 108 testonly = true 109 data = [ 110 "//build/fuchsia/test/", 111 "//build/util/lib/common/", 112 ] 113 data_deps = [ ":pytype_dependencies" ] 114} 115 116python_library("run_isolated_script_test") { 117 testonly = true 118 pydeps_file = "//testing/scripts/run_isolated_script_test.pydeps" 119 data = [ "//.vpython3" ] 120} 121