28 require_once(
'TestRun.php');
29 require_once(
'mailTo.php');
33 $usage =
"$argv[0] [-h] [-p <path>]\n" .
34 "h: help, this message\n" .
35 "p path: the path to the fossology sources to test\n";
39 $options = getopt(
'hp:');
40 if(array_key_exists(
'h', $options))
45 if(array_key_exists(
'p', $options))
47 $path = $options[
'p'];
60 function reportError($error, $file=NULL)
66 if(is_readable($file))
68 $longMsg = file_get_contnets($file);
72 $longMsg =
"$file was not readable\n";
75 else if(strlen($file) != 0)
83 $longMsg =
"Could not append a non-string to the message, " .
84 "reportError was passed an invalid 2nd parameter\n";
88 $hdr =
"There were errors in the nightly test setup." .
89 "The tests were not run due to one or more errors.\n\n";
91 $msg = $hdr . $error .
"\n" . $longMsg .
"\n";
96 $tmpFile = tempnam(
'.',
'testError');
97 $F = fopen($tmpFile,
'w') or die("Can not open tmp file $tmpFile\n");
100 $last = exec("mailx -
s 'test Setup Failed' $mailTo < $tmpFile ",$tossme, $rptGen);
105 if(array_key_exists('WORKSPACE', $_ENV))
107 $apath = $_ENV[
'WORKSPACE'];
108 print
"workspaces:\napath:$apath\n";
113 print
"Running tests\n";
114 $testPath =
"$tonight->srcPath" .
"/tests";
115 print
"testpath is:$testPath\n";
116 if(!chdir($testPath))
118 $error =
"Error can't cd to $testPath\n";
124 print
"Running Functional tests\n";
130 $TestLast = exec(
'./testFOSSology.php -a -e', $results, $rtn);
131 print
"after running tests the output is\n";
132 print_r($results) .
"\n";
int s
The socket that the CLI will use to communicate.
if(!preg_match("/\s$projectGroup\s/", $groups) &&(posix_getgid() !=$gInfo[ 'gid']))
get monk license list of one specified uploadtree_id