CC-5986 - Fixed unit tests, removed unnecessary code from service execution files
This commit is contained in:
parent
875a9dfd8b
commit
bc604b992e
11 changed files with 424 additions and 41 deletions
|
@ -25,7 +25,7 @@ require_once __DIR__.'/forms/helpers/CustomDecorators.php';
|
|||
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
|
||||
require_once __DIR__.'/upgrade/Upgrades.php';
|
||||
|
||||
require_once (APPLICATION_PATH . "logging/Logging.php");
|
||||
require_once (APPLICATION_PATH . "/logging/Logging.php");
|
||||
Logging::setLogPath('/var/log/airtime/zendphp.log');
|
||||
|
||||
Config::setAirtimeVersion();
|
||||
|
@ -81,7 +81,11 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
}
|
||||
|
||||
protected function _initUpgrade() {
|
||||
UpgradeManager::checkIfUpgradeIsNeeded(); //This will do the upgrade too if it's needed...
|
||||
/* We need to wrap this here so that we aren't checking when we're running the unit test suite
|
||||
*/
|
||||
if (getenv("AIRTIME_UNIT_TEST") != 1) {
|
||||
UpgradeManager::checkIfUpgradeIsNeeded(); //This will do the upgrade too if it's needed...
|
||||
}
|
||||
}
|
||||
|
||||
protected function _initHeadLink()
|
||||
|
|
|
@ -1079,14 +1079,16 @@ SQL;
|
|||
$LIQUIDSOAP_ERRORS = array('TagLib: MPEG::Properties::read() -- Could not find a valid last MPEG frame in the stream.');
|
||||
|
||||
// Ask Liquidsoap if file is playable
|
||||
$ls_command = sprintf('/usr/bin/airtime-liquidsoap -v -c "output.dummy(audio_to_stereo(single(%s)))" 2>&1',
|
||||
/* CC-5990/5991 - Changed to point directly to liquidsoap, removed PATH export */
|
||||
$command = sprintf('liquidsoap -v -c "output.dummy(audio_to_stereo(single(%s)))" 2>&1',
|
||||
escapeshellarg($audio_file));
|
||||
|
||||
$command = "export PATH=/usr/local/bin:/usr/bin:/bin/usr/bin/ && $ls_command";
|
||||
exec($command, $output, $rv);
|
||||
|
||||
$isError = count($output) > 0 && in_array($output[0], $LIQUIDSOAP_ERRORS);
|
||||
|
||||
Logging::info("Is error?! : " . $isError);
|
||||
Logging::info("ls playability response: " . $rv);
|
||||
return ($rv == 0 && !$isError);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue