blob: 2ee30493aa718a9082a3bac032742a0d3a012567 [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.
import("//build/package.gni")
# We follow the conventions of ../BUILD.gn for the organization of the sources,
# build rules, and packages, with the following modifications:
#
# 1. All the binaries used in tests are run through a basemgr invocation
# configured in the .tspec file of the benchmark subdirectory.
#
# 2. The component binary as well as its package is named with a prefix that
# tells the benchmark it belongs to, followed by "_benchmark", followed by
# more name components as described in ../BUILD.gn. The tspec file is also
# named like the benchmark, followed by "_benchmark", followed by ".tspec".
#
# 3. [unchanged]
#
# 4. [unchanged]
#
# 5. [unchanged]
#
#
# HOW TO ADD A NEW BENCHMARK
#
# 1. Add a new subdirectory with rules for the test components (session shells,
# modules, agents). Define all test components as executable_package()s.
#
# 2. Add the newly defined packages for all test components to
# //peridot/packages/benchmarks/modular.
#
# 3. Add a tspec file for the benchmark in the newly added subdirectory.
#
# 4. Add an entry for the tspec file to the resources = field of the
# modular_benchmarks build rule.
#
# 5. Add an entry for the test to run_modular_benchmarks.sh.
package("modular_benchmarks") {
testonly = true
binaries = [
{
name = rebase_path("run_modular_benchmarks.sh")
dest = "run_modular_benchmarks.sh"
},
]
resources = [
{
path = rebase_path("story/modular_benchmark_story.tspec")
dest = "modular_benchmark_story.tspec"
},
]
}
package("peridot_benchmarks") {
testonly = true
binaries = [
{
name = rebase_path("benchmarks.sh")
dest = "benchmarks.sh"
},
]
}