FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
OneShot-Oracle-Berkeley-DB.php
Go to the documentation of this file.
1 <?php
2 /***********************************************************
3  Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
4  Copyright (C) 2015 Siemens AG
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  ***********************************************************/
24 require_once ('CommonCliTest.php');
25 
32 {
37  public $tested_file;
38 
47  {
48  /* Oracle-Berkeley-DB */
49  $oracleBDB_tested_file = dirname(dirname(dirname(__DIR__))).'/testing/dataFiles/TestData/licenses/Oracle-Berkeley-DB.java';
50  list($output,) = $this->runNomos("",array($oracleBDB_tested_file));
51  list(,,,,$licenseOBDB) = explode(' ', $output);
52  $this->assertEquals(trim($licenseOBDB), "Oracle-Berkeley-DB");
53 
54  /* sleepycat */
55  $sleepycatTested_file = dirname(dirname(dirname(__DIR__))).'/testing/dataFiles/TestData/licenses/sleepycat.php';
56  list($outputSc,) = $this->runNomos("",array($sleepycatTested_file));
57  list(,,,,$licenseSc) = explode(' ', $outputSc);
58  $this->assertEquals(trim($licenseSc), "Sleepycat");
59  }
60 }
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Tests for common CLI operations.
Perform a one-shot license analysis on Oracle-Berkeley-DB and sleepycat license.
testOneShotOracle_Berkeley_DB()
Run NOMOS on license files.
list_t type structure used to keep various lists. (e.g. there are multiple lists).
Definition: nomos.h:321
char * trim(char *ptext)
Trimming whitespace.
Definition: fossconfig.c:695