<?php

# Copyright 2015 Géant Association
#
# Licensed under the GEANT Standard Open Source (the "License")
# you may not use this file except in compliance with the License.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This software was developed by Consortium GARR. The research leading to
# these results has received funding from the European Community's Seventh
# Framework Programme (FP7/2007-2013) under grant agreement nº 238875
# (GEANT)
require_once 'RunTest.php';
$handler = new RunTest();
header("Location: " . $handler->handle());
예제 #2
0
        src/lib/php/tests/
        cli/tests/  */
 if ($other == 'lib' || $other == 'cli') {
     if (@chdir($funcTest . '/tests') === FALSE) {
         echo "Error! cannot cd to " . $funcTest . "/tests, skipping test\n";
         $failures++;
         continue;
     }
 } else {
     if (@chdir($funcTest . '/agent_tests/Functional') === FALSE) {
         echo "Error! cannot cd to " . $funcTest . "/agent_tests/Functional, skipping test\n";
         $failures++;
         continue;
     }
 }
 $Make = new RunTest($funcTest);
 $runResults = $Make->MakeTest();
 //debugprint($runResults, "run results for $funcTest\n");
 if ($funcTest == 'nomos') {
     $diffResult = array();
     foreach ($Make->makeOutput as $makeOutput) {
         if (strpos($makeOutput, '< File') != false || strpos($makeOutput, '> File') != false) {
             $diffResult[] = $makeOutput;
         }
     }
     if (count($diffResult) != 0) {
         //echo "Nomos result have " . count($diffResult) . " difference!\n";
         //print_r($diffResult);
         foreach ($diffResult as $diff) {
             echo substr($diff, strpos($diff, '=> ') + 3) . "\n";
         }
예제 #3
0
/**
 * \brief make coverage for a test
 *
 * @return null on success, string on failure.
 */
function MakeCover($unitTest)
{
    if (empty($unitTest)) {
        return NULL;
    }
    // make coverage
    $lastCovr = exec('make coverage 2>&1', $covrOut, $covrRtn);
    //echo "DB: Exit status of 'make coverage' of $unitTest is:$covrRtn\n";
    $Cover = new RunTest($unitTest);
    if ($covrRtn != 0) {
        if ($Cover->checkMakeErrors(implode("\n", $covrOut))) {
            echo "Error: 'make coverage' of {$unitTest} did not succeed, " . "return code:{$covrRtn}\n";
            $covrOut = array();
            return $unitTest;
        }
    }
    return NULL;
}