BUILD.gn 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 2021 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/android/android_nocompile.gni")
  5. import("missing_symbol_test.gni")
  6. import("nocompile_gn/nocompile_sources.gni")
  7. group("android_nocompile_tests") {
  8. testonly = true
  9. # No-compile tests use an output directory dedicated to no-compile tests.
  10. # All test suites use targets in nocompile_gn/BUILD.gn in order to share the
  11. # same target output directory and avoid running 'gn gen' for each
  12. # android_nocompile_test_suite().
  13. deps = [
  14. ":android_lint_tests",
  15. ":android_lookup_dep_tests",
  16. ]
  17. }
  18. android_nocompile_test_suite("android_lint_tests") {
  19. # Depend on lint script so that the action is re-run whenever the script is modified.
  20. pydeps = [ "//build/android/gyp/lint.pydeps" ]
  21. tests = [
  22. {
  23. target = "nocompile_gn:default_locale_lint_test"
  24. nocompile_sources =
  25. rebase_path(default_locale_lint_test_nocompile_sources,
  26. "",
  27. "nocompile_gn")
  28. expected_compile_output_regex = "Warning:.*DefaultLocale"
  29. },
  30. {
  31. target = "nocompile_gn:new_api_lint_test"
  32. nocompile_sources =
  33. rebase_path(new_api_lint_test_nocompile_sources, "", "nocompile_gn")
  34. expected_compile_output_regex = "Error:.*NewApi"
  35. },
  36. ]
  37. }
  38. android_nocompile_test_suite("android_lookup_dep_tests") {
  39. sources =
  40. [ rebase_path(missing_symbol_generated_importer_template_nocompile_source,
  41. "",
  42. "nocompile_gn") ]
  43. tests = [
  44. {
  45. target = "nocompile_gn:import_child_missing_symbol_test_java"
  46. nocompile_sources =
  47. rebase_path(import_child_missing_symbol_test_nocompile_sources,
  48. "",
  49. "nocompile_gn")
  50. 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\""
  51. },
  52. {
  53. target = "nocompile_gn:import_parent_missing_symbol_test_java"
  54. nocompile_sources = []
  55. 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\""
  56. },
  57. {
  58. target = "nocompile_gn:import_turbine_missing_symbol_test_java"
  59. nocompile_sources =
  60. rebase_path(import_turbine_missing_symbol_test_nocompile_sources,
  61. "",
  62. "nocompile_gn")
  63. 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\""
  64. },
  65. {
  66. target = "nocompile_gn:prebuilt_missing_symbol_test_java"
  67. nocompile_sources = []
  68. 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\""
  69. },
  70. {
  71. target = "nocompile_gn:cpp_template_missing_symbol_test_java"
  72. nocompile_sources = []
  73. 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\""
  74. },
  75. ]
  76. }