A python script to discover google test code and run automatically.
It's like the unittest discover on python.
$ git clone https://github.com/google/googletest gtest
$ cd gtest
$ cmake .
$ make
$ export GTEST_DIR='/Users/Hoge/gtest'
The script search test files which name is *Test.cpp and run:
If you run the script without second arg,
The script search from the current dir.
If you run the script with second arg,
The script search from the specified dir:
$ python GoogleTestDiscover.py ../../
If you want to do a test which is based on other libraries,
you can add some compile options with a config file.
The config file is a python script,
and it has to have a same name of the test cpp code.
For example, if the test code name is "sampleTest.cpp",
The config file needs to be "sampleTest.py".
config_sample.py is a sample of the config file.
you can set options like:
options.append("-I src/include/ ")
options.append("-L src/lib/ ")
MIT