1# Copyright 2021 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/android/android_nocompile.gni") 6import("missing_symbol_test.gni") 7import("nocompile_gn/nocompile_sources.gni") 8 9group("android_nocompile_tests") { 10 testonly = true 11 12 # No-compile tests use an output directory dedicated to no-compile tests. 13 # All test suites use targets in nocompile_gn/BUILD.gn in order to share the 14 # same target output directory and avoid running 'gn gen' for each 15 # android_nocompile_test_suite(). 16 deps = [ 17 ":android_lint_tests", 18 ":android_lookup_dep_tests", 19 ] 20} 21 22android_nocompile_test_suite("android_lint_tests") { 23 # Depend on lint script so that the action is re-run whenever the script is modified. 24 pydeps = [ "//build/android/gyp/lint.pydeps" ] 25 26 tests = [ 27 { 28 target = "nocompile_gn:default_locale_lint_test" 29 nocompile_sources = 30 rebase_path(default_locale_lint_test_nocompile_sources, 31 "", 32 "nocompile_gn") 33 expected_compile_output_regex = "Warning:.*DefaultLocale" 34 }, 35 { 36 target = "nocompile_gn:new_api_lint_test" 37 nocompile_sources = 38 rebase_path(new_api_lint_test_nocompile_sources, "", "nocompile_gn") 39 expected_compile_output_regex = "Error:.*NewApi" 40 }, 41 ] 42} 43 44android_nocompile_test_suite("android_lookup_dep_tests") { 45 sources = 46 [ rebase_path(missing_symbol_generated_importer_template_nocompile_source, 47 "", 48 "nocompile_gn") ] 49 50 tests = [ 51 { 52 target = "nocompile_gn:import_child_missing_symbol_test_java" 53 nocompile_sources = 54 rebase_path(import_child_missing_symbol_test_nocompile_sources, 55 "", 56 "nocompile_gn") 57 expected_compile_output_regex = "Hint: Try adding the following to //build/android/test/nocompile_gn:import_child_missing_symbol_test_java\n *\"//build/android/test/nocompile_gn:sub_b_java\"" 58 }, 59 { 60 target = "nocompile_gn:import_parent_missing_symbol_test_java" 61 nocompile_sources = [] 62 expected_compile_output_regex = "Hint: Try adding the following to //build/android/test/nocompile_gn:import_parent_missing_symbol_test_java\n *\"//build/android/test/nocompile_gn:b_java\"" 63 }, 64 { 65 target = "nocompile_gn:import_turbine_missing_symbol_test_java" 66 nocompile_sources = 67 rebase_path(import_turbine_missing_symbol_test_nocompile_sources, 68 "", 69 "nocompile_gn") 70 expected_compile_output_regex = "Hint: Try adding the following to //build/android/test/nocompile_gn:import_turbine_missing_symbol_test_java\n *\"//build/android/test/nocompile_gn:b_java\"" 71 }, 72 { 73 target = "nocompile_gn:prebuilt_missing_symbol_test_java" 74 nocompile_sources = [] 75 expected_compile_output_regex = "Hint: Try adding the following to //build/android/test/nocompile_gn:prebuilt_missing_symbol_test_java\n *\"//build/android/test/nocompile_gn:c_prebuilt_java\"" 76 }, 77 { 78 target = "nocompile_gn:cpp_template_missing_symbol_test_java" 79 nocompile_sources = [] 80 expected_compile_output_regex = "Hint: Try adding the following to //build/android/test/nocompile_gn:cpp_template_missing_symbol_test_java\n *\"//build/android/test/nocompile_gn:d_java\"" 81 }, 82 ] 83} 84