Beispiel #1
0
             } else {
                 reportTestResult("", $user, "missing_tests", $f, true);
             }
         }
     }
 }
 ########################### guards ######################################
 if (in_array("old_files", $tests)) {
     $ignore = array("SampleTreatment_test.cpp", "Exception_Base_test.cpp", "NumericDiff.cpp", "ExampleLibraryFile.cpp", "TestExternalCode.cpp");
     if (!in_array($basename, $ignore) && !beginsWith($f, "src/topp/") && !beginsWith($f, "src/utils/") && !beginsWith($f, "src/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/")) {
         $message = "";
         $result = true;
         if (endsWith($f, "_test.cpp")) {
             $hits = array();
             foreach ($file as $line) {
                 if (isIncludeLine($line, $include) && strpos($line, substr("/" . $basename . ".h", 0, -7)) !== FALSE) {
                     # check all potential include locations
                     $incl_path = substr($include, 7);
                     foreach ($includePaths as $incl) {
                         array_push($hits, $incl . "/" . $incl_path);
                     }
                 }
             }
             if (count($hits) > 1) {
                 $file_exists = false;
                 foreach ($hits as $h) {
                     if (endsWith($f, "String_test.cpp")) {
                         echo "String_test -> " . $src_path . "/" . $h . "\n";
                     }
                     $file_exists |= file_exists($src_path . "/" . $h);
                 }
Beispiel #2
0
             } else {
                 reportTestResult("", $user, "missing_tests", $f, true);
             }
         }
     }
 }
 ########################### guards ######################################
 if (in_array("old_files", $tests)) {
     $ignore = array("SampleTreatment_test.C", "Exception_Base_test.C", "NumericDiff.C", "ExampleLibraryFile.C", "TestExternalCode.C");
     if (!in_array($basename, $ignore) && !beginsWith($f, "source/APPLICATIONS/TOPP/") && !beginsWith($f, "source/APPLICATIONS/UTILS/") && !beginsWith($f, "source/VISUAL/APPLICATIONS/GUITOOLS/")) {
         $message = "";
         $result = true;
         if (endsWith($f, "_test.C")) {
             $hits = array();
             foreach ($file as $line) {
                 if (isIncludeLine($line, $include) && strpos($line, substr($basename, 0, -7)) !== FALSE) {
                     $hits[] = "include/" . $include;
                 }
             }
             if (count($hits) == 1) {
                 //print "$f -> $hits[0]\n";
                 if (!file_exists($src_path . "/" . $hits[0])) {
                     $message = "Outdated test file '{$f}'";
                     $result = false;
                     realOutput($message, $user, $f);
                 }
             }
         } elseif (endsWith($f, ".C")) {
             if (!file_exists($src_path . "/include/OpenMS/" . substr($f, 7, -2) . ".h")) {
                 $message = "Outdated source file '{$f}' (no header)";
                 $result = false;