function setUp() { createRC(); $sysconf = getenv('SYSCONFDIR'); //echo "DB: sysconf is:$sysconf\n"; $this->nomos = $sysconf . '/mods-enabled/nomos/agent/nomos'; //echo "DB: nomos is:$this->nomos\n"; }
function setUp() { /* check to see if the files exist and load up the array */ $this->gplv3 = '../../../testing/dataFiles/TestData/licenses/gpl-3.0.txt'; $this->assertTrue(file_exists('../../../testing/dataFiles/TestData/licenses/')); createRC(); $sysconf = getenv('SYSCONFDIR'); $this->nomos = $sysconf . '/mods-enabled/nomos/agent/nomos'; }
public function testHelp() { // determine where nomos is installed createRC(); $sysconf = getenv('SYSCONFDIR'); $nomos = $sysconf . '/mods-enabled/nomos/agent/nomos'; // run it $last = exec("{$nomos} -h 2>&1", $out, $rtn); $usage = 'Usage: /usr/local/etc/fossology/mods-enabled/nomos/agent/nomos [options] [file [file [...]]'; $this->assertEquals($usage, $out[0]); }
function setUp() { /* check to see if the file exists */ $this->gplv3 = '../../../testing/dataFiles/TestData/licenses/gpl-3.0.txt'; $this->assertFileExists($this->gplv3, "OneShotgplv21Test FAILURE! {$this->gplv3} not found\n"); createRC(); $sysconf = getenv('SYSCONFDIR'); //echo "DB: sysconf is:$sysconf\n"; $this->nomos = $sysconf . '/mods-enabled/nomos/agent/nomos'; //echo "DB: nomos is:$this->nomos\n"; }
function setUp() { /* check to see if the file exists */ $this->testdir = '../testdata/NomosTestfiles'; $this->assertFileExists($this->testdir, "NomoFunTest FAILURE! {$this->testdir} not found\n"); createRC(); $sysconf = getenv('SYSCONFDIR'); //echo "DB: sysconf is:$sysconf\n"; $this->nomos = $sysconf . '/mods-enabled/nomos/agent/nomos'; //echo "DB: nomos is:$this->nomos\n"; }
putenv("TESTROOT={$TESTROOT}"); define('TESTROOT', $TESTROOT); } /* when a Jenkins job executes, it sets some environment variables that are available to this script. $WORKSPACE is set to the absolute path of the Jenkins workspace (where the subversion working copy is checked out to) */ $WORKSPACE = NULL; if (array_key_exists('WORKSPACE', $_ENV)) { $WORKSPACE = $_ENV['WORKSPACE']; } $func = TESTROOT . "/functional"; if (@chdir($func) === FALSE) { echo "FATAL!, could not cd to:\n{$func}\n"; exit(1); } createRC(); $sysConf = array(); $sysConf = bootstrap(); putenv("SYSCONFDIR={$GLOBALS['SYSCONFDIR']}"); $_ENV['SYSCONFDIR'] = $GLOBALS['SYSCONFDIR']; $modules = array(); $funcList = array(); // get the list of functional tests to run $modules = parse_ini_file('../dataFiles/funcTests.ini', 1); foreach ($modules as $key => $value) { $funcList[] = $key; } // @todo fix this, I don't think you need to check for workspace. if (is_null($WORKSPACE)) { // back to fossology/src backToParent('../..');