summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Snyder <joe.snyder@kitware.com>2014-10-23 21:03:30 (GMT)
committerBrad King <brad.king@kitware.com>2014-10-29 15:27:11 (GMT)
commit220e81345b68ed3ad15ef294f6de653fcd1a874c (patch)
tree759f57741cb0ba02e764515142284d6bf99ae8a1 /Tests/CMakeLists.txt
parenta2456e157223255f0e2a71f2ddd510510e42b9e4 (diff)
downloadCMake-220e81345b68ed3ad15ef294f6de653fcd1a874c.zip
CMake-220e81345b68ed3ad15ef294f6de653fcd1a874c.tar.gz
CMake-220e81345b68ed3ad15ef294f6de653fcd1a874c.tar.bz2
CTest: Add Javascript coverage parser
Add a coverage parser for the Blanket.js library using the JSON output of the mocha.js test runner. Add a test for the new parser.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index e1e90a1..586f983 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2339,6 +2339,25 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
"Process file.*CoverageTest.java.*Total LOC:.*17.*Percentage Coverage: 76.47*"
ENVIRONMENT COVFILE=)
+ # Adding a test case for Javascript Coverage
+ configure_file(
+ "${CMake_SOURCE_DIR}/Tests/JavascriptCoverage/DartConfiguration.tcl.in"
+ "${CMake_BINARY_DIR}/Testing/JavascriptCoverage/DartConfiguration.tcl")
+ configure_file(
+ "${CMake_SOURCE_DIR}/Tests/JavascriptCoverage/output.json.in"
+ "${CMake_BINARY_DIR}/Testing/JavascriptCoverage/output.json")
+ file(COPY "${CMake_SOURCE_DIR}/Tests/JavascriptCoverage/"
+ DESTINATION "${CMake_BINARY_DIR}/Testing/JavascriptCoverage"
+ FILES_MATCHING PATTERN "*.js")
+ add_test(NAME CTestJavascriptCoverage
+ COMMAND cmake -E chdir
+ ${CMake_BINARY_DIR}/Testing/JavascriptCoverage
+ $<TARGET_FILE:ctest> -T Coverage --debug)
+ set_tests_properties(CTestJavascriptCoverage PROPERTIES
+ PASS_REGULAR_EXPRESSION
+ "Process file.*test3.js.*Total LOC:.*49.*Percentage Coverage: 79.59*"
+ ENVIRONMENT COVFILE=)
+
# test coverage for Delphi-code-Coverage
configure_file(
"${CMake_SOURCE_DIR}/Tests/DelphiCoverage/DartConfiguration.tcl.in"