Documentation ¶
Overview ¶
Package yatest provides access to testing context, when running under ya make -t.
Index ¶
- func BinaryPath(dataPath string) (string, error)
- func BuildFlag(name string) (string, bool)
- func BuildPath(dataPath string) string
- func BuildType() string
- func CCompilerPath() string
- func CxxCompilerPath() string
- func EnvFile() string
- func GlobalResourcePath(name string) string
- func HasRAMDrive() bool
- func HasYaTestContext() bool
- func OutputPath(dataPath string) string
- func OutputRAMDrivePath(dataPath string) string
- func PrepareGOCACHE() error
- func PrepareGOPATH() error
- func ProjectPath() string
- func PythonBinPath() string
- func PythonLibPath() string
- func RAMDrivePath(dataPath string) string
- func RelaxedGlobalResourcePath(name string) (string, bool)
- func Sanitizer() string
- func SourcePath(arcadiaPath string) string
- func TestParam(name string) (string, bool)
- func TestToolPath() string
- func WorkPath(dataPath string) string
- func YtHDDPath(dataPath string) string
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryPath ¶
func BuildType ¶
func BuildType() string
BuildType returns build type that was used to compile the test
func CCompilerPath ¶
func CCompilerPath() string
func CxxCompilerPath ¶
func CxxCompilerPath() string
func GlobalResourcePath ¶
GlobalResourcePath returns absolute path to a directory containing global build resource.
func HasYaTestContext ¶
func HasYaTestContext() bool
func OutputPath ¶
OutputPath returns absolute path to the output directory (testing_out_stuff).
func OutputRAMDrivePath ¶
OutputRAMDrivePath returns absolute path to the ramdrive output directory
func PrepareGOCACHE ¶
func PrepareGOCACHE() error
func PrepareGOPATH ¶
func PrepareGOPATH() error
func ProjectPath ¶
func ProjectPath() string
ProjectPath returns arcadia-relative path to the test project
func PythonBinPath ¶
func PythonBinPath() string
PythonBinPath returns absolute path to the python
Warn: if you are using build with system python (-DUSE_SYSTEM_PYTHON=X) beware that some python bundles are built in a stripped-down form that is needed for building, not running tests. See comments in the file below to find out which version of python is compatible with tests. https://a.yandex-team.ru/arc/trunk/arcadia/build/platform/python/resources.inc
func PythonLibPath ¶
func PythonLibPath() string
func RAMDrivePath ¶
RAMDrivePath returns absolute path to the ramdrive directory
func Sanitizer ¶
func Sanitizer() string
Sanitizer returns sanitizer name that was used to compile the test
func SourcePath ¶
SourcePath returns absolute path to source directory.
arcadiaPath must be declared using DATA macro inside ya.make.
func TestToolPath ¶
func TestToolPath() string
Types ¶
type TestContext ¶
type TestContext struct { Build struct { BuildType string `json:"build_type"` Flags map[string]string `json:"flags"` Sanitizer string `json:"sanitizer"` } `json:"build"` Runtime struct { BuildRoot string `json:"build_root"` OutputPath string `json:"output_path"` ProjectPath string `json:"project_path"` PythonBin string `json:"python_bin"` PythonLibPath string `json:"python_lib_path"` RAMDrivePath string `json:"ram_drive_path"` YtHDDPath string `json:"yt_hdd_path"` TestOutputRAMDrivePath string `json:"test_output_ram_drive_path"` SourceRoot string `json:"source_root"` WorkPath string `json:"work_path"` TestToolPath string `json:"test_tool_path"` TestParameters map[string]string `json:"test_params"` } `json:"runtime"` Resources struct { Global map[string]string `json:"global"` } `json:"resources"` Internal struct { EnvFile string `json:"env_file"` } `json:"internal"` Initialized bool }