33 echo
"DB: at the start.... home is:$home\n";
34 $dirs = explode(
'/',$home);
37 if($dirs[$size-1] ==
'workspace' )
39 if(chdir(
'fossology/src/testing') === FALSE)
41 echo
"FATAL! Cannot cd to fossology/src/testing from" . getcwd() .
"\n";
46 echo
"DB: home is:$home\n";
48 $redHatPath =
'nomos/testdata';
49 $unpackTestFile =
'../../ununpack/agent_tests/test-data/testdata4unpack/argmatch.c.gz';
50 $unpackTests =
'../../ununpack/agent_tests';
51 $redHatDataFile =
'RedHat.tar.gz';
52 $unpackDataFile =
'unpack-test-data.tar.bz2';
53 $wgetOptions =
' -a wget.log --tries=3 ';
54 $proxy =
'export http_proxy=lart.usa.hp.com:3128;';
55 $Url =
'http://fossology.org/testing/testFiles/';
87 echo
"downloading unpack data.....\n";
88 if(!file_exists($unpackTestFile))
90 echo
"$unpackTestFile DOES NOT EXIST!, need to download data files...\n";
91 if(chdir($unpackTests) === FALSE)
93 echo
"FATAL! cannot cd to $unpackTests\n";
96 $cmd = $proxy .
"wget" . $wgetOptions . $Url .
'/' . $unpackDataFile;
97 $unpkLast = exec($cmd, $unpkOut, $unpkRtn);
100 echo
"ERROR! Download of $Url$unpackDataFile failed:$unpkRtn\n";
101 echo
"Errors were:\n";print_r($unpkOut) .
"\n";
105 $cmd =
"tar -xf $unpackDataFile";
106 $tarLast = exec($cmd, $tarOut, $tarRtn);
109 echo
"ERROR! un tar of $unpackDataFile failed\n";
110 echo
"Errors were:\n$tarLast\n";print_r($tarOut) .
"\n";