- 3.0.1 core module.
fuse_gtest_files Namespace Reference

Functions

def VerifyFileExists (directory, relative_path)
 
def ValidateGTestRootDir (gtest_root)
 
def VerifyOutputFile (output_dir, relative_path)
 
def ValidateOutputDir (output_dir)
 
def FuseGTestH (gtest_root, output_dir)
 
def FuseGTestAllCcToFile (gtest_root, output_file)
 
def FuseGTestAllCc (gtest_root, output_dir)
 
def FuseGTest (gtest_root, output_dir)
 
def main ()
 

Variables

 DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
 
 INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gtest/.+)"')
 
 INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"')
 
string GTEST_H_SEED = 'include/gtest/gtest.h'
 
string GTEST_SPI_H_SEED = 'include/gtest/gtest-spi.h'
 
string GTEST_ALL_CC_SEED = 'src/gtest-all.cc'
 
string GTEST_H_OUTPUT = 'gtest/gtest.h'
 
string GTEST_ALL_CC_OUTPUT = 'gtest/gtest-all.cc'
 

Function Documentation

def fuse_gtest_files.VerifyFileExists (   directory,
  relative_path 
)
Verifies that the given file exists; aborts on failure.

relative_path is the file path relative to the given directory.

Referenced by ValidateGTestRootDir().

def fuse_gtest_files.ValidateGTestRootDir (   gtest_root)
Makes sure gtest_root points to a valid gtest root directory.

The function aborts the program on failure.

References VerifyFileExists().

Referenced by FuseGTest().

def fuse_gtest_files.VerifyOutputFile (   output_dir,
  relative_path 
)
Verifies that the given output file path is valid.

relative_path is relative to the output_dir directory.

Referenced by ValidateOutputDir().

def fuse_gtest_files.ValidateOutputDir (   output_dir)
Makes sure output_dir points to a valid output directory.

The function aborts the program on failure.

References VerifyOutputFile().

Referenced by FuseGTest().

def fuse_gtest_files.FuseGTestH (   gtest_root,
  output_dir 
)
Scans folder gtest_root to generate gtest/gtest.h in output_dir.

References cpp.gmock_class.set.

Referenced by FuseGTest().

def fuse_gtest_files.FuseGTestAllCcToFile (   gtest_root,
  output_file 
)
Scans folder gtest_root to generate gtest/gtest-all.cc in output_file.

References cpp.gmock_class.set.

Referenced by FuseGTestAllCc().

def fuse_gtest_files.FuseGTestAllCc (   gtest_root,
  output_dir 
)
Scans folder gtest_root to generate gtest/gtest-all.cc in output_dir.

References FuseGTestAllCcToFile().

Referenced by FuseGTest().

def fuse_gtest_files.FuseGTest (   gtest_root,
  output_dir 
)
Fuses gtest.h and gtest-all.cc.

References FuseGTestAllCc(), FuseGTestH(), ValidateGTestRootDir(), and ValidateOutputDir().

Referenced by main().

def fuse_gtest_files.main ( )

References FuseGTest().

Variable Documentation

fuse_gtest_files.DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
fuse_gtest_files.INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gtest/.+)"')
fuse_gtest_files.INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"')
string fuse_gtest_files.GTEST_H_SEED = 'include/gtest/gtest.h'
string fuse_gtest_files.GTEST_SPI_H_SEED = 'include/gtest/gtest-spi.h'
string fuse_gtest_files.GTEST_ALL_CC_SEED = 'src/gtest-all.cc'
string fuse_gtest_files.GTEST_H_OUTPUT = 'gtest/gtest.h'
string fuse_gtest_files.GTEST_ALL_CC_OUTPUT = 'gtest/gtest-all.cc'