1717# limitations under the License.
1818#=============================================================================
1919
20+ if (MIDAS_RUN_TESTS_WITH_COVERAGE)
21+ if (EXISTS ${CMAKE_BINARY_DIR} /cov)
22+ file (REMOVE_RECURSE ${CMAKE_BINARY_DIR} /cov)
23+ endif ()
24+ file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR} /cov)
25+ endif ()
26+
2027macro (to_titlecase Arg Result)
2128 string (SUBSTRING ${Arg} 0 1 ArgHead)
2229 string (TOUPPER ${ArgHead} ArgHead)
@@ -32,9 +39,10 @@ endfunction()
3239
3340function (add_midas_mysql_test TestName TestFile)
3441 if (EXISTS ${CMAKE_SOURCE_DIR} /tests/configs/mysql.ini)
42+ set (TestParams --debug --bootstrap ${CMAKE_SOURCE_DIR} /tests/TestsBootstrap.php)
3543 add_test (
3644 MySQL${TestName}
37- ${PHP} ${CMAKE_SOURCE_DIR} /tests/PHPUnitMySQL.php --debug --bootstrap ${CMAKE_SOURCE_DIR} /tests/TestsBootstrap.php ${CMAKE_CURRENT_SOURCE_DIR} /${TestFile}
45+ ${PHP} ${CMAKE_SOURCE_DIR} /tests/PHPUnitMySQL.php ${TestParams} ${CMAKE_CURRENT_SOURCE_DIR} /${TestFile}
3846 )
3947 set_tests_properties (
4048 MySQL${TestName} PROPERTIES
@@ -46,9 +54,10 @@ endfunction()
4654
4755function (add_midas_pgsql_test TestName TestFile)
4856 if (EXISTS ${CMAKE_SOURCE_DIR} /tests/configs/pgsql.ini)
57+ set (TestParams --debug --bootstrap ${CMAKE_SOURCE_DIR} /tests/TestsBootstrap.php)
4958 add_test (
5059 PgSQL${TestName}
51- ${PHP} ${CMAKE_SOURCE_DIR} /tests/PHPUnitPgSQL.php --debug --bootstrap ${CMAKE_SOURCE_DIR} /tests/TestsBootstrap.php ${CMAKE_CURRENT_SOURCE_DIR} /${TestFile}
60+ ${PHP} ${CMAKE_SOURCE_DIR} /tests/PHPUnitPgSQL.php ${TestParams} ${CMAKE_CURRENT_SOURCE_DIR} /${TestFile}
5261 )
5362 set_tests_properties (
5463 PgSQL${TestName} PROPERTIES
@@ -60,9 +69,10 @@ endfunction()
6069
6170function (add_midas_sqlite_test TestName TestFile)
6271 if (EXISTS ${CMAKE_SOURCE_DIR} /tests/configs/sqlite.ini)
72+ set (TestParams --debug --bootstrap ${CMAKE_SOURCE_DIR} /tests/TestsBootstrap.php)
6373 add_test (
6474 SQLite${TestName}
65- ${PHP} ${CMAKE_SOURCE_DIR} /tests/PHPUnitSQLite.php --debug --bootstrap ${CMAKE_SOURCE_DIR} /tests/TestsBootstrap.php ${CMAKE_CURRENT_SOURCE_DIR} /${TestFile}
75+ ${PHP} ${CMAKE_SOURCE_DIR} /tests/PHPUnitSQLite.php ${TestParams} ${CMAKE_CURRENT_SOURCE_DIR} /${TestFile}
6676 )
6777 set_tests_properties (
6878 SQLite${TestName} PROPERTIES
0 commit comments