Documentation ¶
Index ¶
- Variables
- type Args
- type Binary
- type CheckoutArtifact
- type DimensionSet
- type Environment
- type Image
- type ImageManifest
- type LogSettings
- type Modules
- func (m Modules) APIManifest() string
- func (m Modules) APIs() []string
- func (m Modules) ArgManifest() string
- func (m Modules) Args() Args
- func (m Modules) Binaries() []Binary
- func (m Modules) BinaryManifest() string
- func (m Modules) BuildDir() string
- func (m Modules) CheckoutArtifactManifest() string
- func (m Modules) CheckoutArtifacts() []CheckoutArtifact
- func (m Modules) ImageManifest() string
- func (m Modules) Images() []Image
- func (m Modules) PackageManifests() []string
- func (m Modules) PackageManifestsManifest() string
- func (m Modules) PlatformManifest() string
- func (m Modules) Platforms() []DimensionSet
- func (m Modules) PrebuiltBinaries() []PrebuiltBinaries
- func (m Modules) PrebuiltBinaryManifest() string
- func (m Modules) SDKArchives() []SDKArchive
- func (m Modules) SDKArchivesManifest() string
- func (m Modules) TestDurations() []TestDuration
- func (m Modules) TestDurationsManifest() string
- func (m Modules) TestManifest() string
- func (m Modules) TestSpecs() []TestSpec
- func (m Modules) ToolManifest() string
- func (m Modules) Tools() []Tool
- type PrebuiltBinaries
- type SDKArchive
- type Test
- type TestDuration
- type TestSpec
- type Tool
Constants ¶
This section is empty.
Variables ¶
var ( // ErrArgNotSet represents an arg not having been set in the build. ErrArgNotSet = errors.New("arg not set") )
var ( // ErrBuildIDNotFound is a sometimes expected error that a build ID was not found. ErrBuildIDNotFound = errors.New("build ID not found") )
Functions ¶
This section is empty.
Types ¶
type Binary ¶
type Binary struct { // CPU is the CPU architecture of the binary. CPU string `json:"cpu"` // OS is the operating system that the binary is for. OS string `json:"os"` // Environment is the toolchain environment name of what specific execution // this was built for, e.g. "user", "host", "guest". Environment string `json:"environment"` // Label is the GN label of the binary target. Label string `json:"label"` // Type is the type of the binary. Type string `json:"type"` // Debug is the path to the unstripped or separate debug file is. Debug string `json:"debug"` // Dist is the path to the stripped binary for deployment/execution. Dist string `json:"dist,omitempty"` // BuildIDFile is the path to a file containing the lowercase ASCII // hexadecimal representation of the ELF build ID. BuildIDFile string `json:"elf_build_id,omitempty"` // Breakpad is the path to the breakpad symbol file for the debug binary, if // present. Breakpad string `json:"breakpad,omitempty"` // GSYM is the path to the GSYM symbol file for the debug binary, if // present. GSYM string `json:"gsym,omitempty"` }
Binary represents a binary produced by the build.
func (Binary) ELFBuildID ¶
ELFBuildID returns the build ID associated to a given binary. If no associated ID can be found - and no error unexpected error was experienced - ErrBuildIDNotFound is returned. build.GetBuildID() differs from elflib.GetBuildIDs() in that that former more statically determines the ID from build metadata, while the latter derives it directly from the ELF's notes section.
type CheckoutArtifact ¶
type CheckoutArtifact struct { // Name is the canonical name of the artifact. Name string `json:"name"` // Path is the artifact, relative to the build directory. Path string `json:"path"` // Type is the shorthand for the type of the artifact. Type string `json:"type"` }
CheckoutArtifact represents an entry in a checkout artifact manifest.
type DimensionSet ¶
type DimensionSet struct { // DeviceType represents the class of device the test should run on. // This is a required field. DeviceType string `json:"device_type,omitempty"` // The OS to run the test on (e.g., "Linux" or "Mac"). Used for host-side testing. OS string `json:"os,omitempty"` // The CPU type that the test is meant to run on. CPU string `json:"cpu,omitempty"` // Testbed denotes a physical test device configuration to run a test on (e.g., multi-device set-ups or devices inside chambers for connectivity testing). Testbed string `json:"testbed,omitempty"` // Pool denotes the swarming pool to run a test in. Pool string `json:"pool,omitempty"` }
DimensionSet encapsulates the Swarming dimensions a test wishes to target.
type Environment ¶
type Environment struct { // Dimensions gives the Swarming dimensions a test wishes to target. Dimensions DimensionSet `json:"dimensions"` // Tags are keys given to an environment on which the testsharder may filter. Tags []string `json:"tags,omitempty"` // ServiceAccount gives a service account to attach to Swarming task. ServiceAccount string `json:"service_account,omitempty"` // Netboot tells whether to "netboot" instead of paving before running the tests. Netboot bool `json:"netboot,omitempty"` }
Environment describes the full environment a test requires. The GN environments specified by test authors in the Fuchsia source correspond directly to the Environment struct defined here.
type Image ¶
type Image struct { // Name is the canonical name of the image. Name string `json:"name"` // Path is the absolute path to the image. // Note: when unmarshaled from a manifest this entry actually gives the relative // location from the manifest's directory; we prepend that directory when loading. See // LoadImageModule() below. Path string `json:"path"` // Type is the shorthand for the type of the image (e.g., "zbi" or "blk"). Type string `json:"type"` // PaveArgs is the list of associated arguments to pass to the bootserver // when paving. PaveArgs []string `json:"bootserver_pave"` // PaveZedbootArgs is the list of associated arguments to pass to the bootserver // when paving zedboot PaveZedbootArgs []string `json:"bootserver_pave_zedboot"` // NetbootArgs is the list of associated arguments to pass to the bootserver // when netbooting. NetbootArgs []string `json:"bootserver_netboot"` }
Image represents an entry in an image manifest.
type ImageManifest ¶
type ImageManifest = []Image
ImageManifest is a JSON list of images produced by the Fuchsia build.
type LogSettings ¶
type LogSettings struct { // Max severity of logs produced by the test. MaxSeverity string `json:"max_severity,omitempty"` }
type Modules ¶
type Modules struct {
// contains filtered or unexported fields
}
Modules is a convenience interface for accessing the various build API modules associated with a build.
func NewModules ¶
NewModules returns a Modules associated with a given build directory.
func (Modules) APIManifest ¶
APIManifest returns the path to the manifest of build API modules present in the build.
func (Modules) ArgManifest ¶
ArgManifest returns the path to the manifest of GN args set in the build.
func (Modules) BinaryManifest ¶
BinaryManifest returns the path to the manifest of binaries in the build.
func (Modules) CheckoutArtifactManifest ¶
CheckoutArtifactManifest returns the path to the manifest of checkout artifacts in the build.
func (Modules) CheckoutArtifacts ¶
func (m Modules) CheckoutArtifacts() []CheckoutArtifact
CheckoutArtifacts returns the build API module of checkout artifacts.
func (Modules) ImageManifest ¶
ImageManifest returns the path to the manifest of images in the build.
func (Modules) PackageManifests ¶
PackageManifests returns a list of paths to all the universe package manifests.
func (Modules) PackageManifestsManifest ¶
PackageManifestsManifest returns the path to the manifest of universe package manifests in the build.
func (Modules) PlatformManifest ¶
PlatformManifest returns the path to the manifest of available test platforms.
func (Modules) Platforms ¶
func (m Modules) Platforms() []DimensionSet
Platforms returns the build API module of available platforms to test on.
func (Modules) PrebuiltBinaries ¶
func (m Modules) PrebuiltBinaries() []PrebuiltBinaries
PrebuiltBinaries returns the build API module of prebuilt packages registered in the build.
func (Modules) PrebuiltBinaryManifest ¶
PrebuiltBinaryManifest returns the path to the manifest of prebuilt packages.
func (Modules) SDKArchives ¶
func (m Modules) SDKArchives() []SDKArchive
SDKArchives returns the build API module of SDK archives.
func (Modules) SDKArchivesManifest ¶
SDKArchivesManifest returns the path to the manifest of SDK archives.
func (Modules) TestDurations ¶
func (m Modules) TestDurations() []TestDuration
TestDurations returns the build API module of test duration data.
func (Modules) TestDurationsManifest ¶
TestDurationsManifest returns the path to the durations file.
func (Modules) TestManifest ¶
TestManifest returns the path to the manifest of tests in the build.
func (Modules) ToolManifest ¶
ToolManifest returns the path to the manifest of tools in the build.
type PrebuiltBinaries ¶
type PrebuiltBinaries struct { // Name is the name of the set of prebuilt binaries. Name string `json:"package_name"` // DebugArchive is an optional pointer to an archive of debug binaries // relating to the prebuilt package. DebugArchive string `json:"debug_archive,omitempty"` // Manifest is the path to a manifest of the associated debug binaries produced // by the build and in the format of binaries.json. Manifest string `json:"manifest"` }
PrebuiltBinaries represents a set of prebuilt binaries.
type SDKArchive ¶
type SDKArchive struct { // Name is the name of the SDK. Name string `json:"name"` // Label is the GN label of the associated `sdk` target. It does not include // the toolchain. Label string `json:"label"` // Path is the relative path to the archive within the build directory. Path string `json:"path"` // OS is the operating system which the SDK is built for. A value of "fuchsia" // indicates the SDK is host OS agnostic. OS string `json:"os"` // CPU is the CPU architecture which the SDK is built for. CPU string `json:"cpu"` }
type Test ¶
type Test struct { // Name is a human-readable identifier for this test. It should be unique // within any given TestSpec. Name string `json:"name"` // PackageURL is the fuchsia package URL for this test. It is only set for // tests targeting Fuchsia. PackageURL string `json:"package_url,omitempty"` // Path is the path to the test on the target OS. Path string `json:"path"` // Label is the full GN label with toolchain for the test target. // E.g.: //src/foo/tests:foo_tests(//build/toolchain/fuchsia:x64) Label string `json:"label"` // OS is the operating system in which this test must be executed. OS string `json:"os"` // CPU architecture on which this test can execute. CPU string `json:"cpu"` // Settings of log produced by this test LogSettings LogSettings `json:"log_settings,omitempty"` // Number of test cases to run in parallel. This only works with v2 tests. Parallel uint16 `json:"parallel,omitempty"` // RuntimeDepsFile is a relative path within the build directory to a file // containing a JSON list of the test's runtime dependencies, Currently this // field only makes sense for Linux and Mac tests. RuntimeDepsFile string `json:"runtime_deps,omitempty"` }
Test encapsulates details about a particular test.
type TestDuration ¶
TestDuration encodes information about a test's running time. It implements the json.RawMessage interface for custom JSON decoding.
func (*TestDuration) MarshalJSON ¶
func (d *TestDuration) MarshalJSON() ([]byte, error)
func (*TestDuration) UnmarshalJSON ¶
func (d *TestDuration) UnmarshalJSON(data []byte) error
type TestSpec ¶
type TestSpec struct { // Test is the test that this specification is for. Test `json:"test"` // Envs is a set of environments that the test should be executed in. Envs []Environment `json:"environments"` }
TestSpec is the specification for a single test and the environments it should be executed in.
type Tool ¶
type Tool struct { // Name is the canonical name of the image. Name string `json:"name"` // Path is relative path to the tool within the build directory. Path string `json:"path"` // OS is the operating system the tool is meant to run on. OS string // CPU is the architecture the tool is meant to run on. CPU string }
Tool represents a host tool in the build.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
fx-set
|
|
ninjago
|
|
buildstats
ninja_buildstats is an utility for extracting useful stats out of build artifacts from Ninja.
|
ninja_buildstats is an utility for extracting useful stats out of build artifacts from Ninja. |
compdb
Package compdb provides compilation database parser.
|
Package compdb provides compilation database parser. |
ninjagraph
ninjagraph provides utilities to parse the DOT output from Ninja's `-t graph` tool to a Go native format.
|
ninjagraph provides utilities to parse the DOT output from Ninja's `-t graph` tool to a Go native format. |
ninjalog
Package ninjalog provides ninja_log parser
|
Package ninjalog provides ninja_log parser |
ninjatrace/cmd
ninjatrace converts .ninja_log into trace-viewer formats.
|
ninjatrace converts .ninja_log into trace-viewer formats. |