28 require_once (
'../../../tests/fossologyTestCase.php');
29 require_once (
'../../../tests/TestEnvironment.php');
40 $this->assertTrue(file_exists(
'/home/fosstester/.bashrc'),
41 "OneShotgplv21Test FAILURE! .bashrc not found\n");
49 print
"starting OneShotgplv21Test\n";
50 $loggedIn = $this->mybrowser->get($URL);
51 $this->assertTrue($this->myassertText($loggedIn,
'/Upload/'),
52 "OneShotgplv21Test FAILED! Did not find Upload Menu\n");
53 $this->assertTrue($this->myassertText($loggedIn,
'/One-Shot Analysis/'),
54 "OneShotgplv21Test FAILED! Did not find One-Shot Analysis Menu\n");
56 $page = $this->mybrowser->get(
"$URL?mod=agent_nomos_once");
57 $this->assertTrue($this->myassertText($page,
'/One-Shot License Analysis/'),
58 "OneShotgplv21Test FAILED! Did not find One-Shot License Analysis Title\n");
59 $this->assertTrue($this->myassertText($page,
'/The analysis is done in real-time/'),
60 "OneShotgplv21Test FAILED! Did not find real-time Text\n");
62 $this->assertTrue($this->mybrowser->setField(
'licfile',
'/home/fosstester/licenses/gplv2.1'));
64 $this->assertTrue($this->mybrowser->clickSubmit(
'Analyze!'),
65 "FAILED! Count not click Analyze button\n");
67 $page = $this->mybrowser->getContent();
68 $this->assertTrue($this->myassertText($page,
'/LGPL_v2\.1/'),
69 "OneShotgplv21Test FAILED! Did not find exactly 'LGPL_v2.1'\n");
71 $this->assertTrue($this->myassertText($page,
'/One-Shot License Analysis/'),
72 "OneShotgplv21Test FAILED! Did not find One-Shot License Analysis Title\n");
74 $this->assertFalse($this->myassertText($page,
'/-partial/'),
75 "OneShotgplv21Test FAILED! Found -partial in a non partial license file\n");
testOneShotgplv21()
Run NOMOS on GPL_v2.1 license.
Run one-shot license analysis on LGPL_v2.1 license.
Login($User=NULL, $Password=NULL)