FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
runVerifyTests.php
1 #!/usr/bin/php
2 <?php
3 /***********************************************************
4  Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  version 2 as published by the Free Software Foundation.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 ***********************************************************/
19 /*
20  * Runner script to run Verify tests
21  */
22 // set the path for where simpletest is
23 $path = '/usr/share/php' . PATH_SEPARATOR;
24 set_include_path(get_include_path() . PATH_SEPARATOR . $path);
25 
26 /* simpletest includes */
27 require_once '/usr/local/simpletest/web_tester.php';
28 require_once '/usr/local/simpletest/reporter.php';
29 
30 //require_once ('../../../tests/fossologyTestCase.php');
31 require_once ('../../../tests/TestEnvironment.php');
32 require_once('../../../tests/testClasses/timer.php');
33 
34 $Svn = `svnversion`;
35 $start = new timer();
36 $date = date('Y-m-d');
37 $time = date('h:i:s-a');
38 print "\nStarting Verify Tests on: " . $date . " at " . $time . "\n";
39 print "Using Svn Version:$Svn\n";
40 $test = new TestSuite('Fossology Repo UI Verification Functional tests');
41 //$test->addTestFile('browseUploadedTest.php');
42 $test->addTestFile('OneShot-lgpl2.1.php');
43 $test->addTestFile('OneShot-lgpl2.1-T.php');
44 $test->addTestFile('verifyFossI16L335U29.php');
45 $test->addTestFile('verifyFoss23D1F1L.php');
46 $test->addTestFile('verifyFossDirsOnly.php');
47 
48 if (TextReporter::inCli())
49 {
50  $results = $test->run(new TextReporter()) ? 0 : 1;
51  print "Ending Verify Tests at: " . date('r') . "\n";
52  $elapseTime = $start->TimeAgo($start->getStartTime());
53  print "The Verify Tests took {$elapseTime}to run\n\n";
54  exit($results);
55 }
56 $test->run(new HtmlReporter());
57 print "<pre>Ending Verify Tests at: " . date('r') . "</pre>\n";
58 $elapseTime = $start->TimeAgo($start->getStartTime());
59 print "<pre>The Verify Tests took {$elapseTime}to run</pre>\n\n";
60 ?>
Definition: timer.php:42