summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt4
-rw-r--r--Tests/CTestUpdateCommon.cmake48
-rw-r--r--Tests/CTestUpdateGIT.cmake.in17
-rw-r--r--Tests/CompileOptions/CMakeLists.txt6
-rw-r--r--Tests/CompileOptions/main.cpp3
-rw-r--r--Tests/FortranOnly/CMakeLists.txt22
-rw-r--r--Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m7
-rw-r--r--Tests/MumpsCoverage/ZZCOVTST.cmcov65
-rw-r--r--Tests/MumpsCoverage/ZZCOVTST.mcov62
-rw-r--r--Tests/RunCMake/Syntax/Unquoted1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/Unquoted1.cmake2
11 files changed, 171 insertions, 67 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7aa31cc..f51a934 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2168,7 +2168,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
$<TARGET_FILE:ctest> -T Coverage --debug)
set_tests_properties(CTestGTMCoverage PROPERTIES
PASS_REGULAR_EXPRESSION
- "Process file.*ZZCOVTST.m.*Total LOC:.*23.*Percentage Coverage: 82.61*"
+ "Process file.*ZZCOVTST.m.*Total LOC:.*30.*Percentage Coverage: 80.00*"
ENVIRONMENT COVFILE=)
configure_file(
@@ -2186,7 +2186,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
$<TARGET_FILE:ctest> -T Coverage --debug)
set_tests_properties(CTestCacheCoverage PROPERTIES
PASS_REGULAR_EXPRESSION
- "Process file.*ZZCOVTST.m.*Total LOC:.*22.*Percentage Coverage: 86.36.*"
+ "Process file.*ZZCOVTST.m.*Total LOC:.*29.*Percentage Coverage: 86.21.*"
ENVIRONMENT COVFILE=)
# Adding a test case for Python Coverage
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 857c6f5..97153f0 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -219,6 +219,36 @@ function(run_dashboard_command_line bin_dir)
endfunction()
#-----------------------------------------------------------------------------
+# Function to find the Update.xml file and make sure
+# it only has the Revision in it and no updates
+function(check_no_update bin_dir)
+ set(PATTERN ${TOP}/${bin_dir}/Testing/*/Update.xml)
+ file(GLOB UPDATE_XML_FILE RELATIVE ${TOP} ${PATTERN})
+ string(REGEX REPLACE "//Update.xml$" "/Update.xml"
+ UPDATE_XML_FILE "${UPDATE_XML_FILE}")
+ message(" found ${UPDATE_XML_FILE}")
+ set(rev_regex "Revision|PriorRevision")
+ file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_REVISIONS
+ REGEX "^\t<(${rev_regex})>[^<\n]+</(${rev_regex})>$"
+ )
+ set(found_revisons FALSE)
+ foreach(r IN LISTS UPDATE_XML_REVISIONS)
+ if("${r}" MATCHES "PriorRevision")
+ message(FATAL_ERROR "Found PriorRevision in no update test")
+ endif()
+ if("${r}" MATCHES "<Revision>")
+ set(found_revisons TRUE)
+ endif()
+ endforeach()
+ if(found_revisons)
+ message(" found <Revision> in no update test")
+ else()
+ message(FATAL_ERROR " missing <Revision> in no update test")
+ endif()
+endfunction()
+
+
+#-----------------------------------------------------------------------------
# Function to run the dashboard through a script
function(run_dashboard_script bin_dir)
run_child(
@@ -228,13 +258,17 @@ function(run_dashboard_script bin_dir)
# Verify the updates reported by CTest.
list(APPEND UPDATE_MAYBE Updated{subdir} Updated{CTestConfig.cmake})
- check_updates(${bin_dir}
- Updated{foo.txt}
- Updated{bar.txt}
- Updated{zot.txt}
- Updated{subdir/foo.txt}
- Updated{subdir/bar.txt}
- )
+ if(NO_UPDATE)
+ check_no_update(${bin_dir})
+ else()
+ check_updates(${bin_dir}
+ Updated{foo.txt}
+ Updated{bar.txt}
+ Updated{zot.txt}
+ Updated{subdir/foo.txt}
+ Updated{subdir/bar.txt}
+ )
+ endif()
endfunction()
#-----------------------------------------------------------------------------
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index f6939de..41b732b 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -317,3 +317,20 @@ set(CTEST_GIT_UPDATE_CUSTOM \${CTEST_GIT_COMMAND} pull origin master)
# Run the dashboard script with CTest.
run_dashboard_script(dash-binary-custom)
+
+
+rewind_source(dash-source)
+
+#-----------------------------------------------------------------------------
+# Test no update with a dashboard script.
+message("Running CTest Dashboard Script (No update)...")
+
+create_dashboard_script(dash-binary-no-update
+ "# git command configuration
+set(CTEST_GIT_COMMAND \"${GIT}\")
+set(CTEST_UPDATE_VERSION_ONLY TRUE)
+")
+
+# Run the dashboard script with CTest.
+set(NO_UPDATE 1)
+run_dashboard_script(dash-binary-no-update)
diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt
index 9b6c9c2..05a5f82 100644
--- a/Tests/CompileOptions/CMakeLists.txt
+++ b/Tests/CompileOptions/CMakeLists.txt
@@ -22,6 +22,12 @@ set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
${cxx_tests}
)
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland")
+ set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS
+ "-DTEST_OCTOTHORPE=\"#\""
+ )
+endif()
+
target_link_libraries(CompileOptions testlib)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp
index 42f4cca..f3c1355 100644
--- a/Tests/CompileOptions/main.cpp
+++ b/Tests/CompileOptions/main.cpp
@@ -17,6 +17,9 @@
int main()
{
return (strcmp(NEEDS_ESCAPE, "E$CAPE") == 0
+#ifdef TEST_OCTOTHORPE
+ && strcmp(TEST_OCTOTHORPE, "#") == 0
+#endif
&& strcmp(EXPECTED_C_COMPILER_VERSION, TEST_C_COMPILER_VERSION) == 0
&& strcmp(EXPECTED_CXX_COMPILER_VERSION, TEST_CXX_COMPILER_VERSION) == 0
&& TEST_C_COMPILER_VERSION_EQUALITY == 1
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index d57a8b2..a3f83c9 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -43,3 +43,25 @@ add_custom_target(checksayhello ALL
COMMAND ${CMAKE_COMMAND} -P ${FortranOnly_SOURCE_DIR}/checksayhello.cmake
)
add_dependencies(checksayhello sayhello)
+
+# Exclude this test on IBM XL for now because the check strangely
+# fails with 'ld: 0706-029 Use a number with the -H flag'.
+if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL XL)
+ set(err_log ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log)
+ file(REMOVE "${err_log}")
+ include(CheckFortranSourceCompiles)
+ unset(HAVE_PRINT CACHE)
+ CHECK_Fortran_SOURCE_COMPILES([[
+ PROGRAM TEST_HAVE_PRINT
+ PRINT *, 'Hello'
+ END
+]] HAVE_PRINT)
+ if(NOT HAVE_PRINT)
+ if(EXISTS "${err_log}")
+ file(READ "${err_log}" err)
+ endif()
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n"
+ "${err}")
+ endif()
+endif()
diff --git a/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m b/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m
index 9a08edf..ee70682 100644
--- a/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m
+++ b/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m
@@ -10,6 +10,7 @@ EN ; This entry point shouldn't be found without fixing
I '$$T5 W "RETURNED FROM t5",!
Q
; This line not executable
+ D T6^ZZCOVTST
;
T1 ; This line should always be found
N D
@@ -33,4 +34,10 @@ T4 N D S D=5 W "Shouldn't be executed"
T5(EQ) ;this entry point is called with a $$ notation
W "THIS IS THE $$ NOTATION!",!
Q 0
+T6 ; An entry point to show comments inside of "DO" blocks
+ D
+ . W "This is executable code",!
+ . ;This is a comment inside the do block, not executable
+ . S ZZBLAH="blah"
+ W "Ending T6",!
;
diff --git a/Tests/MumpsCoverage/ZZCOVTST.cmcov b/Tests/MumpsCoverage/ZZCOVTST.cmcov
index 798e5b2..7a5df61 100644
--- a/Tests/MumpsCoverage/ZZCOVTST.cmcov
+++ b/Tests/MumpsCoverage/ZZCOVTST.cmcov
@@ -1,5 +1,5 @@
Routine,Line,RtnLine,Code
-ZZCOVTST,1,0,"ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014"
+ZZCOVTST,1,1,"ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014"
,2,0," ; (tab) This is series of comments"
,3,0," ; (tab) it should all be not executable"
,4,0," ; (spaces) one of these sets might be a problem"
@@ -8,31 +8,38 @@ ZZCOVTST,1,0,"ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014
,7,1," N D"
,8,1," S D=1 ;An executable line"
,9,1," D T1^ZZCOVTST"
-,10,1,"I '$$T5 W ""RETURNED FROM t5"",!"
-,11,1," Q"
-,12,0," ; This line not executable"
-,13,0," ;"
-,14,0,"T1 ; This line should always be found"
-,15,1," N D"
-,16,1," S D=2"
-,17,1," W !,D,!,""This is the second entry point"",!"
-,18,1," D T2^ZZCOVTST(D)"
-,19,1," Q"
-,20,0," ;"
-,21,0,"T2(EQ) ; This is debatable"
-,22,1," N D"
-,23,1," S D=3"
-,24,1," W !,D,!,EQ,""This is the third entry point"",!"
-,25,1," D T3^ZZCOVTST"
-,26,1," Q"
-,27,0," ;"
-,28,1,"T3 N D S D=4 W D,!,""Fourth Entry point"",! Q"
-,29,0," ;"
-,30,0,"T4 N D S D=5 W ""Shouldn't be executed"""
-,31,0," W ""Lots to not do"""
-,32,0," Q"
-,33,1,"T5()"
-,34,1," W ""THIS IS ONE WITH $$ NOTATION"",1"
-,35,1," Q 0"
-,36,0," ;"
-Totals for ZZCOVTST,,19,
+,10,1," I '$$T5 W ""RETURNED FROM t5"",!"
+,11,1," D T6^ZZCOVTST"
+,12,1," Q"
+,13,0," ; This line not executable"
+,14,0," ;"
+,15,0,"T1 ; This line should always be found"
+,16,1," N D"
+,17,1," S D=2"
+,18,1," W !,D,!,""This is the second entry point"",!"
+,19,1," D T2^ZZCOVTST(D)"
+,20,1," Q"
+,21,0," ;"
+,22,0,"T2(EQ) ; This is debatable and only called with ENT^ROU notation"
+,23,1," N D"
+,24,1," S D=3"
+,25,1," W !,D,!,EQ,""This is the third entry point"",!"
+,26,1," D T3^ZZCOVTST"
+,27,1," Q"
+,28,0," ;"
+,29,1,"T3 N D S D=4 W D,!,""Fourth Entry point"",! Q"
+,30,0," ;"
+,31,0,"T4 N D S D=5 W ""Shouldn't be executed"""
+,32,0," W ""Lots to not do"""
+,33,0," Q"
+,34,1,"T5(EQ) ;this entry point is called with a $$ notation"
+,35,1," W ""THIS IS THE $$ NOTATION!"",!"
+,36,1," Q 0"
+,37,0,"T6 ; An entry point to show comments inside of ""DO"" blocks"
+,38,1," D"
+,39,1," . W ""This is executable code"",!"
+,40,0," . ; This is a comment inside the do block, not executable"
+,41,1," . S ZZBLAH=""blah"""
+,42,1," W ""Ending T6"",!"
+,43,0," ;"
+Totals for ZZCOVTST,,25, \ No newline at end of file
diff --git a/Tests/MumpsCoverage/ZZCOVTST.mcov b/Tests/MumpsCoverage/ZZCOVTST.mcov
index f73d354..b2608d9 100644
--- a/Tests/MumpsCoverage/ZZCOVTST.mcov
+++ b/Tests/MumpsCoverage/ZZCOVTST.mcov
@@ -1,30 +1,38 @@
%GO Global Output Utility
-GT.M 30-APR-2014 14:24:46 ZWR
-^ZZCOVERAGE("*CHILDREN")="0:0:0"
-^ZZCOVERAGE("*RUN")="24000:88000:112000"
-^ZZCOVERAGE("ZZCOVTST","EN")="1:4000:8000:12000:6464583"
-^ZZCOVERAGE("ZZCOVTST","EN",1)="1:0:0:0:20"
-^ZZCOVERAGE("ZZCOVTST","EN",2)="1:0:0:0:14"
-^ZZCOVERAGE("ZZCOVTST","EN",3)="1:0:0:0:26"
-^ZZCOVERAGE("ZZCOVTST","EN",4)="1:0:0:0:228"
-^ZZCOVERAGE("ZZCOVTST","T1")="1:0:0:0:92"
-^ZZCOVERAGE("ZZCOVTST","T1",1)="1:0:0:0:13"
-^ZZCOVERAGE("ZZCOVTST","T1",2)="1:0:0:0:12"
-^ZZCOVERAGE("ZZCOVTST","T1",3)="1:0:0:0:14"
-^ZZCOVERAGE("ZZCOVTST","T1",4)="1:0:0:0:29"
-^ZZCOVERAGE("ZZCOVTST","T1",5)="1:0:0:0:12"
-^ZZCOVERAGE("ZZCOVTST","T2")="1:0:0:0:102"
-^ZZCOVERAGE("ZZCOVTST","T2",0)="1:0:0:0:14"
-^ZZCOVERAGE("ZZCOVTST","T2",1)="1:0:0:0:12"
-^ZZCOVERAGE("ZZCOVTST","T2",2)="1:0:0:0:12"
-^ZZCOVERAGE("ZZCOVTST","T2",3)="1:0:0:0:14"
-^ZZCOVERAGE("ZZCOVTST","T2",4)="1:0:0:0:25"
-^ZZCOVERAGE("ZZCOVTST","T2",5)="1:0:0:0:12"
-^ZZCOVERAGE("ZZCOVTST","T3")="1:0:0:0:28"
-^ZZCOVERAGE("ZZCOVTST","T3",0)="1:0:0:0:17"
-^ZZCOVERAGE("ZZCOVTST","T5")="1:0:0:0:388"
-^ZZCOVERAGE("ZZCOVTST","T5",0)="1:0:0:0:114"
-^ZZCOVERAGE("ZZCOVTST","T5",1)="1:0:0:0:28"
-^ZZCOVERAGE("ZZCOVTST","T5",2)="1:0:0:0:14"
+GT.M 15-AUG-2014 10:14:32 ZWR
+^ZZCOVERAGE("*CHILDREN")="212000:68000:280000"
+^ZZCOVERAGE("*RUN")="56000:136000:192000"
+^ZZCOVERAGE("ZZCOVTST","EN")="1:4000:4000:8000:8627798"
+^ZZCOVERAGE("ZZCOVTST","EN",1)="1:0:0:0:27"
+^ZZCOVERAGE("ZZCOVTST","EN",2)="1:0:0:0:23"
+^ZZCOVERAGE("ZZCOVTST","EN",3)="1:0:0:0:70"
+^ZZCOVERAGE("ZZCOVTST","EN",4)="1:0:0:0:74"
+^ZZCOVERAGE("ZZCOVTST","EN",5)="1:0:0:0:66"
+^ZZCOVERAGE("ZZCOVTST","EN",6)="1:0:0:0:40"
+^ZZCOVERAGE("ZZCOVTST","T1")="1:0:0:0:208"
+^ZZCOVERAGE("ZZCOVTST","T1",1)="1:0:0:0:23"
+^ZZCOVERAGE("ZZCOVTST","T1",2)="1:0:0:0:24"
+^ZZCOVERAGE("ZZCOVTST","T1",3)="1:0:0:0:26"
+^ZZCOVERAGE("ZZCOVTST","T1",4)="1:0:0:0:73"
+^ZZCOVERAGE("ZZCOVTST","T1",5)="1:0:0:0:40"
+^ZZCOVERAGE("ZZCOVTST","T2")="1:0:0:0:1783"
+^ZZCOVERAGE("ZZCOVTST","T2",0)="1:0:0:0:25"
+^ZZCOVERAGE("ZZCOVTST","T2",1)="1:0:0:0:524"
+^ZZCOVERAGE("ZZCOVTST","T2",2)="1:0:0:0:40"
+^ZZCOVERAGE("ZZCOVTST","T2",3)="1:0:0:0:95"
+^ZZCOVERAGE("ZZCOVTST","T2",4)="1:0:0:0:607"
+^ZZCOVERAGE("ZZCOVTST","T2",5)="1:0:0:0:470"
+^ZZCOVERAGE("ZZCOVTST","T3")="1:0:0:0:254"
+^ZZCOVERAGE("ZZCOVTST","T3",0)="1:0:0:0:76"
+^ZZCOVERAGE("ZZCOVTST","T5")="1:0:0:0:153"
+^ZZCOVERAGE("ZZCOVTST","T5",0)="1:0:0:0:40"
+^ZZCOVERAGE("ZZCOVTST","T5",1)="1:0:0:0:41"
+^ZZCOVERAGE("ZZCOVTST","T5",2)="1:0:0:0:41"
+^ZZCOVERAGE("ZZCOVTST","T6")="1:0:0:0:227"
+^ZZCOVERAGE("ZZCOVTST","T6",1)="1:0:0:0:41"
+^ZZCOVERAGE("ZZCOVTST","T6",2)="1:0:0:0:42"
+^ZZCOVERAGE("ZZCOVTST","T6",4)="1:0:0:0:41"
+^ZZCOVERAGE("ZZCOVTST","T6",5)="1:0:0:0:34"
+^ZZCOVERAGE("ZZCOVTST","T6",6)="1:0:0:0:38"
diff --git a/Tests/RunCMake/Syntax/Unquoted1-stderr.txt b/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
index ff8194a..85a7a9d 100644
--- a/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
+++ b/Tests/RunCMake/Syntax/Unquoted1-stderr.txt
@@ -1 +1 @@
-^\[\]\[=\]\[\$\$\(MV\)-DSTR=" \[="\[;\]$
+^\[\]\[=\]\[\$\$\(MV\)-DSTR=" \[="\[;\]\]\[$
diff --git a/Tests/RunCMake/Syntax/Unquoted1.cmake b/Tests/RunCMake/Syntax/Unquoted1.cmake
index 0344fbd..515161f 100644
--- a/Tests/RunCMake/Syntax/Unquoted1.cmake
+++ b/Tests/RunCMake/Syntax/Unquoted1.cmake
@@ -1 +1 @@
-message([] [=] [$ $(MV) -DSTR=" [=" [;])
+message([] [=] [$ $(MV) -DSTR=" [=" [;] ] [)