blob: e09921f2f958719c06ef2672122dc48adf8a623b [file] [log] [blame]
# Copyright 2019 The Fuchsia 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("//build/dart/dart_tool.gni")
import("//build/dart/test.gni")
import("//build/testing/host_test_data.gni")
group("tests") {
testonly = true
deps = [
":fxtest_tests($host_toolchain)",
":test_runner_test($host_toolchain)",
]
}
## Production code
# Main executable target.
dart_tool("fxtest") {
package_name = "fxtest"
main_dart = "bin/main.dart"
deps = [ ":fxtest_lib" ]
}
# Library containing all production (non-test) code.
#
# Using a separate library lets us avoid using the implicit dart_library
# generated by dart_tool. Until dart_tool formally makes the generated
# dart_library part of its documented contract, using this explicit library
# prevents unexpected changes in dart_tool.
#
# Using dart_library separately also keeps sources_required on, which helps
# to prevent Dart files being added to the tree but not to sources.
dart_library("fxtest_lib") {
package_name = "fxtest"
sources = [
"analytics_reporter.dart",
"arg_parser.dart",
"checklist.dart",
"cmd.dart",
"cmd_cli.dart",
"command_tokens.dart",
"constants.dart",
"env_reader.dart",
"exceptions.dart",
"execution_handle.dart",
"exit_code.dart",
"fuchsia_locator.dart",
"fxtest.dart",
"matching/comparer.dart",
"matching/comparison_result.dart",
"matching/matching.dart",
"matching/single_test_matcher.dart",
"matching/test_attribute_matching.dart",
"output_buffer.dart",
"output_formatter.dart",
"package_url.dart",
"rebuilder.dart",
"start_process.dart",
"test_arguments.dart",
"test_bundle.dart",
"test_definition.dart",
"test_event.dart",
"test_names_collector.dart",
"test_runner.dart",
"tests_config.dart",
"tests_manifest_reader.dart",
]
deps = [
"//third_party/dart-pkg/pub/args",
"//third_party/dart-pkg/pub/async",
"//third_party/dart-pkg/pub/io",
"//third_party/dart-pkg/pub/meta",
"//third_party/dart-pkg/pub/path",
"//third_party/dart-pkg/pub/pedantic",
]
}
## Tests
dart_test("test_runner_test") {
sources = [
"mock_start_process.dart",
"test_runner_test.dart",
]
deps = [
":fxtest_lib",
"//third_party/dart-pkg/pub/pedantic",
"//third_party/dart-pkg/pub/test",
]
}
dart_test("fxtest_tests") {
sources = [
"args_test.dart",
"output_test.dart",
"parsing_test.dart",
"setup_test.dart",
"utils_test.dart",
]
deps = [
":fxtest_lib",
"//third_party/dart-pkg/pub/mockito",
"//third_party/dart-pkg/pub/test",
]
}