FOSSology  4.4.0
Open Source License Compliance by Open Source Software
runVerifyTests.php
1 #!/usr/bin/php
2 <?php
3 /*
4  SPDX-FileCopyrightText: © 2008 Hewlett-Packard Development Company, L.P.
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 /*
9  * Runner script to run Verify tests
10  */
11 // set the path for where simpletest is
12 $path = '/usr/share/php' . PATH_SEPARATOR;
13 set_include_path(get_include_path() . PATH_SEPARATOR . $path);
14 
15 /* simpletest includes */
16 require_once '/usr/local/simpletest/web_tester.php';
17 require_once '/usr/local/simpletest/reporter.php';
18 
19 //require_once ('../../../tests/fossologyTestCase.php');
20 require_once ('../../../tests/TestEnvironment.php');
21 require_once('../../../tests/testClasses/timer.php');
22 
23 $Svn = `svnversion`;
24 $start = new timer();
25 $date = date('Y-m-d');
26 $time = date('h:i:s-a');
27 print "\nStarting Verify Tests on: " . $date . " at " . $time . "\n";
28 print "Using Svn Version:$Svn\n";
29 $test = new TestSuite('Fossology Repo UI Verification Functional tests');
30 //$test->addTestFile('browseUploadedTest.php');
31 $test->addTestFile('OneShot-lgpl2.1.php');
32 $test->addTestFile('OneShot-lgpl2.1-T.php');
33 $test->addTestFile('verifyFossI16L335U29.php');
34 $test->addTestFile('verifyFoss23D1F1L.php');
35 $test->addTestFile('verifyFossDirsOnly.php');
36 
37 if (TextReporter::inCli())
38 {
39  $results = $test->run(new TextReporter()) ? 0 : 1;
40  print "Ending Verify Tests at: " . date('r') . "\n";
41  $elapseTime = $start->TimeAgo($start->getStartTime());
42  print "The Verify Tests took {$elapseTime}to run\n\n";
43  exit($results);
44 }
45 $test->run(new HtmlReporter());
46 print "<pre>Ending Verify Tests at: " . date('r') . "</pre>\n";
47 $elapseTime = $start->TimeAgo($start->getStartTime());
48 print "<pre>The Verify Tests took {$elapseTime}to run</pre>\n\n";
Definition: timer.php:31