AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Functions | Variables
gtest_test_utils Namespace Reference


class  Subprocess


def SetEnvVar (env_var, value)
def GetFlag (flag)
def GetSourceDir ()
def GetBuildDir ()
def GetTempDir ()
def GetTestExecutablePath (executable_name, build_dir=None)
def GetExitStatus (exit_code)
def Main ()


string IS_WINDOWS = 'nt'
string IS_CYGWIN = 'posix' and 'CYGWIN' in os.uname()[0]
 environ = os.environ.copy()
 TestCase = _test_module.TestCase

Function Documentation

◆ GetBuildDir()

def gtest_test_utils.GetBuildDir ( )
Returns the absolute path of the directory where the test binaries are.

◆ GetExitStatus()

def gtest_test_utils.GetExitStatus (   exit_code)
Returns the argument to exit(), or -1 if exit() wasn't called.

  exit_code: the result value of os.system(command).

◆ GetFlag()

def gtest_test_utils.GetFlag (   flag)
Returns the value of the given flag.

◆ GetSourceDir()

def gtest_test_utils.GetSourceDir ( )
Returns the absolute path of the directory where the .py files are.

◆ GetTempDir()

def gtest_test_utils.GetTempDir ( )
Returns a directory for temporary files.

◆ GetTestExecutablePath()

def gtest_test_utils.GetTestExecutablePath (   executable_name,
  build_dir = None 
Returns the absolute path of the test binary given its name.

The function will print a message and abort the program if the resulting file
doesn't exist.

  executable_name: name of the test binary that the test script runs.
  build_dir:       directory where to look for executables, by default
                   the result of GetBuildDir().

  The absolute path of the test binary.

◆ Main()

def gtest_test_utils.Main ( )
Runs the unit test.

◆ SetEnvVar()

def gtest_test_utils.SetEnvVar (   env_var,
Sets/unsets an environment variable to a given value.

Variable Documentation

◆ environ

gtest_test_utils.environ = os.environ.copy()


string gtest_test_utils.GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT'


string gtest_test_utils.IS_CYGWIN = 'posix' and 'CYGWIN' in os.uname()[0]


string gtest_test_utils.IS_WINDOWS = 'nt'



◆ TestCase

gtest_test_utils.TestCase = _test_module.TestCase

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0