mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
add targets for individual tests (#3431)
This commit is contained in:
parent
28a46880a2
commit
8aa4758993
2 changed files with 19 additions and 1 deletions
|
@ -56,7 +56,7 @@ First switch to the test directory:
|
||||||
```
|
```
|
||||||
Then you can run all tests, showing details, with
|
Then you can run all tests, showing details, with
|
||||||
```
|
```
|
||||||
$ make VERBOSE=1
|
$ make VERBOSE=1 test
|
||||||
```
|
```
|
||||||
Alternately, run the tests with the details hidden in `all.log`:
|
Alternately, run the tests with the details hidden in `all.log`:
|
||||||
```
|
```
|
||||||
|
@ -66,6 +66,10 @@ Either way, you can get a summary of any test failures with:
|
||||||
```
|
```
|
||||||
$ ./problems
|
$ ./problems
|
||||||
```
|
```
|
||||||
|
You can run a single test suite, with source file `foo.test.cpp` or `foo.test.py`, with
|
||||||
|
```
|
||||||
|
$ make foo.test
|
||||||
|
```
|
||||||
|
|
||||||
Note that any development should be performed using a git clone, and the current development branch.
|
Note that any development should be performed using a git clone, and the current development branch.
|
||||||
The source tarballs do not reflect HEAD, and do not contain the test suite.
|
The source tarballs do not reflect HEAD, and do not contain the test suite.
|
||||||
|
|
|
@ -64,6 +64,13 @@ foreach (src_FILE ${test_SRCS})
|
||||||
if (DARWIN)
|
if (DARWIN)
|
||||||
target_link_libraries (${src_FILE} "-framework CoreFoundation -framework Security -framework SystemConfiguration")
|
target_link_libraries (${src_FILE} "-framework CoreFoundation -framework Security -framework SystemConfiguration")
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
||||||
|
# Add a custom `foo.test` target.
|
||||||
|
string(REGEX REPLACE "\\.[^.]*$" "" test_target ${src_FILE})
|
||||||
|
add_custom_target (${test_target}
|
||||||
|
./${src_FILE}
|
||||||
|
DEPENDS ${src_FILE}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test)
|
||||||
endforeach (src_FILE)
|
endforeach (src_FILE)
|
||||||
|
|
||||||
configure_file(run_all run_all COPYONLY)
|
configure_file(run_all run_all COPYONLY)
|
||||||
|
@ -197,6 +204,13 @@ set (pythonTests
|
||||||
|
|
||||||
foreach (python_Test ${pythonTests})
|
foreach (python_Test ${pythonTests})
|
||||||
configure_file(${python_Test} ${python_Test} COPYONLY)
|
configure_file(${python_Test} ${python_Test} COPYONLY)
|
||||||
|
|
||||||
|
# Add a custom `foo.test` target.
|
||||||
|
string(REGEX REPLACE "\\.[^.]*$" "" test_target ${python_Test})
|
||||||
|
add_custom_target (${test_target}
|
||||||
|
./${python_Test}
|
||||||
|
DEPENDS ${python_Test}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test)
|
||||||
endforeach(python_Test)
|
endforeach(python_Test)
|
||||||
|
|
||||||
#SET(CMAKE_BUILD_TYPE gcov)
|
#SET(CMAKE_BUILD_TYPE gcov)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue