Increased speed of reporting in continuous build script, and added conditional testin...
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Aug 2010 12:41:08 +0000 (12:41 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Aug 2010 12:41:08 +0000 (12:41 +0000)
test/CMakeLists.txt
test/continuous-build.cmake

index 2c5b1a3..fac9f9d 100644 (file)
@@ -1,4 +1,17 @@
+Find_Program(RULE_CHECKER_SRCML src2srcml $ENV{PATH})
+Find_Program(RULE_CHECKER_JAVA java $ENV{PATH})
+Set(RULE_CHECKER_FOUND NO)
+If(RULE_CHECKER_SRCML AND RULE_CHECKER_JAVA)
+  Find_File(RULE_CHECKER_JAR NAMES NewRuleChecker.jar PATHS $ENV{ALICE}/local/ALICENewRuleChecker/NewRuleChecker)
+  Find_File(RULE_CHECKER_RULES AliceCodingConventions.xml $ENV{ALICE}/local/ALICENewRuleChecker/NewRuleChecker/config)
+  If(RULE_CHECKER_JAR AND RULE_CHECKER_RULES)
+    Set(RULE_CHECKER_FOUND YES)
+  EndIf(RULE_CHECKER_JAR AND RULE_CHECKER_RULES)
+EndIf(RULE_CHECKER_SRCML AND RULE_CHECKER_JAVA)
+
 add_test("Warnings" cmake -P Warnings.cmake)
+If(RULE_CHECKER_FOUND)
 add_test("Violations" cmake -P Violation.cmake)
+EndIf(RULE_CHECKER_FOUND)
 add_subdirectory(gun)
 add_subdirectory(ppbench)
\ No newline at end of file
index 34ccfcf..73e5ac3 100644 (file)
@@ -92,7 +92,7 @@ while (${CTEST_ELAPSED_TIME} LESS 36000)
       ctest_sleep(300)
     endif(${OLDREV} EQUAL ${NEWREV})
   endwhile()
-  #    ctest_submit (PARTS Update)
+  ctest_submit (PARTS Update)
   set(OLDREV ${NEWREV})
   math(EXPR CYCLE "${CYCLE} + 1")
   message("Build #${CYCLE} ")
@@ -107,7 +107,7 @@ while (${CTEST_ELAPSED_TIME} LESS 36000)
   endif(${CLEAR} EQUAL 0) 
   message(STATUS "Building source")
   ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
-  
+  ctest_submit(PARTS Build)
   #Test every other build
   math(EXPR TEST "${CYCLE}%${TESTCYCLE}")
   if(${TEST} EQUAL 0)