} ?> </fieldset> </form> </div> <div id="clear"></div> </div> <?php if (Tst::access(array(3))) { ?> <div id="tabs-2"></div> <?php } ?> <?php if (Tst::access(array(2, 3))) { ?> <div id="tabs-3"></div> <?php } ?> </div> </div> <script type="text/javascript"> $(function() { $("#tabs").tabs(); }); var $tabs = $('#tabs').tabs(); var path = "jobs/";
<?php require_once '../tst.class.php'; if (Tst::access(array(1, 3))) { require_once Tst::$tests . 'files/classes/tests.class.php'; $tests = new Tests(); $table = ''; foreach ($_POST['logs'] as $log) { $table .= json_encode($tests->createTable($tests->getJSONResults(1, 1, $log))); } echo $table; } else { echo 'This is not enabled'; }
<?php require_once '../tst.class.php'; Tst::access(array(2, 3), 1); require_once Tst::$tests . 'files/classes/tests.class.php'; $tests = new Tests(); $loglist = $tests->deleteLogs($_POST['logs']);
<?php // Script to run all tests, intended for cronjob require_once 'tst.class.php'; Tst::access(array(2), 1); require_once Tst::$tests . 'files/classes/tests.class.php'; $tests = new Tests(); $suite = array(Tst::$tests . '/suite'); // Run suite and store logs, but don't return anything $output = json_encode($tests->runTests($suite, 1, 0, 0)); echo $output;
public function readMasterLog($offset = 1, $howMany = 1) { $ret = array(); if (Tst::access(array(1))) { $path = Tst::$tests . 'logs/'; $arr = file($path . 'masterlog.txt', FILE_IGNORE_NEW_LINES); $arrSize = count($arr); $i = 0; while ($i < $howMany && $i < $arrSize) { $test = array_slice($arr, $offset - $i); $testid = substr($test[0], 0, 10); $ret[] = array('testid' => $testid, 'testtime' => date("F j, Y, g:i a", $testid)); $i++; } } return $ret; }