FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
runTestCleanup.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 
30 require_once '/usr/local/simpletest/web_tester.php';
31 require_once '/usr/local/simpletest/reporter.php';
32 require_once ('TestEnvironment.php');
33 require_once('testClasses/timer.php');
34 
35 global $URL;
36 $start = new timer();
37 $Svn = `svnversion`;
38 $date = date('Y-m-d');
39 $time = date('h.i.s-a');
40 print "Starting Cleanup Tests on: " . $date . " at " . $time . "\n";
41 print "Using Svn Version:$Svn\n";
42 $test = new TestSuite('Fossology Test Clean Up');
43 $test->addTestFile('testCleanUp.php');
44 
45 if (TextReporter::inCli())
46 {
47  $results = $test->run(new TextReporter()) ? 0 : 1;
48  print "Ending Clean Up Tests at: " . date('r') . "\n";
49  $elapseTime = $start->TimeAgo($start->getStartTime());
50  print "The Clean Up Tests took {$elapseTime}to run\n";
51  exit ($results);
52 }
53 $test->run(new HtmlReporter());
54 print "<pre>Ending Clean Up at: " . date('r') . "</pre>\n";
55 $elapseTime = $start->TimeAgo($start->getStartTime());
56 print "<pre>The Clean Up Tests took {$elapseTime}to run</pre>\n";
57 ?>
Definition: timer.php:42