39 require_once(
'TestRun.php');
40 require_once(
'mailTo.php');
44 $usage =
"$argv[0] [-h] [-p <path>]\n" .
45 "h: help, this message\n" .
46 "p path: the path to the fossology sources to test\n";
50 $options = getopt(
'hp:');
51 if(array_key_exists(
'h', $options))
56 if(array_key_exists(
'p', $options))
58 $path = $options[
'p'];
71 function reportError($error, $file=NULL)
77 if(is_readable($file))
79 $longMsg = file_get_contnets($file);
83 $longMsg =
"$file was not readable\n";
86 else if(strlen($file) != 0)
94 $longMsg =
"Could not append a non-string to the message, " .
95 "reportError was passed an invalid 2nd parameter\n";
99 $hdr =
"There were errors in the nightly test setup." .
100 "The tests were not run due to one or more errors.\n\n";
102 $msg = $hdr . $error .
"\n" . $longMsg .
"\n";
107 $tmpFile = tempnam(
'.',
'testError');
108 $F = fopen($tmpFile,
'w') or die("Can not open tmp file $tmpFile\n");
111 $last = exec("mailx -
s 'test Setup Failed' $mailTo < $tmpFile ",$tossme, $rptGen);
116 if(array_key_exists('WORKSPACE', $_ENV))
118 $apath = $_ENV[
'WORKSPACE'];
119 print
"workspaces:\napath:$apath\n";
124 print
"Running tests\n";
125 $testPath =
"$tonight->srcPath" .
"/tests";
126 print
"testpath is:$testPath\n";
127 if(!chdir($testPath))
129 $error =
"Error can't cd to $testPath\n";
135 print
"Running Functional tests\n";
141 $TestLast = exec(
'./testFOSSology.php -a -e', $results, $rtn);
142 print
"after running tests the output is\n";
143 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