blob: 788d7a6bcfdb8160f15b6346af58c664c674ccf9 [file] [log] [blame]
# Copyright 2017 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.
# We follow these conventions for the organization of the package here:
#
# 1. All the binaries used in tests are run through a device_runner invocation
# configured in modular_tests.json. It usually does not ever make sense to
# run a test binary directly, especially not as a test. Therefore, all
# binaries are deployed in the subdirectory tests/modular_tests instead of
# under tests/ directly, so that they are not run automatically by roller
# scripts. Instead, only the run_modular_tests.sh script is present in
# tests/, which then invokes the test runner, which in turn invokes all the
# test binaries in the right configuration.
#
# 2. The component is named with a prefix that tells the test it belongs to,
# followed by "_test", optionally followed by a name component indicating its
# function if there are multiple components of the same type in a single
# test, followed a suffix indicating the component type. This way, all
# components belonging to the same test are lexicographically sorted
# together.
#
# 3. Common components shared between tests are named after their function
# followed by a suffix indicating the component type.
#
# 4. The suffix that indicates the component type (i.e. the primary service
# provided by the component) is:
#
# - _module -- Module
# - _agent -- Agent
# - _user_shell -- UserShell
# - _device_shell -- DeviceShell
# - _story_shell -- StoryShell
# - _service -- FIDL interfaces
#
# 5. The main sources of the components are named like the binaries they create.
import("//build/package.gni")
package("modular_tests") {
testonly = true
system_image = true
deps = [
":modular_tests.json",
"chain",
"clipboard",
"common",
"component_context",
"context_link",
"dev_token_manager",
"embed_shell",
"embed_watcher",
"last_focus_time",
"link_context_entities",
"link_data",
"link_update",
"parent_child",
"queue_persistence",
"remote",
"story_importance",
"story_update",
"suggestion",
"trigger",
"user_shell",
]
binaries = [
{
name = "dev_token_manager"
},
]
tests = [
{
name = "chain_test_module"
dest = "modular_tests/chain_test_module"
},
{
name = "clipboard_test_module"
dest = "modular_tests/clipboard_test_module"
},
{
name = "common_done_module"
dest = "modular_tests/common_done_module"
},
{
name = "common_null_module"
dest = "modular_tests/common_null_module"
},
{
name = "component_context_test_module"
dest = "modular_tests/component_context_test_module"
},
{
name = "component_context_test_one_agent"
dest = "modular_tests/component_context_test_one_agent"
},
{
name = "component_context_test_two_agent"
dest = "modular_tests/component_context_test_two_agent"
},
{
name = "component_context_test_unstoppable_agent"
dest = "modular_tests/component_context_test_unstoppable_agent"
},
{
name = "context_link_test_module"
dest = "modular_tests/context_link_test_module"
},
{
name = "context_link_test_user_shell"
dest = "modular_tests/context_link_test_user_shell"
},
{
name = "embed_shell_test_child_module"
dest = "modular_tests/embed_shell_test_child_module"
},
{
name = "embed_shell_test_parent_module"
dest = "modular_tests/embed_shell_test_parent_module"
},
{
name = "embed_shell_test_story_shell"
dest = "modular_tests/embed_shell_test_story_shell"
},
{
name = "embed_watcher_test_child_module"
dest = "modular_tests/embed_watcher_test_child_module"
},
{
name = "embed_watcher_test_parent_module"
dest = "modular_tests/embed_watcher_test_parent_module"
},
{
name = "embed_watcher_test_story_shell"
dest = "modular_tests/embed_watcher_test_story_shell"
},
{
name = "last_focus_time_test_user_shell"
dest = "modular_tests/last_focus_time_test_user_shell"
},
{
name = "link_context_entities_test_module"
dest = "modular_tests/link_context_entities_test_module"
},
{
name = "link_context_entities_test_user_shell"
dest = "modular_tests/link_context_entities_test_user_shell"
},
{
name = "link_data_test_user_shell"
dest = "modular_tests/link_data_test_user_shell"
},
{
name = "link_update_test_user_shell"
dest = "modular_tests/link_update_test_user_shell"
},
{
name = "modular_tests.json"
dest = "modular_tests/modular_tests.json"
},
{
name = "parent_child_test_child_module"
dest = "modular_tests/parent_child_test_child_module"
},
{
name = "parent_child_test_parent_module"
dest = "modular_tests/parent_child_test_parent_module"
},
{
name = "queue_persistence_test_agent"
dest = "modular_tests/queue_persistence_test_agent"
},
{
name = "queue_persistence_test_module"
dest = "modular_tests/queue_persistence_test_module"
},
{
name = "remote_test_module"
dest = "modular_tests/remote_test_module"
},
{
name = "story_importance_test_user_shell"
dest = "modular_tests/story_importance_test_user_shell"
},
{
name = "story_update_test_user_shell"
dest = "modular_tests/story_update_test_user_shell"
},
{
name = "suggestion_test_module"
dest = "modular_tests/suggestion_test_module"
},
{
name = "suggestion_test_user_shell"
dest = "modular_tests/suggestion_test_user_shell"
},
{
name = "trigger_test_agent"
dest = "modular_tests/trigger_test_agent"
},
{
name = "trigger_test_module"
dest = "modular_tests/trigger_test_module"
},
{
name = "user_shell_test_user_shell"
dest = "modular_tests/user_shell_test_user_shell"
},
]
}
copy("modular_tests.json") {
sources = [
"modular_tests.json",
]
outputs = [
"$root_out_dir/modular_tests.json",
]
}