Wizard
Software Engineering Project - Wizard
Loading...
Searching...
No Matches
fuse_gtest_files Namespace Reference

Functions

 VerifyFileExists (directory, relative_path)
 
 ValidateGTestRootDir (gtest_root)
 
 VerifyOutputFile (output_dir, relative_path)
 
 ValidateOutputDir (output_dir)
 
 FuseGTestH (gtest_root, output_dir)
 
 FuseGTestAllCcToFile (gtest_root, output_file)
 
 FuseGTestAllCc (gtest_root, output_dir)
 
 FuseGTest (gtest_root, output_dir)
 
 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/.+)"')
 
str GTEST_H_SEED = 'include/gtest/gtest.h'
 
str GTEST_SPI_H_SEED = 'include/gtest/gtest-spi.h'
 
str GTEST_ALL_CC_SEED = 'src/gtest-all.cc'
 
str GTEST_H_OUTPUT = 'gtest/gtest.h'
 
str GTEST_ALL_CC_OUTPUT = 'gtest/gtest-all.cc'
 

Detailed Description

fuse_gtest_files.py v0.2.0
Fuses Google Test source code into a .h file and a .cc file.

SYNOPSIS
       fuse_gtest_files.py [GTEST_ROOT_DIR] OUTPUT_DIR

       Scans GTEST_ROOT_DIR for Google Test source code, and generates
       two files: OUTPUT_DIR/gtest/gtest.h and OUTPUT_DIR/gtest/gtest-all.cc.
       Then you can build your tests by adding OUTPUT_DIR to the include
       search path and linking with OUTPUT_DIR/gtest/gtest-all.cc.  These
       two files contain everything you need to use Google Test.  Hence
       you can "install" Google Test by copying them to wherever you want.

       GTEST_ROOT_DIR can be omitted and defaults to the parent
       directory of the directory holding this script.

EXAMPLES
       ./fuse_gtest_files.py fused_gtest
       ./fuse_gtest_files.py path/to/unpacked/gtest fused_gtest

This tool is experimental.  In particular, it assumes that there is no
conditional inclusion of Google Test headers.  Please report any
problems to googletestframework@googlegroups.com.  You can read
https://github.com/google/googletest/blob/master/googletest/docs/advanced.md for
more information.

Function Documentation

◆ FuseGTest()

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

◆ FuseGTestAllCc()

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

◆ FuseGTestAllCcToFile()

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

◆ FuseGTestH()

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

◆ ValidateGTestRootDir()

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

The function aborts the program on failure.

◆ ValidateOutputDir()

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

The function aborts the program on failure.

◆ VerifyFileExists()

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.

◆ VerifyOutputFile()

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.