blob: d26b621621988340ac379f9dcf404454dace2681 [file] [log] [blame]
# Copyright 2018 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/testing/environments.gni")
import("//topaz/runtime/dart/dart_fuchsia_test.gni")
import("//topaz/runtime/flutter_runner/flutter_app.gni")
# The main app.
flutter_app("driver_example_mod") {
package_name = "driver_example_mod"
main_dart = "lib/main.dart"
meta = [
{
path = rebase_path("meta/driver_example_mod.cmx")
dest = "driver_example_mod.cmx"
},
]
# This creates a flutter_driver enabled binary that will enable extensions for
# testing when run in an environment along with TestRunner.
flutter_driver_extendable = true
sources = [
"src/driver_example_model.dart",
"src/handlers/root_intent_handler.dart",
]
deps = [
"//third_party/dart-pkg/git/flutter/packages/flutter",
"//topaz/public/dart/fuchsia_modular",
"//topaz/public/dart/fuchsia_services",
"//topaz/public/lib/app/dart",
"//topaz/public/lib/widgets/dart",
]
}
# Example of a flutter driver target test. This can be run on the Fuchsia
# device using fx run-test. The target application must be available on the
# machine.
dart_fuchsia_test("driver_example_mod_tests") {
deps = [
"//sdk/fidl/fuchsia.sys",
"//third_party/dart-pkg/git/flutter/packages/flutter_driver",
"//third_party/dart-pkg/pub/test",
"//topaz/public/dart/fuchsia_services",
]
meta = [
{
path = rebase_path("meta/driver_example_mod_tests.cmx")
dest = "driver_example_mod_tests.cmx"
},
]
environments = []
# Flutter driver is only available in debug builds, so don't try to run in
# release CI/CQ.
if (is_debug) {
environments += [
nuc_env,
vim2_env,
]
}
}