bazel

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package bazel provides utilities for interacting with the surrounding Bazel environment.

Index

Constants

This section is empty.

Variables

View Source
var DefaultWorkspace = "io_bazel_rules_webtesting"

DefaultWorkspace is the name of the default Bazel workspace.

Functions

func NewTmpDir

func NewTmpDir(prefix string) (string, error)

NewTmpDir creates a new temporary directory in TestTmpDir().

func Runfile

func Runfile(path string) (string, error)

Runfile returns an absolute path to the specified file in the runfiles directory of the running target. It searches the current working directory, RunfilesPath() directory, and RunfilesPath()/TestWorkspace(). Returns an error if unable to locate RunfilesPath() or if the file does not exist.

func RunfilesPath

func RunfilesPath() (string, error)

RunfilesPath return the path to the run files tree for this test. It returns an error if TEST_SRCDIR does not exist.

func TestTmpDir

func TestTmpDir() string

TestTmpDir returns the path the Bazel test temp directory. If TEST_TMPDIR is not defined, it returns the OS default temp dir.

func TestWorkspace

func TestWorkspace() string

TestWorkspace returns the name of the Bazel workspace for this test. If TEST_WORKSPACE is not defined, it returns DefaultWorkspace.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL