You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(66) |
Feb
(7) |
Mar
(9) |
Apr
(14) |
May
|
Jun
(14) |
Jul
(18) |
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sebastien D. <sde...@us...> - 2005-01-12 15:49:17
|
Update of /cvsroot/tslogparser/web/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23666/db Added Files: initial_db_schema.inc.php remove_db_data.inc.php update_db.inc.php Log Message: Include the tool on the website --- NEW FILE: initial_db_schema.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the initial database schema The output is derived from phpMyAdmin output. */ /************************************************************* *************** Initial database schema ********************* *************************************************************/ /* This creates the release 1 of the database. * On new installation, this is always the version created then * the updates are called in order up to the latest release. */ function initial_db_schema() { $queries = array(); $queries[]="CREATE TABLE `opts_domains` (" ." `dom_id` int(11) NOT NULL auto_increment," ." `dom_name` varchar(30) NOT NULL default ''," ." `dom_comment` tinytext," ." PRIMARY KEY (`dom_id`)," ." UNIQUE KEY `dom_name` (`dom_name`)" .")"; $queries[]="CREATE TABLE `opts_routines` (" ." `rou_id` int(11) NOT NULL auto_increment," ." `rou_name` varchar(50) NOT NULL default ''," ." `rou_comment` tinytext," ." PRIMARY KEY (`rou_id`)," ." UNIQUE KEY `rou_name` (`rou_name`)" .")"; $queries[]="CREATE TABLE `opts_assoc_dom_rou` (" ." `assoc_dom` int(11) NOT NULL default '0'," ." `assoc_rou` int(11) NOT NULL default '0'," ." PRIMARY KEY (`assoc_dom`,`assoc_rou`)" .")"; $queries[]="CREATE TABLE `opts_assertions` (" ." `assert_id` int(11) NOT NULL auto_increment," ." `assert_routine` int(11) NOT NULL default '0'," ." `assert_text` text," ." PRIMARY KEY (`assert_id`)" .")"; $queries[]="CREATE TABLE `opts_versions` (" ." `ver_id` int(11) NOT NULL auto_increment," ." `ver_name` varchar(50) NOT NULL default ''," ." `ver_comment` tinytext," ." `ver_module` varchar(50) NOT NULL default 'opts'," ." PRIMARY KEY (`ver_id`)," ." UNIQUE KEY `ver_name` (`ver_name`)," ." KEY `ver_name_2` (`ver_name`)" .")"; $queries[]="CREATE TABLE `opts_version_descriptions` (" ." `descr_id` int(11) NOT NULL auto_increment," ." `descr_version` int(11) NOT NULL default '0'," ." `descr_assert` int(11) NOT NULL default '0'," ." `descr_num_assert` int(11) NOT NULL default '0'," ." `descr_num_test` int(11) NOT NULL default '0'," ." `descr_info` varchar(30) default NULL," ." PRIMARY KEY (`descr_id`)" .")"; $queries[]="CREATE TABLE `opts_run` (" ." `run_id` int(11) NOT NULL auto_increment," ." `run_name` varchar(50) NOT NULL default ''," ." `run_comments` tinytext," ." PRIMARY KEY (`run_id`)," ." UNIQUE KEY `run_name` (`run_name`)" .")"; $queries[]="CREATE TABLE `opts_run_results` (" ." `res_run` int(11) NOT NULL default '0'," ." `res_testcase` int(11) NOT NULL default '0'," ." `res_status` varchar(30) NOT NULL default ''," ." `res_log` text," ." PRIMARY KEY (`res_run`,`res_testcase`)" .")"; $queries[]="CREATE TABLE `opts_config` (" ."`cfg_key` VARCHAR( 30 ) NOT NULL ," ."`cfg_val` VARCHAR( 30 ) NOT NULL ," ."PRIMARY KEY ( `cfg_key` )" .")"; $queries[]="INSERT INTO `opts_config` ( `cfg_key` , `cfg_val` )" ."VALUES (" ."'version', '1'" .")"; /* Create the tables */ foreach ($queries as $sql) { mysql_query($sql) or die("Unexpected error: ".mysql_error()); } return "<b>".count($queries)."</b> queries executed."; } ?> --- NEW FILE: update_db.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the function update_db() */ define('LATEST_VERSION', "1"); /* Example of update routine */ // function db_v1_to_v2() // { // $queries=array(); // $queries[]="ALTER TABLE opts_domain add (dom_type int, dom_owner varchar(10))"; // $queries[]="UPDATE opts_config SET cfg_val='2' WHERE cfg_key='version'"; // execute_update_queries($queries); // } function update_db( $curver = 1 ) { $tmpver = $curver; /* This is the template for future database updates */ // if ($tmpver == 1) // $tmpver = db_v1_to_v2(); // if ($tmpver == 2) // $tmpver = db_v2_to_v3(); // ... } function execute_update_queries(&$queries) { foreach ($queries as $sql) mysql_query($sql) or die("Unexpected error: ".mysql_error()); } ?> --- NEW FILE: remove_db_data.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the function remove_db_data() which will delete all the tslogparser database data. USE WITH CARE!! */ function remove_db_data() { $res=0; $tables=array( "opts_config" ,"opts_domains" ,"opts_routines" ,"opts_assoc_dom_rou" ,"opts_assertions" ,"opts_versions" ,"opts_version_descriptions" ,"opts_run" ,"opts_run_results"); foreach ($tables as $table) { $sql = "DROP TABLE ".$table; $tmp = mysql_query($sql); if ($tmp) { $res++; } } return "<b>".$res." / ".count($tables)."</b> table(s) removed."; } ?> |
From: Sebastien D. <sde...@us...> - 2005-01-12 15:49:14
|
Update of /cvsroot/tslogparser/web/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23666/admin Added Files: index.php modules.inc.php upgrade.php Log Message: Include the tool on the website --- NEW FILE: modules.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the base module class which will be used. A module consists in four functions closely related to a testsuite model ("type"). These functions are: int TS_parse(ref parent, string TS_name, string TS_description, string TS_path); int TS_delete(ref parent, int TS_id); int RUN_parse(ref parent, string RUN_name, string RUN_description, int TS_id, string CONTENT); int RUN_delete(ref parent, int RUN_id); An additionnal function is added for informational purpose (no functionnal need) string module_info(void) TS_parse will check for the directory TS_path and analyse its content. In case a correct testsuite structure is found, the testsuite is parsed and put into the database with name and description as provided. The return value is $true if success and $false otherwise. TS_delete will search the database for a testsuite TS_id, then delete it. In case the testsuite contains runs, TS_delete will fail. In case TS_id is not of the correct type, TS_delete will fail. Otherwise, the testsuite is deleted from the database. The return value is $true if success and $false otherwise. RUN_parse will add a new run in the database. It starts with checking that TS_id exists and is of the correct testsuite type. Then it analyzes CONTENT and if a correct run format is found, the results are added into the database with RUN_name and RUN_description information. The return value is $true if success and $false otherwise. RUN_delete will delete RUN_id run from database. It starts with checking that RUN_id belongs to a testsuite of the correct type. Then it removes it from the database. The return value is $true if success and $false otherwise. All 4 previous functions have a 'parent' pointer to the testsuite class. This is used for error reporting directly into the parent's 'last_error' property. module_info will return an HTML-formated text (enclosed in <p> and </p> tags) describing the module and the testsuite it supports. All information related to the module (version, known bugs, ...) are suitable for this function (think of it as the only documentation for the module). */ /* This particular file mechanism is as follow: -> Include each .php file from the modules subdirectory. Each inclusion returns its module name, which is added into the base catalog. -> The function list_modules returns the catalog. -> The function select_module selects one of the modules as the working module. (provider of the modules functions as described earlier). It returns true on success, false if the requested module is not available. -> The function selected_module returns the currently selected module. -> The function deselect_module changes the selection back to none. -> The TS_parse, TS_delete, RUN_parse, RUN_delete and module_info functions are wrappers to the selected module functions, or return an error when no module is selected. */ class testsuite { var $modules_catalog; var $selected_module; var $last_error=""; var $debug=0; /* Class constructor: initializes the modules catalog */ function testsuite() { $this->modules_catalog=array(); $this->selected_module=""; /* Enumerate the modules files and include them */ foreach (glob("modules/*.mod.php") as $filename) { $tmp = require($filename); if (is_string($tmp) && class_exists($tmp)) { $this->modules_catalog[]=$tmp; } else { die("File $filename has an incorrect format\n"); } } } /* Functions for manipulating the selected module */ function list_modules() { return $this->modules_catalog; } function selected_module() { return $this->selected_module; } function select_module($newmod) { if (in_array($newmod, $this->modules_catalog)) { /* Set the module for this execution */ $this->selected_module=$newmod; return true; } return false; } function deselect_module() { $this->selected_module=""; } /* Wrapper functions to the selected module */ function module_info($what="", $module="") { if (!$module) { /* Check the environment is correct */ if ($this->selected_module == "") { die("No selected module"); } $module=$this->selected_module; } if (!is_callable(array($module,'module_info'))) { die("Module ".$module." is malformed.\n"); } /* Call actually the module method */ return call_user_func_array( array($module, 'module_info'), array($what)); } function TS_parse($TS_name, $TS_description, $path) { /* Check the environment is correct */ if ($this->selected_module == "") { die("No selected module"); } if (!is_callable(array($this->selected_module,'TS_parse'))) { die("Module ".$this->selected_module." is malformed.\n"); } /* Call actually the module method */ return call_user_func_array( array($this->selected_module, 'TS_parse'), array(&$this, $TS_name, $TS_description, $path)); } function TS_delete($TS_ID) { /* Check the environment is correct */ if ($this->selected_module == "") { die("No selected module"); } if (!is_callable(array($this->selected_module,'TS_delete'))) { die("Module ".$this->selected_module." is malformed.\n"); } /* Call actually the module method */ return call_user_func_array( array($this->selected_module, 'TS_delete'), array(&$this, $TS_ID)); } function RUN_parse($RUN_name, $RUN_description, $TS_id, &$CONTENT) { /* Check the environment is correct */ if ($this->selected_module == "") { die("No selected module"); } if (!is_callable(array($this->selected_module,'RUN_parse'))) { die("Module ".$this->selected_module." is malformed.\n"); } /* Call actually the module method */ return call_user_func_array( array($this->selected_module, 'RUN_parse'), array(&$this, $RUN_name, $RUN_description, $TS_id, $CONTENT)); } function RUN_delete($RUN_id) { /* Check the environment is correct */ if ($this->selected_module == "") { die("No selected module"); } if (!is_callable(array($this->selected_module,'RUN_delete'))) { die("Module ".$this->selected_module." is malformed.\n"); } /* Call actually the module method */ return call_user_func_array( array($this->selected_module, 'RUN_delete'), array(&$this, $RUN_id)); } } ?> --- NEW FILE: upgrade.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file will set up or upgrade the database schema. */ $root="../"; $_PAGE["title"]="TSLP Database Installation / Upgrade"; /* Output header page */ require($root."header.inc.php"); /* We'll need functions defined in other files */ require($root."database.inc.php"); /* The following files define several usefull functions */ require($root."db/remove_db_data.inc.php"); require($root."db/initial_db_schema.inc.php"); echo "<pre>\n"; /* Connect the database server */ echo "Checking database connexion...: "; $db_link = @mysql_connect($db_server,$db_user,$db_pw); if (!$db_link) { echo "<font color='red'>Fail</font>\n"; echo "<i>MySQL error</i>: <b>".mysql_error()."</b>"; echo "</pre>\n"; echo "<p>Please check your db_inc.php file parameters.</p>\n"; require($root."footer.inc.php"); die(); } else { echo "<font color='green'>Ok</font>\n"; } /* Select the database */ echo "Selecting database............: "; $tmp = @mysql_select_db($db); if (!$tmp) { echo "<font color='red'>Fail</font>\n"; echo "<i>MySQL error</i>: <b>".mysql_error()."</b>"; echo "</pre>\n"; echo "<p>Please check your db_inc.php file parameters.</p>\n"; die(); mysql_close($db_link); require($root."footer.inc.php"); die(); } else { echo "<font color='green'>Ok</font>\n"; } /* Check if the configuration table exists */ $config=array(); echo "Checking current version......: "; $tmp = @mysql_query("SELECT * FROM opts_config"); if ($tmp) { while ($row = mysql_fetch_assoc($tmp)) $config[$row["cfg_key"]]=$row["cfg_val"]; } if (!isset($config["version"])) { if (isset($_GET["reset"])) { echo "<font color='orange'>Building...</font>\n"; echo " Deleting old database content...\n"; echo " ".remove_db_data()."\n"; echo " Creating new content...\n"; echo " ".initial_db_schema()."\n"; $tmp = @mysql_query("SELECT * FROM opts_config"); while ($row = mysql_fetch_assoc($tmp)) $config[$row["cfg_key"]]=$row["cfg_val"]; } else { echo "<font color='red'>Not found</font>\n"; echo "</pre>\n"; echo "<p>You have either an old or an incomplete installation.\n"; echo "The system is unable to upgrade/repair the database.</p>\n"; echo "<p><b>Do you want to install a fresh database? \n"; echo "(ALL EXISTING DATA WILL BE ERASED!)</p>\n"; echo "<form method='GET'>\n"; echo " <p><input type='submit' name='reset' value='Install/Reset'></p>\n"; echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } echo "<b>".$config["version"]."</b>\n"; require_once($root."db/update_db.inc.php"); echo "Checking required version.....: <b>".LATEST_VERSION."</b>\n"; if ( $config["version"] < LATEST_VERSION) { echo " Updating...\n"; update_db($config["version"]); echo " <font color='green'><b>Done!</b> You may start using the new version safely.</font>\n"; } else { echo "Your database is already up-to-date.\n"; } echo "</pre>\n"; db_fini(); require($root."footer.inc.php"); die(); --- NEW FILE: index.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file allows an admin to list the current releases and runs, to delete some entries or to add new ones. We create an array with: ---------------------------------------------------------------------------------- | modules | TS releases | TS description | RUNs | RUN Descriptions | ---------------------------------------------------------------------------------- | opts | 1.5.0 | This is the... | Fedora Core 3 | Run on IA32 ... | | <info> | <delete*> | <edit> | <delete> | <edit> | | | | |----------------------------------| | | | | Solaris 10 | Run on ... | | | | | <delete> | <edit> | | | | |----------------------------------| | | | | <add new> | | | |-------------------------------------------------------------------| | | <add new> | | | | |--------------------------------------------------------------------------------| | ltp | 200412 | This is... | <add new> | | | <info> | <delete> | <edit> | | | | |-------------------------------------------------------------------| | | <add new> | | | | |--------------------------------------------------------------------------------| | nfsv4 | <add new> | | | | | <info> | | | | | |--------------------------------------------------------------------------------| */ $root="../"; $_PAGE["title"]="TSLP Administration Interface"; /* Output header page */ require($root."header.inc.php"); /* We'll need functions defined in other files */ require($root."database.inc.php"); require($root."functions.inc.php"); /* We'll need the database connexion */ db_init(); /* Initialize the plugins modules */ require($root."admin/modules.inc.php"); $tslp = new testsuite(); /* Query the modules list first */ $modules=$tslp->list_modules(); if (isset($_POST["action"])) { $_GET["action"]=$_POST["action"]; if (isset($_POST["add_run"])) $_GET["add_run"] = $_POST["add_run"]; if (isset($_POST["module"])) $_GET["module"] = $_POST["module"]; if (isset($_POST["tsid"])) $_GET["tsid"] = $_POST["tsid"]; if (isset($_POST["run_name"])) $_GET["run_name"] = $_POST["run_name"]; if (isset($_POST["run_descr"])) $_GET["run_descr"] = $_POST["run_descr"]; } /* Parse the GET parameters if any */ if (isset($_GET["action"])) { if (0) { echo "<hr><pre>\n"; print_r($_GET); echo "</pre><hr>\n"; } if (isset($_GET["info_mod"])) $_GET["module"]=$_GET["info_mod"]; /* Check module coherency */ if (isset($_GET["add_ts"]) || isset($_GET["delete_ts"]) || isset($_GET["add_run"]) || isset($_GET["delete_run"]) || isset($_GET["info_mod"])) { if (!isset($_GET["module"])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } if (!in_array($_GET["module"], $modules)) { echo "<b>Module <i>".$_GET["module"]."</i> unavailable.</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } $tslp->select_module($_GET["module"]) or die("Invalid plugin"); } /***************************** *** Module information *** *****************************/ if (isset($_GET["info_mod"])) { echo "<table border=\"1\">\n"; echo " <tr>\n"; echo " <td align=\"center\">\n"; echo " <b>Module Informations</b>\n"; echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>\n"; echo $tslp->module_info(); echo " </td>\n"; echo " </tr>\n"; echo "</table>\n"; echo "<p><a href=\"index.php\">Go back</a> to administration.</p>\n"; } /***************************** *** Add new test suite *** *****************************/ if (isset($_GET["add_ts"])) { /* Check Step 3 parameters and eventually fall back to step 2 */ if (!isset($_GET["ts_name"])) $_GET["ts_name"]=""; if (!isset($_GET["ts_descr"])) $_GET["ts_descr"]=""; if (!isset($_GET["ts_root"])) $_GET["ts_root"]=""; if (($_GET["action"] == 2) && ( !trim($_GET["ts_name"]) || !trim($_GET["ts_root"]))) { echo "<p>Please fill all <b>(*) fields.</b></p>\n"; $_GET["action"] = 1; } if ($_GET["action"] == 2) { /* Here we're in step 2 in process: ready to proceed */ echo "<pre>\n"; $tmp = $tslp->TS_parse($_GET["ts_name"], $_GET["ts_descr"], $_GET["ts_root"]); echo "</pre>\n"; if (!$tmp) { $_GET["action"] = 1; echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; } } if ($_GET["action"] < 2) { /* Output the new testsuite form */ echo "<form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; echo " <input type=\"hidden\" name=\"add_ts\" value=\"add\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; ?> <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> <h3>Add a new release in database.</h3> </td> </tr> <tr> <td>Selected module:</td> <td><b><?php echo $_GET["module"]; ?></b></td> </tr> <tr> <td>New release name(*):</td> <td><input type="text" name="ts_name" maxlength="30" size="80" value=<?php echo "\"".$_GET["ts_name"]."\""; ?>></td> </tr> <tr> <td>New release description:</td> <td><textarea name="ts_descr" rows="3" cols="79"><?php echo $_GET["ts_descr"]; ?></textarea></td> </tr> <tr> <td>Path to new release(*):</td> <td><input type="text" name="ts_root" size="80" value=<?php echo "\"".$_GET["ts_root"]."\""; ?>></td> </tr> <tr> <td colspan=2 align=center><input type="submit" name="send" value="Send"></td> </tr> </table> <p><a href="index.php">Go back</a> to administration index.</p> <?php echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } /* Here we're in step 2 in process: ready to proceed */ $tslp->select_module($_GET["module"]) or die("Invalid plugin"); $tmp = $tslp->TS_parse($_GET["ts_name"], $_GET["ts_descr"], $_GET["ts_root"]); } /***************************** *** Edit test suite *** *****************************/ if (isset($_GET["edit_ts"])) { if (!isset($_GET["tsid"])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } if ($_GET["action"] == 2) { $sql= " UPDATE opts_versions " ." SET ver_comment=".stringToDB($_GET["ts_descr"]) ." WHERE ver_id=".$_GET["tsid"] ." AND ver_module=".stringToDB($_GET["module"]); $tmp = db_execute_insert($sql); if (!$tmp) { $_GET["action"] = 1; echo "<p><b>An error occured,</b> release NOT changed.</p>\n"; } } /* Ask new description */ if ($_GET["action"] < 2) { /* Output the new testsuite form */ echo "<form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; echo " <input type=\"hidden\" name=\"edit_ts\" value=\"del\">\n"; echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; $sql= " SELECT ver_name, ver_comment " ." FROM opts_versions" ." WHERE ver_id=".$_GET["tsid"] ." AND ver_module=".stringToDB($_GET["module"]); $release = db_execute_select($sql); if (!$release) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } ?> <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> <h3>Edit a release description.</h3> </td> </tr> <tr> <td>Release name:</td> <td><?php echo stringFromDB($release[0]["ver_name"]); ?></td> </tr> <tr> <td>Release description:</td> <td><textarea name="ts_descr" rows="3" cols="79"><?php echo $release[0]["ver_comment"]; ?></textarea></td> </tr> <tr> <td colspan=2 align=center><input type="submit" name="Change" value="confirm"></td> </tr> </table> <p><a href="index.php">Go back</a> to administration index.</p> <?php echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } /***************************** *** Delete test suite *** *****************************/ if (isset($_GET["delete_ts"])) { if (!isset($_GET["tsid"])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } /* We already confirmed the deletion */ if ($_GET["action"] == 2) { echo "<pre>\n"; $tmp = $tslp->TS_delete($_GET["tsid"]); echo "</pre>\n"; if (!$tmp) { $_GET["action"] = 1; echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; } } /* Require confirmation */ if ($_GET["action"] < 2) { /* Output the new testsuite form */ echo "<form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; echo " <input type=\"hidden\" name=\"delete_ts\" value=\"del\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; $sql= " SELECT ver_name, ver_comment " ." FROM opts_versions" ." WHERE ver_id=".$_GET["tsid"] ." AND ver_module=".stringToDB($_GET["module"]); $release = db_execute_select($sql); if (!$release) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } ?> <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> <h3>Delete a release from database.</h3> </td> </tr> <tr> <td>Release name:</td> <td><?php echo stringFromDB($release[0]["ver_name"]); ?></td> </tr> <tr> <td>Release description:</td> <td><pre><?php echo stringFromDB($release[0]["ver_comment"]); ?></pre></td> </tr> <tr> <td colspan=2 align=center><input type="submit" name="Delete" value="confirm"></td> </tr> </table> <p><a href="index.php">Go back</a> to administration index.</p> <?php echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } /***************************** *** Add run *** *****************************/ if (isset($_GET["add_run"])) { if (!isset($_GET["tsid"])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } /* Check Step 3 parameters and eventually fall back to step 2 */ if (!isset($_GET["run_name"])) $_GET["run_name"]=""; if (!isset($_GET["run_descr"])) $_GET["run_descr"]=""; if ($_GET["action"] == 2) { if (!isset($_FILES['logfile'])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } $log = file_get_contents($_FILES['logfile']['tmp_name']); if (!$log) { $_GET["action"] = 1; echo "<p>Unable to read the file ".$_FILES['logfile']['name']."</p>\n"; } if ((!trim($_GET["run_name"]) || !trim($_GET["run_descr"]) || !$log)) { echo "<p>Please fill all <b>(*) fields.</b></p>\n"; $_GET["action"] = 1; } } if ($_GET["action"] == 2) { /* Here we're in step 2 in process: ready to proceed */ echo "<pre>\n"; $tmp = $tslp->RUN_parse($_GET["run_name"], $_GET["run_descr"], $_GET["tsid"], $log); echo "</pre>\n"; if (!$tmp) { $_GET["action"] = 1; echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; } } if ($_GET["action"] < 2) { /* Output the new testsuite form */ echo "<form enctype=\"multipart/form-data\" method=\"POST\">\n"; echo " <input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1048576\">"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; echo " <input type=\"hidden\" name=\"add_run\" value=\"add\">\n"; echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; $sql= " SELECT ver_name " ." FROM opts_versions" ." WHERE ver_id=".$_GET["tsid"] ." AND ver_module=".stringToDB($_GET["module"]); $release = db_execute_select($sql); if (!$release) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } ?> <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> <h3>Add a new run logfile in database.</h3> </td> </tr> <tr> <td>Selected module:</td> <td><b><?php echo $_GET["module"]; ?></b></td> </tr> <tr> <td>Selected testsuite release:</td> <td><b><?php echo $release[0]["ver_name"]; ?></b></td> </tr> <tr> <td>New run name(*):</td> <td><input type="text" name="run_name" maxlength="30" size="80" value=<?php echo "\"".$_GET["run_name"]."\""; ?>></td> </tr> <tr> <td>New release description:</td> <td><textarea name="run_descr" rows="3" cols="79"><?php echo $_GET["run_descr"]; ?></textarea></td> </tr> <tr> <td>Log file (*):</td> <td>Upload this file: <input name="logfile" type="file"></td> </tr> <tr> <td colspan="2" align=center><input type="submit" name="send" value="Send"></td> </tr> </table> <p><a href="index.php">Go back</a> to administration index.</p> <?php echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } /***************************** *** Edit run *** *****************************/ if (isset($_GET["edit_run"])) { if (!isset($_GET["runid"])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } if ($_GET["action"] == 2) { $sql= " UPDATE opts_run " ." SET run_comments=".stringToDB($_GET["run_descr"]) ." WHERE run_id=".$_GET["runid"]; $tmp = db_execute_insert($sql); if (!$tmp) { $_GET["action"] = 1; echo "<p><b>An error occured,</b> run NOT changed.</p>\n"; } } /* Ask new description */ if ($_GET["action"] < 2) { /* Output the new testsuite form */ echo "<form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; echo " <input type=\"hidden\" name=\"edit_run\" value=\"edit\">\n"; echo " <input type=\"hidden\" name=\"runid\" value=\"".$_GET["runid"]."\">\n"; $sql= " SELECT run_name, run_comments " ." FROM opts_run" ." WHERE run_id=".$_GET["runid"]; $run = db_execute_select($sql); if (!$run) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } ?> <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> <h3>Edit a run logfile description.</h3> </td> </tr> <tr> <td>Run name:</td> <td><?php echo stringFromDB($run[0]["run_name"]); ?></td> </tr> <tr> <td>Run description:</td> <td><textarea name="run_descr" rows="3" cols="79"><?php echo $run[0]["run_comments"]; ?></textarea></td> </tr> <tr> <td colspan=2 align=center><input type="submit" name="Change" value="confirm"></td> </tr> </table> <p><a href="index.php">Go back</a> to administration index.</p> <?php echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } /***************************** *** Delete run *** *****************************/ if (isset($_GET["delete_run"])) { if (!isset($_GET["runid"])) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } /* We already confirmed the deletion */ if ($_GET["action"] == 2) { echo "<pre>\n"; $tmp = $tslp->RUN_delete($_GET["runid"]); echo "</pre>\n"; if (!$tmp) { $_GET["action"] = 1; echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; } } /* Require confirmation */ if ($_GET["action"] < 2) { /* Output the new testsuite form */ echo "<form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; echo " <input type=\"hidden\" name=\"delete_run\" value=\"del\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; echo " <input type=\"hidden\" name=\"runid\" value=\"".$_GET["runid"]."\">\n"; $sql= " SELECT run_name, run_comments " ." FROM opts_run" ." WHERE run_id=".$_GET["runid"]; $run = db_execute_select($sql); if (!$run) { echo "<b>Invalid parameters</b>\n"; db_fini(); require($root."footer.inc.php"); die(); } ?> <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> <h3>Delete a run from database.</h3> </td> </tr> <tr> <td>Run name:</td> <td><?php echo stringFromDB($run[0]["run_name"]); ?></td> </tr> <tr> <td>Release description:</td> <td><?php echo stringFromDB($run[0]["run_comments"]); ?></td> </tr> <tr> <td colspan=2 align=center><input type="submit" name="Delete" value="confirm"></td> </tr> </table> <p><a href="index.php">Go back</a> to administration index.</p> <?php echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } } /* We are building the global array */ /* list the releases and runs from the database */ $sql= " SELECT ver_name, ver_comment, ver_id, ver_module " ." FROM opts_versions" ." ORDER BY ver_id DESC"; $release_table = db_execute_select($sql); $sql= " SELECT DISTINCT run_id, run_name, run_comments" ." FROM opts_run" ." ORDER BY run_id"; $allrun_table = db_execute_select($sql); $orphaned=array(); foreach ($allrun_table as $myrow) $orphaned[$myrow["run_id"]]=$myrow["run_name"]; $sql= " SELECT DISTINCT run_name, run_id, run_comments, ver_name, ver_module " ." FROM opts_run, opts_run_results, opts_version_descriptions, opts_versions " ." WHERE run_id=res_run" ." AND res_testcase=descr_id" ." AND descr_version=ver_id" ." ORDER BY ver_name"; $run_table = db_execute_select($sql); /* Sort all this information into an array */ $DATA=array(); foreach ($modules as $module) $DATA[$module]=array( "module"=>strip_tags($tslp->module_info("title", $module)), "TS"=>array(), "count"=>1); /* We count the "add new TS line here" */ foreach ($release_table as $release) { if (!isset($DATA[$release["ver_module"]]["TS"])) /* This release' module is not available */ $DATA[$release["ver_module"]]=array("TS"=>array(), "count"=>0); $DATA[$release["ver_module"]]["TS"][$release["ver_name"]]= array("id"=>$release["ver_id"], "comment"=>$release["ver_comment"], "RUNS"=>array(), "count"=>1); /* count the "add new run" here */ $DATA[$release["ver_module"]]["count"] += 1; } foreach ($run_table as $run) { unset($orphaned[$run["run_id"]]); if (!isset($DATA[$run["ver_module"]])) /* This run's module is not available -- really abnormal */ $DATA[$run["ver_module"]]=array("TS"=>array(),"count"=>0); if (!isset($DATA[$run["ver_module"]]["TS"][$run["ver_name"]])) /* This run belongs to no testsuite */ $DATA[$run["ver_module"]]["TS"][$run["ver_name"]]=array("RUNS"=>array(),"count"=>0); $DATA[$run["ver_module"]]["TS"][$run["ver_name"]]["RUNS"][$run["run_id"]]= array( "run_name"=>$run["run_name"], "run_comments"=>$run["run_comments"]); $DATA[$release["ver_module"]]["count"] += 1; $DATA[$release["ver_module"]]["TS"][$run["ver_name"]]["count"] += 1; } //echo "<hr><pre>\n"; //print_r($DATA); //echo "</pre><hr>\n"; if ($orphaned) { echo "<p>The database contains <b>".count($orphaned)."</b> orphaned runs.</p>\n"; } /* We're ready to build the array */ ?> <table border="1" valign="top"> <tr> <td title="TestSuite Module" align="center"><b>Module</b></td> <td title="TestSuite Release Name" align="center"><b>TS Release</b></td> <td title="TestSuite Decription" align="center"><b>TS Description</b></td> <td title="Execution Log Name" align="center"><b>RUN</b></td> <td title="Execution Log Description" align="center"><b>RUN Description</b></td> </tr> <?php /* Output the array content */ foreach ($DATA as $module => $mod_data) { $plugged=isset($mod_data["module"]); $tags=0; echo " <tr>\n"; echo " <td"; if ($mod_data["count"]) echo " rowspan=\"".$mod_data["count"]."\""; if ($plugged) echo " title=\"".$mod_data["module"]."\""; echo " align=\"center\" valign=\"top\">\n"; echo "<p>".$module."</p>\n"; if ($plugged) { echo "<p>\n"; echo " <form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"info_mod\" value=\"$module\">\n"; echo " <input type=\"Submit\" name=\"about\" value=\"About\">\n"; echo " </form>\n"; echo "</p>"; } else echo "<p>Unsupported module</p>\n"; echo " </td>\n"; if ($plugged) { echo " <td align=\"center\" colspan=\"2\">\n"; echo " <form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; echo " <input type=\"submit\" name=\"add_ts\" value=\"Add New Testsuite Version\">\n"; echo " </form>\n"; echo " </td>\n"; echo " <td colspan=\"2\"> </td>\n"; echo " </tr>\n"; } foreach ($mod_data["TS"] as $ts_name => $ts_data) { if ($plugged || ($tags > 0)) echo " <tr>\n"; $known=isset($ts_data["id"]); if ($plugged && $known) { echo " <form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; echo " <input type=\"hidden\" name=\"tsid\" value=\"".$ts_data["id"]."\">\n"; } echo " <td"; if ($ts_data["count"]) echo " rowspan=\"".$ts_data["count"]."\""; echo " align=\"center\" valign=\"top\">\n"; echo "<p><code>".$ts_name."</code></p>\n"; if (!$known) echo " <p><i>Unknown TS</i></p>\n"; else { echo " <p><input type=\"Submit\" name=\"delete_ts\" value=\"Delete\""; if ((!$plugged) || ($ts_data["count"] > 1)) echo " disabled"; echo "></p>\n"; } echo " </td>\n"; echo " <td"; if ($ts_data["count"]) echo " rowspan=\"".$ts_data["count"]."\""; echo " valign=\"top\" align=\"center\">\n"; echo "<p><font size='-1'>".$ts_data["comment"]."</font></p>\n"; if ($known) { echo " <p><input type=\"Submit\" name=\"edit_ts\" value=\"Edit\""; if (!$plugged) echo " disabled"; echo "></p>\n"; } echo "</td>\n"; /* Add new run if we are in a known TS */ if ($known) { echo " <td align=\"center\" colspan=\"2\">"; echo " <input type=\"submit\" name=\"add_run\" value=\"Add New Logfile\"></td>\n"; echo " </tr>\n"; } echo "</form>\n"; foreach ($ts_data["RUNS"] as $run_id => $run_data) { if ($known || ($tags > 1)) echo " <tr>\n"; echo " <form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"runid\" value=\"".$run_id."\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; echo " <td valign=\"top\" align=\"center\">\n"; echo " <p><code>".$run_data["run_name"]."</code></p>\n"; echo " <p><input type=\"submit\" name=\"delete_run\" value=\"Delete\"></p>\n"; echo " </td>\n"; echo " <td valign=\"top\" align=\"center\">\n"; echo " <p><font size='-1'>".$run_data["run_comments"]."</font></p>\n"; echo " <p><input type=\"submit\" name=\"edit_run\" value=\"Edit\"></p>\n"; echo " </td>\n"; echo " </form>\n"; echo " </tr>\n"; $tags = 2; } $tags = 1; } } echo "</table>\n"; /* End of file */ db_fini(); require($root."footer.inc.php"); ?> |
From: Sebastien D. <sde...@us...> - 2005-01-12 15:36:20
|
Update of /cvsroot/tslogparser/web/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21278/modules Log Message: Directory /cvsroot/tslogparser/web/admin/modules added to the repository |
From: Sebastien D. <sde...@us...> - 2005-01-12 15:35:29
|
Update of /cvsroot/tslogparser/web/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21139/db Log Message: Directory /cvsroot/tslogparser/web/db added to the repository |
From: Sebastien D. <sde...@us...> - 2005-01-12 15:35:27
|
Update of /cvsroot/tslogparser/web/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21139/admin Log Message: Directory /cvsroot/tslogparser/web/admin added to the repository |
From: Sebastien D. <sde...@us...> - 2005-01-12 15:25:26
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19151 Modified Files: detailed.php report.php run-browse.php Log Message: Change pages titles Index: run-browse.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/run-browse.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- run-browse.php 11 Jan 2005 10:13:43 -0000 1.5 +++ run-browse.php 12 Jan 2005 15:25:13 -0000 1.6 @@ -29,7 +29,7 @@ require($root."functions.inc.php"); db_init(); -$_PAGE["title"]="Open POSIX TestSuite - Results browser"; +$_PAGE["title"]="Results browser"; require($root."header.inc.php"); Index: detailed.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/detailed.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- detailed.php 3 Jan 2005 16:27:49 -0000 1.3 +++ detailed.php 12 Jan 2005 15:25:08 -0000 1.4 @@ -33,7 +33,7 @@ require($root."database.inc.php"); require($root."functions.inc.php"); -$_PAGE["title"]="Open POSIX TestSuite Testcase Detail"; +$_PAGE["title"]="Testcase Detail"; require($root."header.inc.php"); Index: report.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/report.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- report.php 3 Jan 2005 16:27:49 -0000 1.4 +++ report.php 12 Jan 2005 15:25:13 -0000 1.5 @@ -45,7 +45,7 @@ require($root."database.inc.php"); require($root."functions.inc.php"); -$_PAGE["title"]="Open POSIX TestSuite Reporting Tool"; +$_PAGE["title"]="Reporting Tool"; require($root."header.inc.php"); |
From: Sebastien D. <sde...@us...> - 2005-01-12 14:23:02
|
Update of /cvsroot/tslogparser/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv611 Modified Files: support.php Log Message: Added links to INSTALL and USAGE files in support page Index: support.php =================================================================== RCS file: /cvsroot/tslogparser/web/support.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- support.php 11 Jan 2005 11:10:25 -0000 1.2 +++ support.php 12 Jan 2005 14:22:37 -0000 1.3 @@ -4,6 +4,34 @@ ?> <table border='0' width='100%'> <tr> + <td bgcolor='#90ACC8'> + <h2><font color='#fffffe'> Installation procedure</font></h2> + </td> + </tr> + <tr><td> </td></tr> + <tr> + <td> +The installation procedure can be found +<a href="http://cvs.sourceforge.net/viewcvs.py/tslogparser/tslogparser/INSTALL?view=markup"> +in the <code>INSTALL</code> file</a> from your <code>tslogparser</code> package. + </td> + </tr> + <tr><td> </td></tr> + <tr> + <td bgcolor='#90ACC8'> + <h2><font color='#fffffe'> User's Manual</font></h2> + </td> + </tr> + <tr><td> </td></tr> + <tr> + <td> +The description of the administrative tasks and user commands can be found +<a href="http://cvs.sourceforge.net/viewcvs.py/tslogparser/tslogparser/USAGE?view=markup"> +in the <code>USAGE</code> file</a> from your <code>tslogparser</code> package (added after release v03). + </td> + </tr> + <tr><td> </td></tr> + <tr> <td bgcolor='#90ACC8'> <h2><font color='#fffffe'> Getting help</font></h2> </td> |
From: Sebastien D. <sde...@us...> - 2005-01-12 14:00:15
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27717 Modified Files: HISTORY INSTALL Added Files: USAGE Log Message: Documentation update --- NEW FILE: USAGE --- This file contains the usage directives for the tslogparser tool (light User's manual / collection of HOWTO's) It contains the following sections: 1: Enter a testsuite in the database. 2: Enter new results in the database. 3: Explore existing logs 4: Browse and filter a logfile 5: Compare logs 6: For more... --------------------- 1 - Enter a test suite in the database ----------------------- You need at this point a working installation of the tslogparser tool. See INSTALL file if you don't have it yet. We'll suppose in the rest of this file that your installation is accessible from http://localhost/tslogparser/ You may change this to fit your own setup. -> In case you're not using tslogparser on localhost, you need to upload the testsuite files on the server filesystem. We'll suppose that the server can access your testsuite files from /home/test/posixtestsuite-1.5.0 WARNING: archived testsuite is not supported yet; you need a plain testsuite package. -> Point your browser to the admin interface: http://localhost/tslogparser/admin/ You should see a table with the list of supported testsuites formats (Module) and the releases already present in the database. You can click the "About" button to get more information about each module. NOTE: In case there is no module for the testsuite you want to parse, you may check the tslogparser.sourceforge.net website for user contributed modules and write your own module (use the tslogparser mailing list for more information / support). -> Click the "Add new testsuite version" button corresponding to the correct module for the testsuite you're wanting to enter. -> A new array will appear with the current module as a reminder, and then several fields. New release name : Enter a short text describing your release (eg. "Release 1.5.0") New release description: You can give detailed information on the testsuite, such as the date, the origin, patchs, etc... Path to new release : Enter the path on the filesystem to the testsuite files (eg. "/home/test/posixtestsuite-1.5.0") -> Click "Send" when you're ready. The tool will parse the testsuite and tell you the errors/warnings/informations on the next page. Once it is finished, you can see your new release appeared on the administration page. --------------------- 2 - Enter new results in the database ----------------------- Here we are assuming that you've run a testsuite which release is already in the database. If it is not the case, please see previous section to let tslogparser learn the testsuite release. Your run has generated a log file ('logfile' in OPTS). -> Go to the administration interface http://localhost/tslogparser/admin/ -> Look for the testsuite release corresponding to your run, and then push the "Add New Logfile" button of this release. -> You get a new table showing a reminder of the current module and TS release, then you are asked to enter the following informations: New Run Name : Enter a short text describing your run (eg. "Fresh Fedora Core 3") New Release Description: Enter all the information related to this run, as for example the command line options, kernel patchs, ... Log file : Browse to your log file and select it. The compression is not supported yet, so be sure to provide clear plain-text file. -> Press "Send" when you are done. This will upload your logfile to the server, then the file is parsed, information is displayed on the next page and if successful the result is inserted in the database. The uploaded file is destroyed each time so in case of error you'll have to upload again. You should see the new run appear in the administration interface and be able to browse inside it (see next section). --------------------- 3 - Explore existing logs ----------------------- To be able to browse results, you'll have to enter them in the database. Refer to previous sections for more informations. -> Open your browser to the tslogparser root. http://localhost/tslogparser/ This should redirect you automatically to the run-browse.php page. You can of course have a different index.php with a link to the run-browse.php file. -> (optionnal) If your database contains runs froms several modules (for example opts, ltp, nfs, ...) you'll have to choose which results you want to browse. There is no point in comparing different testsuites releases. -> Now you can see a list of testsuite releases and runs. -> Click "browse" to enter the detail of a particular run. -> Check the boxes of several runs and then click "Compare selected" at the bottom to compare several runs. In the current version, only runs from the same TS release can be compared -- this may change in future releases. --------------------- 4 - Browse and filter a logfile ----------------------- When you click "browse" from the run-browse.pgp page, you enter the log browser interface. See previous section(s) if you cannot see a "browse" button. The browser interface contains several parts: (*) The commands toolbar at the top: Reload: Push this to reload the page, in case something went wrong at load time. (your browser 'Reload' facility may bother with POST data re-posting) Show logs / Hide logs: This will include each test log in the current page display. When the logs are hidden, the "(log)" indicator is happened to the test case status to signal when a log message is available. When the logs are shown, an additionnal column in the table contains the log text when available. Show assertions / Hide assertions: This will display the assertion text which is tested by the corresponding testcase on the page. When hidden, you can always access this information by entering the test details. (*) The Statistics and filter table. This table shows the list of status which are present in the logfile. For each status, it gives the number of testcases which returned this status (for example 4 tests PASSED, 2 tests FAILED, ...). Show / Hide : push this putton will show or hide the corresponding tests from the table. This can be used for example to hide PASSED tests, or to filter only the compilation failures, or whatever... When you open the page, the default is to hide all PASSED and SKIP tests and show everything else. (*) The results. The table below shows the tests status list, testcase names, status, optionaly logs and assertions. You can click on a testcase status to get a full summary of this testcase result. --------------------- 5 - Compare logs ----------------------- From the browser page (http://localhost/tslogparser/) in case you have several runs in a given TS release (or module in future versions) you are able to check some runs and push the "Compare selected" button. There is no limitation on the number of selectable runs, but the machine memory. I would suggest not to compare more than 3 runs but you just try and see your limitation. Once you push "Compare Selected", you enter in the log comparator module. This module is very similar to the log browser, with small changes: (*)Command toolbar: Reload: reloads the page. Show / Hide common results: Choose whether testcases with identical results should be shown on the page. Show / Hide assertions: Tested assertion text is displayed or not on the page. (*) Statistics: For each test status, the number of testcases returning this status for each run is shown. In the current version no filtering command is available here. (*) The table. As in log browser mode, the table then shows for each testcase and each runs the status and a link to detailed test information. -------------------------------- 6 - For more... ------------------------------------ This usefull script is in beta version yet, your help and comments are precious! The right place to discuss this product is the mailing list: tsl...@li... (subscribe at http://lists.sourceforge.net/lists/listinfo/tslogparser-discuss) You can also directly contact the author: seb...@ex... Index: INSTALL =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/INSTALL,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- INSTALL 10 Jan 2005 18:09:51 -0000 1.3 +++ INSTALL 12 Jan 2005 14:00:00 -0000 1.4 @@ -1,16 +1,64 @@ -Steps to set up: +This file describes the process for installing the tslogparser tool. -@@ STEP 1: Installation of the scripts. +It contains the following sections: +1. Copy the files +2. Set up the database server +3. Configure tslogparser +4. Initial database creation --> Copy all the files with the directory structure to - a directory accessible from your web server (with PHP - execution rights). --> Edit the db_inc.php file, enter the following information: +---------------------- STEP 1: Copy the files. ------------------------------- + +-> Put the tslogparser files in a suitable directory for your setup. + For example: + cd /opt + mkdir tslogparser + + cd + tar zxvf tslogparser*.tar.gz + cd tslogparser* + + cp -R * /opt/tslogparser + +-> Then make this directory accessible from your web server. + cd /var/www/html + ln -s /opt/tslogparser + +-> Check your web server can access the files. + Open http://localhost/tslogparser/INSTALL in a web browser. + You may need extra set-up to allow for PHP files execution. + Check your webserver configuration file. + + + +------------------- STEP 2: Set up the database server. ------------------------- + +You need a working MySQL installation here. +You can execute the following commands from the command line client or +from a GUI such as PhpMyAdmin. + +In case you're not root on the database server, you can just use your +login and database names for the tslogparser tool. + +-> Create a new user 'tslogparser' + GRANT USAGE ON *.* TO tslogparser@localhost IDENTIFIED BY 'secret'; + +-> Create a new database 'tslogparser' + CREATE DATABASE `tslogparser` ; + +-> Give rights on the database to the user + GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER ON tslogparser.* TO tslogparser@localhost; + + + + +------------------ STEP 3: Configure tslogparser -------------------------------- + +-> Edit the file db_inc.php with your database configuration information: (*) server name or IP. (*) user name (*) user password - (*) database name -- this database must already exist. + (*) database name. Example of such a file: $ cat > db_inc.php <<EOF @@ -18,99 +66,31 @@ // Database server name or IP: $db_server="localhost"; // Database name: -$db="site"; +$db="tslogparser"; // Database user login: -$db_user="apache"; +$db_user="tslogparser"; // Database password: -$db_pw="apache"; +$db_pw="secret"; ?> EOF NOTE: You may put this file anywhere for security reasons; just - let the file database.inc.php know where it is. - --> Point your browser to http://<your.server>/<your/path>/admin/upgrade.php - then follow the instruction to create the tables. - --> The initial database is empty. You may go to - http://<your.server>/<your/path>/admin/ - to start entering your test suite releases and runs (see below). - - -@@ STEP 2: Putting your results in the database. - -As a prerequisite, we'll suppose you have run the Open POSIX TestSuite -several times and collected the 'logfile' results in separate files -("logfile1", "logfile2", ...) - -All the described operations are done from the admin/index.php page. - --> Make the system know about your testsuite. - The first step is to provide the system with the description of your - testsuite. - Check that there is an installed module corresponding to your testsuite. - We'll take the Open POSIX Test Suite as an example (module 'opts'). - To see information about a module, you can click the "about" button. - - Next to your desired module, there is an "Add New Testsuite Version" - button. Push it. - - The page asks for several descriptive information -- enter anything - you like, but I'd suggest to put explicit naming convention and description. - exemple: - Name: Release1.5.0 - Desc: This is the official release from ... - - The latest field asks for the directory name where your posixtestsuite is. - Please note this is the path on you WEB SERVER FILESYSTEM. - The script does not support uploading of files; so you'll have to upload - you files on the webserver, and then provide the path to it, e.g.: - /var/uploaded/posixtestsuite - Please note that you must provide path to an uncompressed archive. - - Once you validate; you should see a log message telling what has been - processed and what has been ignored. Some testcases are excluded as they've - no matching assertion -- this is a bug in OPTS, it may be fixed later. - Below, you can see the array with your new release added. - - --> Next step is to let the system know about your runs (logfiles). - Next to your new release, you can see an "Add New Logfile" button. - Push it. - - From this screen, you get a reminder of the module and testsuite, - then you can enter a name and a description for your run. - As previously, i'd suggest to give as detailed information as possible, e.g.: - Name: BOS-ia32-latest(20041119) - Desc: Run in BullOpenSource, on dual-i686 box, with kernel 2.6.9 - and NPTL 2004/11/19, gcc 3.4.2. See details at http://... - - You then have to choose your logfile. The compression is not supported yet, - so be sure to provide clear plain-text file. The file will be uploaded, - then parsed and destroyed. There is no backup of the data but in the database. + let the file database.inc.php know where it is located, and + make sure that your web server process can access it (user apache). - By pushing Send, you should see some processing and then a log result - telling how many tests were added to the database. It is normal to see - some tests ignored (those which have no corresponding assertion). -@@ STEP 3: Use your results. - - -> Just open your browser to the script root. You'll be redirected to - the run-browse.php file. From this page you can explore your results, - get statistics, and compare several runs. - +------------------- STEP 4: Initial database creation ------------------------ +-> Open the admin/upgrade.php file from your web client. + for example: + http://localhost/tslogparser/admin/upgrade.php + Follow the instructions to create the database tables. -@@ STEP 4: Provide feedback and improvements. -This usefull script is in beta version yet, -your help and comments are precious! -The right place to discuss this product is the mailing list: -ts...@li... -(subscribe at http://lists.sourceforge.net/lists/listinfo/tslogparser-discuss) - -You can also directly contact the author: seb...@ex... +------------------- STEP 5: You're ready :) ----------------------------------- -@@ STEP 5: Enjoy :) +The tslogparser is now installed. You may start adding new testsuites and logs +from the admin interface (http://localhost/tslogparser/admin/). See USAGE file +for more information. Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- HISTORY 11 Jan 2005 11:08:33 -0000 1.13 +++ HISTORY 12 Jan 2005 14:00:00 -0000 1.14 @@ -1,3 +1,7 @@ +2005-01-12: +- Update INSTALL file according to Bryce's recommandations. +- New file: USAGE. + 2005-01-11: tag v03 - Update run browser to support modules and new administration interface. |
From: Sebastien D. <sde...@us...> - 2005-01-11 11:10:45
|
Update of /cvsroot/tslogparser/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32670 Modified Files: downloads.php features.php run-browse.php support.php Log Message: Update to v03 release Index: support.php =================================================================== RCS file: /cvsroot/tslogparser/web/support.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- support.php 25 Nov 2004 14:26:05 -0000 1.1.1.1 +++ support.php 11 Jan 2005 11:10:25 -0000 1.2 @@ -14,7 +14,7 @@ <p>The first place where you can find support on installation or use of the <code>tslogparser</code> tool is the dedicated mailing-list.</p> - <p>Information on subscibtion can be found + <p>Information on subscribtion can be found <a href="https://lists.sourceforge.net/lists/listinfo/tslogparser-discuss"> <i>here</i></a>.</p> <p>The mailing list archive can be found Index: downloads.php =================================================================== RCS file: /cvsroot/tslogparser/web/downloads.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- downloads.php 25 Nov 2004 14:26:06 -0000 1.1.1.1 +++ downloads.php 11 Jan 2005 11:10:25 -0000 1.2 @@ -11,7 +11,7 @@ <tr><td> </td></tr> <tr> <td> - <p>The latest stable release is <b>0.2</b> (Nov 23, 2004).</p> + <p>The latest stable release is <b>0.3</b> (Jan 11, 2005).</p> <p>It can be downloaded from <a href="http://sourceforge.net/project/showfiles.php?group_id=124567"> this place (SourceForge.net)</a>.</p> Index: run-browse.php =================================================================== RCS file: /cvsroot/tslogparser/web/run-browse.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- run-browse.php 25 Nov 2004 14:26:06 -0000 1.1.1.1 +++ run-browse.php 11 Jan 2005 11:10:25 -0000 1.2 @@ -6,7 +6,7 @@ <tr> <td bgcolor="#90ACC8"> <h2><font color="#fffffe"> - Experiencing <code>tslogparser</code></font></h2> + Experience <code>tslogparser</code></font></h2> </td> </tr> <tr><td> </td></tr> Index: features.php =================================================================== RCS file: /cvsroot/tslogparser/web/features.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- features.php 25 Nov 2004 14:26:06 -0000 1.1.1.1 +++ features.php 11 Jan 2005 11:10:25 -0000 1.2 @@ -5,16 +5,48 @@ <table border='0' width='100%'> <tr> <td bgcolor="#90ACC8"> - <h2><font color="#fffffe"> Version 0.2</font></h2> + <h2><font color="#fffffe"> Version 0.3</font></h2> </td> </tr> <tr><td> </td></tr> <tr> <td> - <p>Some screenshots of the main features are available + <p>Some screenshots of the main features are available <a href="http://sourceforge.net/project/screenshots.php?group_id=124567"> <i>here</i></a>.</p> - <p>The current release supports the following features:</p> + <p>Here is a list of new features from this release. + See below for older features.</p> + <h3>Administration Interface</h3> + <p>All database management tasks are now centralized in + an administration page. From this page, you can add + a new testsuite release, edit a testsuite comments, + delete a testsuite, add a new logfile for an existing + testsuite, edit the logfile comments, and delete the + logfile.</p> + <h3>Testsuite Extensibility (with plug-ins)</h3> + <p>The new administration interfaces uses plug-ins modules + for all the administrative tasks on a database. It becomes + very easy to add support for a new testcase; you only have + to add your new module in the modules directory.</p> + <h3>Installation and Upgrade Interface</h3> + <p>The tool is now able to create its working database structure. + You just have to tell it how to connect to your database, and + then open the installation procedure. It will take care of + everything.</p> + <p>The same module will be used on future releases when database + changes will occur. It maintains a database version number in a + configuration table.</p> + </td> + </tr> + <tr><td> </td></tr> + <tr> + <td bgcolor="#90ACC8"> + <h2><font color="#fffffe"> Version 0.2</font></h2> + </td> + </tr> + <tr><td> </td></tr> + <tr> + <td> <h3>Open POSIX TestSuite parsing</h3> <p>The system can analyse a posixtestsuite directory (what you get once you extract the downloaded archive) |
From: Sebastien D. <sde...@us...> - 2005-01-11 11:08:43
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32292 Modified Files: HISTORY Log Message: Release Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- HISTORY 11 Jan 2005 10:13:43 -0000 1.12 +++ HISTORY 11 Jan 2005 11:08:33 -0000 1.13 @@ -1,4 +1,4 @@ -2005-01-11: +2005-01-11: tag v03 - Update run browser to support modules and new administration interface. 2005-01-10: |
From: Sebastien D. <sde...@us...> - 2005-01-11 10:48:41
|
Update of /cvsroot/tslogparser/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26999 Modified Files: internals.php Log Message: Update internals desciption Index: internals.php =================================================================== RCS file: /cvsroot/tslogparser/web/internals.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- internals.php 25 Nov 2004 14:26:05 -0000 1.1.1.1 +++ internals.php 11 Jan 2005 10:48:20 -0000 1.2 @@ -31,22 +31,28 @@ <tr> <td> <p>The <code>tslogparser</code> tool can be split into - several modules: Testsuite specifics; - Database system specifics; Generic processing.</p> + several modules: Installation / Update, + Generic Administration; TestSuite Specifics; + Database system specifics; Visualization.</p> + <p> </p> + <h3>Installation / Update</h3> + <p>This module checks on each page loading that + the database is up-to-date, and is also responsible + for creating or upgrading the database schema as + needed.</p> + <p> </p> + <h3>Generic Administration</h3> + <p>This is the user interface part of the database + management. It provides the privilegied user with + the tools to add new testsuite releases and new + log files.</p> <p> </p> <h3>Testsuite Specifics Module</h3> - <p>This module is in charge of parsing a testsuite - version (for example, OPTS v1.4.2) and save the - parsed data into - the database. It shall also parse logfiles issued - from testsuite runs and save this - in the database.</p> - <p>This module is very dependent on the database structure - and the testsuite structure, and therefore it has to - be implemented as a "e;plug-in" to allow for - new testsuite format addition.</p> - <p>In the current implementation, only the OPTS module - (testsuite parsing and logfile parsing) is provided.</p> + <p>The administration interface enumerates the plug-ins + files. Each plug-in provides the functions to add a + new testsuite, delete a testsuite, add a new run and + delete a run. See source file modules.inc.php for more + information on this.</p> <p> </p> <h3>Database System Specifics Module</h3> <p>This module aims to provide a simple abstraction layer @@ -65,17 +71,10 @@ extract information (filtering, statistics, ...). Last but not least, it permits to compare several runs (of the same testsuite -- same testsuite release currently).</p> - <p>All this processing <b>is and must remain</b> independent - on the testsuite structure.</p> + <p>All this processing is <b>NOT</b> dependent + on the testsuite structure (or plug-in).</p> <p> </p> <h3>Future Modules</h3> - <p>Some modules should be added to complete the system: - <ul> - <li>An <b>Installation</b> module, to create the database - structure without using an external tool.</li> - <li>An <b>Administration</b> module, to manage database - entries and allow for cleanup of old runs.</li> - </ul> <p>Please refer to the <code>TODO</code> file to see other possible improvements.</p> </td> |
From: Sebastien D. <sde...@us...> - 2005-01-11 10:34:51
|
Update of /cvsroot/tslogparser/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24423 Modified Files: footer.inc.php tlp-db.pdf tlp-db.png Log Message: Update internals graphics Index: tlp-db.pdf =================================================================== RCS file: /cvsroot/tslogparser/web/tlp-db.pdf,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsqc3LWu and /tmp/cvstC1v7n differ Index: tlp-db.png =================================================================== RCS file: /cvsroot/tslogparser/web/tlp-db.png,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsvta6MT and /tmp/cvsvr0DfN differ Index: footer.inc.php =================================================================== RCS file: /cvsroot/tslogparser/web/footer.inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- footer.inc.php 25 Nov 2004 14:26:06 -0000 1.1.1.1 +++ footer.inc.php 11 Jan 2005 10:34:40 -0000 1.2 @@ -1,4 +1,22 @@ <?php +/* + * Copyright (c) 2004, Bull S.A.. All rights reserved. + * Created by: Sebastien Decugis + + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston MA 02111-1307, USA. + */ + + if (!isset($_PAGE["title"])) die("Incorrect page inclusion.\n"); ?> |
From: Sebastien D. <sde...@us...> - 2005-01-11 10:13:55
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19991 Modified Files: HISTORY database.inc.php run-browse.php session.inc.php Log Message: Update browser interface Index: run-browse.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/run-browse.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- run-browse.php 3 Jan 2005 16:27:49 -0000 1.4 +++ run-browse.php 11 Jan 2005 10:13:43 -0000 1.5 @@ -33,6 +33,72 @@ require($root."header.inc.php"); +echo "<p>Go to <a href=\"".$root."admin/\">Administration Interface</a></p>\n"; + +if (isset($_GET["deselect_module"])) + unset($_SESSION["module"]); + +/* Count runs by modules in the database */ +$sql = " SELECT DISTINCT ver_module, ver_id, res_run" + ." FROM opts_versions, opts_version_descriptions, opts_run_results" + ." WHERE ver_id=descr_version" + ." AND res_testcase=descr_id"; +$runs = db_execute_select($sql); + +$infos=array(); +foreach ($runs as $row) + if (isset($infos[$row["ver_module"]])) + $infos[$row["ver_module"]]++; + else + $infos[$row["ver_module"]]=1; + +if (isset($_GET["module"])) + if (isset($infos[$_GET["module"]])) + $_SESSION["module"]=$_GET["module"]; + +/* If we found no showable results */ +if (count($infos)==0) +{ + echo "<p>There is no displayable result in the database yet.\n"; + echo "You may add some from the Administration Interface.</p>"; + db_fini(); + require($root."footer.inc.php"); + die(); +} + +/* If we have only 1 module, we don't need to ask the user */ +if (count($infos)==1) + $_SESSION["module"]=$runs[0]["ver_module"]; + +/* Otherwise, the user need to choose a module */ +if (count($infos)>1) +{ + if (!isset($_SESSION["module"])) + { + /* Show modules list and let the user choose one */ + echo "<p>Please choose a module from the list:</p>\n"; + echo "<ul>\n"; + foreach ($infos as $module => $cnt) + { + echo "<li><a href=\"".$_SERVER["PHP_SELF"]."?module=$module\">"; + echo "<b>$module</b></a> ($cnt logfiles)</li>\n"; + } + echo "</ul>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + else + { + /* Show selected module and let the user cancel its selection */ + echo "<p>You're viewing the <i>".$_SESSION["module"]."</i> results currently.\n"; + echo "<a href=\"".$_SERVER["PHP_SELF"]."?deselect_module=1\">"; + echo "Click here</a> to change.</p>\n"; + } +} + + +/* Now, proceed to the display */ /* @@ -47,18 +113,20 @@ ." WHERE " ." ver_id=descr_version"; */ - $sql= " SELECT DISTINCT ver_name, ver_comment, ver_id " ." FROM opts_versions, opts_version_descriptions" ." WHERE ver_id = descr_version " + ." AND ver_module = ".stringToDB($_SESSION["module"]) ." ORDER BY ver_id DESC"; $release_table = db_execute_select($sql); + $sql= " SELECT DISTINCT run_name, run_comments, ver_name, run_id " ." FROM opts_run, opts_run_results, opts_version_descriptions, opts_versions " ." WHERE run_id=res_run" ." AND res_testcase=descr_id" ." AND descr_version=ver_id" + ." AND ver_module = ".stringToDB($_SESSION["module"]) ." ORDER BY ver_name"; $run_table = db_execute_select($sql); @@ -82,11 +150,11 @@ /* Ok, now we'll display the result on the html page */ ?> - <h3>Available results in database</h3> + <h3>Available results for the <?php echo $_SESSION["module"]; ?> module</h3> <table border="1"> <tr> - <td valign='top' align='center'><b>TestSuite Release</b> (<a href="admin/parse-opts-release.php">add</a>)</td> + <td valign='top' align='center'><b>TestSuite Release</b></td> <td valign='top' align='center' colspan="2"><b>Run Designation</b></td> <td valign='top' align='center'><b>Action</b></td> <td valign='top'><b>Comments</b></td> @@ -94,6 +162,7 @@ <?php if (!$infos) { + /* This should never happen */ ?> <tr> <td colspan=5><i>Sorry, no data was found.</i></td> @@ -105,7 +174,7 @@ foreach($infos as $release => $data) { echo " <tr>\n"; - echo " <td"; + echo " <td valign=\"top\""; if (count($data["runs"])>1) echo " rowspan=\"".(count($data["runs"])+2)."\""; elseif (count($data["runs"])==1) @@ -113,16 +182,7 @@ echo ">\n"; echo " <font color='orange'>".stringFromDB($release)."</font>\n"; echo " </td>\n"; - echo " <td colspan='2' align=center>\n"; - echo " <i><font color='orange'>(testsuite)</font></i>\n"; - echo " </td>\n"; - echo " <td>\n"; - echo " <form method='POST' action='admin/enter-new-run.php'>\n"; - echo " <input type='hidden' name='opts_release' value=\"".$data["id"]."\">\n"; - echo " <input type='submit' name='Add' value='Add a new run'>\n"; - echo " </form>\n"; - echo " </td>\n"; - echo " <td>\n"; + echo " <td colspan='4' align=left>\n"; echo " <i><font color='orange'>".stringFromDB($data["comment"])."</font></i>\n"; echo " </td>\n"; echo " </tr>\n"; Index: database.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/database.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- database.inc.php 10 Jan 2005 18:09:51 -0000 1.4 +++ database.inc.php 11 Jan 2005 10:13:43 -0000 1.5 @@ -46,7 +46,7 @@ /* Initialize link to the db and grep configuration */ function db_init() { - global $db_server,$db_user,$db_pw, $db, $db_link, $CONFIG; + global $db_server,$db_user,$db_pw, $db, $db_link, $CONFIG, $root; $db_link = mysql_connect($db_server,$db_user,$db_pw) or die("Failed to connect to MySQL: ".mysql_error()."\n"); Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- HISTORY 10 Jan 2005 18:09:49 -0000 1.11 +++ HISTORY 11 Jan 2005 10:13:43 -0000 1.12 @@ -1,3 +1,6 @@ +2005-01-11: +- Update run browser to support modules and new administration interface. + 2005-01-10: - Added database installation and update procedure. - Added checking for database version on each use. Index: session.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/session.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- session.inc.php 6 Jan 2005 17:29:49 -0000 1.2 +++ session.inc.php 11 Jan 2005 10:13:43 -0000 1.3 @@ -34,7 +34,7 @@ */ $authorized_session_vars=array( - "current_module"=>array("run-browse.php") + "module"=>array("run-browse.php"), ); |
From: Sebastien D. <sde...@us...> - 2005-01-10 18:10:13
|
Update of /cvsroot/tslogparser/tslogparser/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15763/admin/modules Modified Files: opts.mod.php Log Message: New installation procedure; fixes; documentation updated Index: opts.mod.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules/opts.mod.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- opts.mod.php 4 Jan 2005 17:46:14 -0000 1.4 +++ opts.mod.php 10 Jan 2005 18:09:52 -0000 1.5 @@ -306,7 +306,7 @@ { $sql = "INSERT INTO opts_routines ( rou_name, rou_comment ) " ."VALUES ( ".stringToDB($routine)."," - .stringToDB("Added on ".date("F j, Y")." with release '$new_release_name'")." )"; + .stringToDB("Added on ".date("F j, Y")." with release '$TS_name'")." )"; if ($parent->debug > 1) echo htmlentities($sql)."<br>\n"; if (db_execute_insert($sql)) |
From: Sebastien D. <sde...@us...> - 2005-01-10 18:10:09
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15763 Modified Files: HISTORY INSTALL README TODO database.inc.php db_inc.php Log Message: New installation procedure; fixes; documentation updated Index: INSTALL =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/INSTALL,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- INSTALL 9 Dec 2004 02:31:18 -0000 1.2 +++ INSTALL 10 Jan 2005 18:09:51 -0000 1.3 @@ -2,13 +2,17 @@ @@ STEP 1: Installation of the scripts. --> create the tables in the MySQL database according to the file - db/dbresults.sql (you can import directly the file in phpMyAdmin). +-> Copy all the files with the directory structure to + a directory accessible from your web server (with PHP + execution rights). --> create a file containing your database access information, and - include it from: - database.inc.php - as described. Here is an example of such a configuration file: +-> Edit the db_inc.php file, enter the following information: + (*) server name or IP. + (*) user name + (*) user password + (*) database name -- this database must already exist. + + Example of such a file: $ cat > db_inc.php <<EOF <?php // Database server name or IP: @@ -22,9 +26,15 @@ ?> EOF --> access the scripts from your browser via your web server - (tested on apache only but should work on any server - with PHP 4 or 5 support), and check no error is displayed. +NOTE: You may put this file anywhere for security reasons; just + let the file database.inc.php know where it is. + +-> Point your browser to http://<your.server>/<your/path>/admin/upgrade.php + then follow the instruction to create the tables. + +-> The initial database is empty. You may go to + http://<your.server>/<your/path>/admin/ + to start entering your test suite releases and runs (see below). @@ STEP 2: Putting your results in the database. @@ -33,43 +43,51 @@ several times and collected the 'logfile' results in separate files ("logfile1", "logfile2", ...) +All the described operations are done from the admin/index.php page. + -> Make the system know about your testsuite. The first step is to provide the system with the description of your - testsuite. To achieve this, you'll have to open the - admin/parse-opts-release.php - page (i.e. http://localhost/admin/parse-opts-release.php). + testsuite. + Check that there is an installed module corresponding to your testsuite. + We'll take the Open POSIX Test Suite as an example (module 'opts'). + To see information about a module, you can click the "about" button. + + Next to your desired module, there is an "Add New Testsuite Version" + button. Push it. + The page asks for several descriptive information -- enter anything you like, but I'd suggest to put explicit naming convention and description. - example: - Name: OPTS-CVS-2004-11-19 - Desc: Open POSIX Test Suite cvs checkout from 2004-11-19, used to ... + exemple: + Name: Release1.5.0 + Desc: This is the official release from ... The latest field asks for the directory name where your posixtestsuite is. - Please note this is the path on you WEB SERVER FILESYSTEM! + Please note this is the path on you WEB SERVER FILESYSTEM. The script does not support uploading of files; so you'll have to upload - your files to the webserver, and then provide the path to it, e.g.: + you files on the webserver, and then provide the path to it, e.g.: /var/uploaded/posixtestsuite Please note that you must provide path to an uncompressed archive. Once you validate; you should see a log message telling what has been processed and what has been ignored. Some testcases are excluded as they've - no matching assertion -- this is a bug in OPTS, but we don't really care. + no matching assertion -- this is a bug in OPTS, it may be fixed later. + Below, you can see the array with your new release added. --> Next step is to let the system know about your runs. To do it, open - admin/enter-new-run.php - via your browser, as previously - (e.g.: http://localhost/admin/enter-new-run.php) - - From this screen, you can select the TestSuite release the run ran against, - then enter a name and a description for your run. As previously, I'd suggest - to give as detailed information as possible, e.g.: +-> Next step is to let the system know about your runs (logfiles). + Next to your new release, you can see an "Add New Logfile" button. + Push it. + + From this screen, you get a reminder of the module and testsuite, + then you can enter a name and a description for your run. + As previously, i'd suggest to give as detailed information as possible, e.g.: Name: BOS-ia32-latest(20041119) Desc: Run in BullOpenSource, on dual-i686 box, with kernel 2.6.9 and NPTL 2004/11/19, gcc 3.4.2. See details at http://... - The last part is once again the path to the uploaded file on the - WEB SERVER FILESYSTEM. (e.g.: /var/uploaded/logfile1) + You then have to choose your logfile. The compression is not supported yet, + so be sure to provide clear plain-text file. The file will be uploaded, + then parsed and destroyed. There is no backup of the data but in the database. By pushing Send, you should see some processing and then a log result telling how many tests were added to the database. It is normal to see @@ -78,30 +96,21 @@ @@ STEP 3: Use your results. - -> Just open your browser to - run-browse.php - e.g.: http://localhost/run-browse.php - - The file index.php is provided for convenience and will redirect the user. + -> Just open your browser to the script root. You'll be redirected to + the run-browse.php file. From this page you can explore your results, + get statistics, and compare several runs. @@ STEP 4: Provide feedback and improvements. -This usefull script is in early beta version yet, -your help is precious! +This usefull script is in beta version yet, +your help and comments are precious! The right place to discuss this product is the mailing list: -n...@bu... -(subscribe by sending "subscribe" to npt...@bu...) +ts...@li... +(subscribe at http://lists.sourceforge.net/lists/listinfo/tslogparser-discuss) You can also directly contact the author: seb...@ex... -Last but not least, a project creation request has been made into -SourceForge.net on 2004/11/19 to host these files. - @@ STEP 5: Enjoy :) - - - - Index: database.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/database.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- database.inc.php 3 Jan 2005 16:27:49 -0000 1.3 +++ database.inc.php 10 Jan 2005 18:09:51 -0000 1.4 @@ -34,19 +34,37 @@ die ("Hack attempt detected\n"); require($root."db_inc.php"); +/* Define the latest version name */ +require($root."db/update_db.inc.php"); + /* Database connection handler */ $db_link=0; -/* Initialize link to the db */ +/* Configuration data */ +$CONFIG=array(); + +/* Initialize link to the db and grep configuration */ function db_init() { - global $db_server,$db_user,$db_pw, $db, $db_link; + global $db_server,$db_user,$db_pw, $db, $db_link, $CONFIG; $db_link = mysql_connect($db_server,$db_user,$db_pw) or die("Failed to connect to MySQL: ".mysql_error()."\n"); mysql_select_db($db) or die("Failed selecting the database\n"); + + $tmp = @mysql_query("SELECT * FROM opts_config"); + if ($tmp) + { + while ($row = mysql_fetch_assoc($tmp)) + $CONFIG[$row["cfg_key"]]=$row["cfg_val"]; + } + + if ((!isset($CONFIG["version"])) || ($CONFIG["version"] < LATEST_VERSION)) + { + die("<b>You need to update your database schema.</b>\n <a href='$root/admin/upgrade.php'>Click here</a>.\n"); + } } /* Close link to the db */ Index: README =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- README 22 Nov 2004 10:34:37 -0000 1.1.1.1 +++ README 10 Jan 2005 18:09:51 -0000 1.2 @@ -5,18 +5,18 @@ LICENCE: Licence text for this project (GPL). (*) Installation: -INSTALL : Instructions to set up the system on a new host. -db/dbresults.sql: Database structure description. +INSTALL : Instructions to set up the system on a new host. +db/* : Database structure functions (install, upgrade). +admin/upgrade.php: Start point for installation / update. (*) Database access: db_inc.php : Configuration of the database. database.inc.php: Definition of portable functions to access the database. -(*) Open POSIX Test Suite dependent (specific) files: -admin/parse-opts-release.php: Will analyse a posixtestsuite source tree and - save it to the database. -admin/enter-new-run.php : Parses a logfile and saves the content - to the database. +(*) Administration: +admin/index.php : Administration interface. +admin/modules.inc.php : Wrapper class to plug-ins modules. +admin/modules/*.mod.php : Plug-ins files (test-suite dependent stuff). (*) Generic Results browsing files: index.php : Redirector to run-browse.php Index: db_inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/db_inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- db_inc.php 22 Nov 2004 10:34:39 -0000 1.1.1.1 +++ db_inc.php 10 Jan 2005 18:09:51 -0000 1.2 @@ -2,7 +2,7 @@ // Database server name or IP: $db_server="localhost"; // Database name: -$db="site"; +$db="results"; // Database user login: $db_user="apache"; // Database password: Index: TODO =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TODO 22 Nov 2004 15:55:59 -0000 1.2 +++ TODO 10 Jan 2005 18:09:51 -0000 1.3 @@ -12,18 +12,9 @@ -> Filter by function domain: show only TIMERS routines, show all, ... -> Filter by comparison status: show/hide common results, show/hide differences -(*) Security: -Protect the access to functions modifying the database. - (*) Other testsuites support: Add the support for LTP testsuite, eventually NFSv4 testsuites also. -(*) More administration features: -Add the ability to remove or rename all the objects: - Test suites - Runs - ... - (*) Domains administration: Create an interface to definition/modification of the routine domains. @@ -31,5 +22,3 @@ -> flag public/private runs displaying. -> user-specific routines domains. -(*) Session management: -Instead of passing back the POST variables, use the PHP session features (more powerful). Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- HISTORY 7 Jan 2005 14:28:34 -0000 1.10 +++ HISTORY 10 Jan 2005 18:09:49 -0000 1.11 @@ -1,3 +1,14 @@ +2005-01-10: +- Added database installation and update procedure. +- Added checking for database version on each use. +- Removed files: db/dbresults.sql +- New files: admin/upgrade.php + db/initial_db_schema.inc.php + db/remove_db_data.inc.php + db/update_db.inc.php +- Fix in opts.mod.php. +- Update documentation (TODO, INSTALL, README) + 2005-01-07: - Completed the administrative interface. Everything is working now. (add/edit/delete runs and show module information). |
From: Sebastien D. <sde...@us...> - 2005-01-10 18:10:07
|
Update of /cvsroot/tslogparser/tslogparser/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15763/db Added Files: initial_db_schema.inc.php remove_db_data.inc.php update_db.inc.php Removed Files: dbresults.sql Log Message: New installation procedure; fixes; documentation updated --- NEW FILE: initial_db_schema.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the initial database schema The output is derived from phpMyAdmin output. */ /************************************************************* *************** Initial database schema ********************* *************************************************************/ /* This creates the release 1 of the database. * On new installation, this is always the version created then * the updates are called in order up to the latest release. */ function initial_db_schema() { $queries = array(); $queries[]="CREATE TABLE `opts_domains` (" ." `dom_id` int(11) NOT NULL auto_increment," ." `dom_name` varchar(30) NOT NULL default ''," ." `dom_comment` tinytext," ." PRIMARY KEY (`dom_id`)," ." UNIQUE KEY `dom_name` (`dom_name`)" .")"; $queries[]="CREATE TABLE `opts_routines` (" ." `rou_id` int(11) NOT NULL auto_increment," ." `rou_name` varchar(50) NOT NULL default ''," ." `rou_comment` tinytext," ." PRIMARY KEY (`rou_id`)," ." UNIQUE KEY `rou_name` (`rou_name`)" .")"; $queries[]="CREATE TABLE `opts_assoc_dom_rou` (" ." `assoc_dom` int(11) NOT NULL default '0'," ." `assoc_rou` int(11) NOT NULL default '0'," ." PRIMARY KEY (`assoc_dom`,`assoc_rou`)" .")"; $queries[]="CREATE TABLE `opts_assertions` (" ." `assert_id` int(11) NOT NULL auto_increment," ." `assert_routine` int(11) NOT NULL default '0'," ." `assert_text` text," ." PRIMARY KEY (`assert_id`)" .")"; $queries[]="CREATE TABLE `opts_versions` (" ." `ver_id` int(11) NOT NULL auto_increment," ." `ver_name` varchar(50) NOT NULL default ''," ." `ver_comment` tinytext," ." `ver_module` varchar(50) NOT NULL default 'opts'," ." PRIMARY KEY (`ver_id`)," ." UNIQUE KEY `ver_name` (`ver_name`)," ." KEY `ver_name_2` (`ver_name`)" .")"; $queries[]="CREATE TABLE `opts_version_descriptions` (" ." `descr_id` int(11) NOT NULL auto_increment," ." `descr_version` int(11) NOT NULL default '0'," ." `descr_assert` int(11) NOT NULL default '0'," ." `descr_num_assert` int(11) NOT NULL default '0'," ." `descr_num_test` int(11) NOT NULL default '0'," ." `descr_info` varchar(30) default NULL," ." PRIMARY KEY (`descr_id`)" .")"; $queries[]="CREATE TABLE `opts_run` (" ." `run_id` int(11) NOT NULL auto_increment," ." `run_name` varchar(50) NOT NULL default ''," ." `run_comments` tinytext," ." PRIMARY KEY (`run_id`)," ." UNIQUE KEY `run_name` (`run_name`)" .")"; $queries[]="CREATE TABLE `opts_run_results` (" ." `res_run` int(11) NOT NULL default '0'," ." `res_testcase` int(11) NOT NULL default '0'," ." `res_status` varchar(30) NOT NULL default ''," ." `res_log` text," ." PRIMARY KEY (`res_run`,`res_testcase`)" .")"; $queries[]="CREATE TABLE `opts_config` (" ."`cfg_key` VARCHAR( 30 ) NOT NULL ," ."`cfg_val` VARCHAR( 30 ) NOT NULL ," ."PRIMARY KEY ( `cfg_key` )" .")"; $queries[]="INSERT INTO `opts_config` ( `cfg_key` , `cfg_val` )" ."VALUES (" ."'version', '1'" .")"; /* Create the tables */ foreach ($queries as $sql) { mysql_query($sql) or die("Unexpected error: ".mysql_error()); } return "<b>".count($queries)."</b> queries executed."; } ?> --- NEW FILE: update_db.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the function update_db() */ define('LATEST_VERSION', "1"); /* Example of update routine */ // function db_v1_to_v2() // { // $queries=array(); // $queries[]="ALTER TABLE opts_domain add (dom_type int, dom_owner varchar(10))"; // $queries[]="UPDATE opts_config SET cfg_val='2' WHERE cfg_key='version'"; // execute_update_queries($queries); // } function update_db( $curver = 1 ) { $tmpver = $curver; /* This is the template for future database updates */ // if ($tmpver == 1) // $tmpver = db_v1_to_v2(); // if ($tmpver == 2) // $tmpver = db_v2_to_v3(); // ... } function execute_update_queries(&$queries) { foreach ($queries as $sql) mysql_query($sql) or die("Unexpected error: ".mysql_error()); } ?> --- NEW FILE: remove_db_data.inc.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file defines the function remove_db_data() which will delete all the tslogparser database data. USE WITH CARE!! */ function remove_db_data() { $res=0; $tables=array( "opts_config" ,"opts_domains" ,"opts_routines" ,"opts_assoc_dom_rou" ,"opts_assertions" ,"opts_versions" ,"opts_version_descriptions" ,"opts_run" ,"opts_run_results"); foreach ($tables as $table) { $sql = "DROP TABLE ".$table; $tmp = mysql_query($sql); if ($tmp) { $res++; } } return "<b>".$res." / ".count($tables)."</b> table(s) removed."; } ?> --- dbresults.sql DELETED --- |
From: Sebastien D. <sde...@us...> - 2005-01-10 18:10:04
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15763/admin Added Files: upgrade.php Log Message: New installation procedure; fixes; documentation updated --- NEW FILE: upgrade.php --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This file will set up or upgrade the database schema. */ $root="../"; $_PAGE["title"]="TSLP Database Installation / Upgrade"; /* Output header page */ require($root."header.inc.php"); /* We'll need functions defined in other files */ require($root."database.inc.php"); /* The following files define several usefull functions */ require($root."db/remove_db_data.inc.php"); require($root."db/initial_db_schema.inc.php"); echo "<pre>\n"; /* Connect the database server */ echo "Checking database connexion...: "; $db_link = @mysql_connect($db_server,$db_user,$db_pw); if (!$db_link) { echo "<font color='red'>Fail</font>\n"; echo "<i>MySQL error</i>: <b>".mysql_error()."</b>"; echo "</pre>\n"; echo "<p>Please check your db_inc.php file parameters.</p>\n"; require($root."footer.inc.php"); die(); } else { echo "<font color='green'>Ok</font>\n"; } /* Select the database */ echo "Selecting database............: "; $tmp = @mysql_select_db($db); if (!$tmp) { echo "<font color='red'>Fail</font>\n"; echo "<i>MySQL error</i>: <b>".mysql_error()."</b>"; echo "</pre>\n"; echo "<p>Please check your db_inc.php file parameters.</p>\n"; die(); mysql_close($db_link); require($root."footer.inc.php"); die(); } else { echo "<font color='green'>Ok</font>\n"; } /* Check if the configuration table exists */ $config=array(); echo "Checking current version......: "; $tmp = @mysql_query("SELECT * FROM opts_config"); if ($tmp) { while ($row = mysql_fetch_assoc($tmp)) $config[$row["cfg_key"]]=$row["cfg_val"]; } if (!isset($config["version"])) { if (isset($_GET["reset"])) { echo "<font color='orange'>Building...</font>\n"; echo " Deleting old database content...\n"; echo " ".remove_db_data()."\n"; echo " Creating new content...\n"; echo " ".initial_db_schema()."\n"; $tmp = @mysql_query("SELECT * FROM opts_config"); while ($row = mysql_fetch_assoc($tmp)) $config[$row["cfg_key"]]=$row["cfg_val"]; } else { echo "<font color='red'>Not found</font>\n"; echo "</pre>\n"; echo "<p>You have either an old or an incomplete installation.\n"; echo "The system is unable to upgrade/repair the database.</p>\n"; echo "<p><b>Do you want to install a fresh database? \n"; echo "(ALL EXISTING DATA WILL BE ERASED!)</p>\n"; echo "<form method='GET'>\n"; echo " <p><input type='submit' name='reset' value='Install/Reset'></p>\n"; echo "</form>\n"; db_fini(); require($root."footer.inc.php"); die(); } } echo "<b>".$config["version"]."</b>\n"; require_once($root."db/update_db.inc.php"); echo "Checking required version.....: <b>".LATEST_VERSION."</b>\n"; if ( $config["version"] < LATEST_VERSION) { echo " Updating...\n"; update_db($config["version"]); echo " <font color='green'><b>Done!</b> You may start using the new version safely.</font>\n"; } else { echo "Your database is already up-to-date.\n"; } echo "</pre>\n"; db_fini(); require($root."footer.inc.php"); die(); |
From: Sebastien D. <sde...@us...> - 2005-01-07 14:49:44
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21614 Removed Files: enter-new-run.php parse-opts-release.php Log Message: new admin interface is index.php --- enter-new-run.php DELETED --- --- parse-opts-release.php DELETED --- |
From: Sebastien D. <sde...@us...> - 2005-01-07 14:28:43
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16272/admin Modified Files: index.php Log Message: Completed administrative interface Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- index.php 6 Jan 2005 17:29:49 -0000 1.6 +++ index.php 7 Jan 2005 14:28:34 -0000 1.7 @@ -66,18 +66,38 @@ $modules=$tslp->list_modules(); +if (isset($_POST["action"])) +{ + $_GET["action"]=$_POST["action"]; + if (isset($_POST["add_run"])) + $_GET["add_run"] = $_POST["add_run"]; + if (isset($_POST["module"])) + $_GET["module"] = $_POST["module"]; + if (isset($_POST["tsid"])) + $_GET["tsid"] = $_POST["tsid"]; + if (isset($_POST["run_name"])) + $_GET["run_name"] = $_POST["run_name"]; + if (isset($_POST["run_descr"])) + $_GET["run_descr"] = $_POST["run_descr"]; +} + /* Parse the GET parameters if any */ if (isset($_GET["action"])) { - if (1) + if (0) { echo "<hr><pre>\n"; print_r($_GET); echo "</pre><hr>\n"; } + if (isset($_GET["info_mod"])) + $_GET["module"]=$_GET["info_mod"]; + /* Check module coherency */ - if (isset($_GET["add_ts"]) || isset($_GET["delete_ts"])) + if (isset($_GET["add_ts"]) || isset($_GET["delete_ts"]) + || isset($_GET["add_run"]) || isset($_GET["delete_run"]) + || isset($_GET["info_mod"])) { if (!isset($_GET["module"])) { @@ -99,6 +119,28 @@ } +/***************************** + *** Module information *** + *****************************/ + if (isset($_GET["info_mod"])) + { + echo "<table border=\"1\">\n"; + echo " <tr>\n"; + echo " <td align=\"center\">\n"; + echo " <b>Module Informations</b>\n"; + echo " </td>\n"; + echo " </tr>\n"; + echo " <tr>\n"; + echo " <td>\n"; + echo $tslp->module_info(); + echo " </td>\n"; + echo " </tr>\n"; + echo "</table>\n"; + echo "<p><a href=\"index.php\">Go back</a> to administration.</p>\n"; + } +/***************************** + *** Add new test suite *** + *****************************/ if (isset($_GET["add_ts"])) { @@ -180,7 +222,89 @@ $tmp = $tslp->TS_parse($_GET["ts_name"], $_GET["ts_descr"], $_GET["ts_root"]); } + +/***************************** + *** Edit test suite *** + *****************************/ + if (isset($_GET["edit_ts"])) + { + if (!isset($_GET["tsid"])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + if ($_GET["action"] == 2) + { + $sql= " UPDATE opts_versions " + ." SET ver_comment=".stringToDB($_GET["ts_descr"]) + ." WHERE ver_id=".$_GET["tsid"] + ." AND ver_module=".stringToDB($_GET["module"]); + $tmp = db_execute_insert($sql); + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>An error occured,</b> release NOT changed.</p>\n"; + } + } + + + /* Ask new description */ + if ($_GET["action"] < 2) + { + /* Output the new testsuite form */ + echo "<form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; + echo " <input type=\"hidden\" name=\"edit_ts\" value=\"del\">\n"; + echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; + $sql= " SELECT ver_name, ver_comment " + ." FROM opts_versions" + ." WHERE ver_id=".$_GET["tsid"] + ." AND ver_module=".stringToDB($_GET["module"]); + $release = db_execute_select($sql); + if (!$release) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } +?> + <table border="1" align="center" width="80%"> + <tr> + <td colspan="2" align="center"> + <h3>Edit a release description.</h3> + </td> + </tr> + <tr> + <td>Release name:</td> + <td><?php echo stringFromDB($release[0]["ver_name"]); ?></td> + </tr> + <tr> + <td>Release description:</td> + <td><textarea name="ts_descr" rows="3" cols="79"><?php echo $release[0]["ver_comment"]; ?></textarea></td> + </tr> + <tr> + <td colspan=2 align=center><input type="submit" name="Change" value="confirm"></td> + </tr> + </table> +<p><a href="index.php">Go back</a> to administration index.</p> +<?php + echo "</form>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + } + + +/***************************** + *** Delete test suite *** + *****************************/ if (isset($_GET["delete_ts"])) { if (!isset($_GET["tsid"])) @@ -254,7 +378,10 @@ } - if (isset($_GET["edit_ts"])) +/***************************** + *** Add run *** + *****************************/ + if (isset($_GET["add_run"])) { if (!isset($_GET["tsid"])) { @@ -264,31 +391,62 @@ die(); } + + /* Check Step 3 parameters and eventually fall back to step 2 */ + if (!isset($_GET["run_name"])) + $_GET["run_name"]=""; + if (!isset($_GET["run_descr"])) + $_GET["run_descr"]=""; + if ($_GET["action"] == 2) { - $sql= " UPDATE opts_versions " - ." SET ver_comment=".stringToDB($_GET["ts_descr"]) - ." WHERE ver_id=".$_GET["tsid"] - ." AND ver_module=".stringToDB($_GET["module"]); - $tmp = db_execute_insert($sql); - if (!$tmp) + if (!isset($_FILES['logfile'])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + $log = file_get_contents($_FILES['logfile']['tmp_name']); + if (!$log) { $_GET["action"] = 1; - echo "<p><b>An error occured,</b> release NOT changed.</p>\n"; + echo "<p>Unable to read the file ".$_FILES['logfile']['name']."</p>\n"; + } + + if ((!trim($_GET["run_name"]) + || !trim($_GET["run_descr"]) + || !$log)) + { + echo "<p>Please fill all <b>(*) fields.</b></p>\n"; + $_GET["action"] = 1; } } + if ($_GET["action"] == 2) + { + /* Here we're in step 2 in process: ready to proceed */ + echo "<pre>\n"; + $tmp = $tslp->RUN_parse($_GET["run_name"], $_GET["run_descr"], $_GET["tsid"], $log); + echo "</pre>\n"; + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; + } + } - /* Ask new description */ if ($_GET["action"] < 2) { /* Output the new testsuite form */ - echo "<form method=\"GET\">\n"; + echo "<form enctype=\"multipart/form-data\" method=\"POST\">\n"; + echo " <input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1048576\">"; echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; - echo " <input type=\"hidden\" name=\"edit_ts\" value=\"del\">\n"; + echo " <input type=\"hidden\" name=\"add_run\" value=\"add\">\n"; echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; - $sql= " SELECT ver_name, ver_comment " + $sql= " SELECT ver_name " ." FROM opts_versions" ." WHERE ver_id=".$_GET["tsid"] ." AND ver_module=".stringToDB($_GET["module"]); @@ -304,16 +462,104 @@ <table border="1" align="center" width="80%"> <tr> <td colspan="2" align="center"> - <h3>Edit a release description.</h3> + <h3>Add a new run logfile in database.</h3> </td> </tr> <tr> - <td>Release name:</td> - <td><?php echo stringFromDB($release[0]["ver_name"]); ?></td> + <td>Selected module:</td> + <td><b><?php echo $_GET["module"]; ?></b></td> </tr> <tr> - <td>Release description:</td> - <td><textarea name="ts_descr" rows="3" cols="79"><?php echo stringFromDB($release[0]["ver_comment"]); ?></textarea></td> + <td>Selected testsuite release:</td> + <td><b><?php echo $release[0]["ver_name"]; ?></b></td> + </tr> + <tr> + <td>New run name(*):</td> + <td><input type="text" name="run_name" maxlength="30" size="80" value=<?php echo "\"".$_GET["run_name"]."\""; ?>></td> + </tr> + <tr> + <td>New release description:</td> + <td><textarea name="run_descr" rows="3" cols="79"><?php echo $_GET["run_descr"]; ?></textarea></td> + </tr> + <tr> + <td>Log file (*):</td> + <td>Upload this file: <input name="logfile" type="file"></td> + </tr> + <tr> + <td colspan="2" align=center><input type="submit" name="send" value="Send"></td> + </tr> + </table> +<p><a href="index.php">Go back</a> to administration index.</p> +<?php + echo "</form>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + } + + + +/***************************** + *** Edit run *** + *****************************/ + if (isset($_GET["edit_run"])) + { + if (!isset($_GET["runid"])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + if ($_GET["action"] == 2) + { + $sql= " UPDATE opts_run " + ." SET run_comments=".stringToDB($_GET["run_descr"]) + ." WHERE run_id=".$_GET["runid"]; + $tmp = db_execute_insert($sql); + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>An error occured,</b> run NOT changed.</p>\n"; + } + } + + + /* Ask new description */ + if ($_GET["action"] < 2) + { + /* Output the new testsuite form */ + echo "<form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; + echo " <input type=\"hidden\" name=\"edit_run\" value=\"edit\">\n"; + echo " <input type=\"hidden\" name=\"runid\" value=\"".$_GET["runid"]."\">\n"; + $sql= " SELECT run_name, run_comments " + ." FROM opts_run" + ." WHERE run_id=".$_GET["runid"]; + $run = db_execute_select($sql); + if (!$run) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } +?> + <table border="1" align="center" width="80%"> + <tr> + <td colspan="2" align="center"> + <h3>Edit a run logfile description.</h3> + </td> + </tr> + <tr> + <td>Run name:</td> + <td><?php echo stringFromDB($run[0]["run_name"]); ?></td> + </tr> + <tr> + <td>Run description:</td> + <td><textarea name="run_descr" rows="3" cols="79"><?php echo $run[0]["run_comments"]; ?></textarea></td> </tr> <tr> <td colspan=2 align=center><input type="submit" name="Change" value="confirm"></td> @@ -327,6 +573,81 @@ die(); } } + + +/***************************** + *** Delete run *** + *****************************/ + if (isset($_GET["delete_run"])) + { + if (!isset($_GET["runid"])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + /* We already confirmed the deletion */ + if ($_GET["action"] == 2) + { + echo "<pre>\n"; + $tmp = $tslp->RUN_delete($_GET["runid"]); + echo "</pre>\n"; + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; + } + } + + /* Require confirmation */ + if ($_GET["action"] < 2) + { + /* Output the new testsuite form */ + echo "<form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; + echo " <input type=\"hidden\" name=\"delete_run\" value=\"del\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; + echo " <input type=\"hidden\" name=\"runid\" value=\"".$_GET["runid"]."\">\n"; + $sql= " SELECT run_name, run_comments " + ." FROM opts_run" + ." WHERE run_id=".$_GET["runid"]; + $run = db_execute_select($sql); + if (!$run) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } +?> + <table border="1" align="center" width="80%"> + <tr> + <td colspan="2" align="center"> + <h3>Delete a run from database.</h3> + </td> + </tr> + <tr> + <td>Run name:</td> + <td><?php echo stringFromDB($run[0]["run_name"]); ?></td> + </tr> + <tr> + <td>Release description:</td> + <td><?php echo stringFromDB($run[0]["run_comments"]); ?></td> + </tr> + <tr> + <td colspan=2 align=center><input type="submit" name="Delete" value="confirm"></td> + </tr> + </table> +<p><a href="index.php">Go back</a> to administration index.</p> +<?php + echo "</form>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + } } @@ -425,7 +746,15 @@ echo " align=\"center\" valign=\"top\">\n"; echo "<p>".$module."</p>\n"; if ($plugged) - echo "<p><a href=\"module_info.php?module=$module\">About...</a></p>\n"; + { + echo "<p>\n"; + echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; + echo " <input type=\"hidden\" name=\"info_mod\" value=\"$module\">\n"; + echo " <input type=\"Submit\" name=\"about\" value=\"About\">\n"; + echo " </form>\n"; + echo "</p>"; + } else echo "<p>Unsupported module</p>\n"; echo " </td>\n"; @@ -503,14 +832,15 @@ echo " <form method=\"GET\">\n"; echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"runid\" value=\"".$run_id."\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; echo " <td valign=\"top\" align=\"center\">\n"; echo " <p><code>".$run_data["run_name"]."</code></p>\n"; - echo " <p><input type=\"submit\" name=\"Delete\" value=\"Delete\"></p>\n"; + echo " <p><input type=\"submit\" name=\"delete_run\" value=\"Delete\"></p>\n"; echo " </td>\n"; echo " <td valign=\"top\" align=\"center\">\n"; echo " <p><font size='-1'>".$run_data["run_comments"]."</font></p>\n"; - echo " <p><input type=\"submit\" name=\"Edit\" value=\"Edit\"></p>\n"; + echo " <p><input type=\"submit\" name=\"edit_run\" value=\"Edit\"></p>\n"; echo " </td>\n"; echo " </form>\n"; echo " </tr>\n"; |
From: Sebastien D. <sde...@us...> - 2005-01-07 14:28:43
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16272 Modified Files: HISTORY Log Message: Completed administrative interface Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- HISTORY 6 Jan 2005 17:29:49 -0000 1.9 +++ HISTORY 7 Jan 2005 14:28:34 -0000 1.10 @@ -1,3 +1,7 @@ +2005-01-07: +- Completed the administrative interface. Everything is working now. + (add/edit/delete runs and show module information). + 2005-01-06: - Added functionnality for adding/editing/deleting testsuite releases. |
From: Sebastien D. <sde...@us...> - 2005-01-06 17:30:10
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23501/admin Modified Files: index.php modules.inc.php Log Message: Add/edit/delete TestSuite available. Index: modules.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- modules.inc.php 4 Jan 2005 17:46:14 -0000 1.4 +++ modules.inc.php 6 Jan 2005 17:29:49 -0000 1.5 @@ -83,7 +83,7 @@ var $modules_catalog; var $selected_module; var $last_error=""; - var $debug=2; + var $debug=0; /* Class constructor: initializes the modules catalog */ function testsuite() Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- index.php 5 Jan 2005 15:43:35 -0000 1.5 +++ index.php 6 Jan 2005 17:29:49 -0000 1.6 @@ -15,37 +15,6 @@ * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ - -$root="../"; -$_PAGE["title"]="TSLP Administration Interface"; - -/* Output header page */ -require($root."header.inc.php"); - -/* We'll need functions defined in other files */ -require($root."database.inc.php"); -require($root."functions.inc.php"); - -/* We'll need the database connexion */ -db_init(); - -/* Initialize the plugins modules */ -require($root."admin/modules.inc.php"); - -$tslp = new testsuite(); - -if (!isset($_SESSION["current_module"])) - $_SESSION["current_module"]=""; - -/* If the user already selected a module, restore its selection */ -if ($_SESSION["current_module"]) - if (!$tslp->select_module($_SESSION["current_module"])) - { - echo "The module '".$_SESSION["current_module"]."' is not available.\n"; - $_SESSION["current_module"]=""; - } - - /* This file allows an admin to list the current releases and runs, to delete some entries or to add new ones. @@ -74,10 +43,297 @@ |--------------------------------------------------------------------------------| */ + +$root="../"; +$_PAGE["title"]="TSLP Administration Interface"; + +/* Output header page */ +require($root."header.inc.php"); + +/* We'll need functions defined in other files */ +require($root."database.inc.php"); +require($root."functions.inc.php"); + +/* We'll need the database connexion */ +db_init(); + +/* Initialize the plugins modules */ +require($root."admin/modules.inc.php"); + +$tslp = new testsuite(); + /* Query the modules list first */ $modules=$tslp->list_modules(); -/* Then list the releases and runs from the database */ + +/* Parse the GET parameters if any */ +if (isset($_GET["action"])) +{ + if (1) + { + echo "<hr><pre>\n"; + print_r($_GET); + echo "</pre><hr>\n"; + } + + /* Check module coherency */ + if (isset($_GET["add_ts"]) || isset($_GET["delete_ts"])) + { + if (!isset($_GET["module"])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + if (!in_array($_GET["module"], $modules)) + { + echo "<b>Module <i>".$_GET["module"]."</i> unavailable.</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + $tslp->select_module($_GET["module"]) or die("Invalid plugin"); + + } + + if (isset($_GET["add_ts"])) + { + + /* Check Step 3 parameters and eventually fall back to step 2 */ + if (!isset($_GET["ts_name"])) + $_GET["ts_name"]=""; + if (!isset($_GET["ts_descr"])) + $_GET["ts_descr"]=""; + if (!isset($_GET["ts_root"])) + $_GET["ts_root"]=""; + + if (($_GET["action"] == 2) + && ( !trim($_GET["ts_name"]) + || !trim($_GET["ts_root"]))) + { + echo "<p>Please fill all <b>(*) fields.</b></p>\n"; + $_GET["action"] = 1; + } + + if ($_GET["action"] == 2) + { + /* Here we're in step 2 in process: ready to proceed */ + + echo "<pre>\n"; + $tmp = $tslp->TS_parse($_GET["ts_name"], $_GET["ts_descr"], $_GET["ts_root"]); + echo "</pre>\n"; + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; + } + } + + if ($_GET["action"] < 2) + { + /* Output the new testsuite form */ + echo "<form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; + echo " <input type=\"hidden\" name=\"add_ts\" value=\"add\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; +?> + <table border="1" align="center" width="80%"> + <tr> + <td colspan="2" align="center"> + <h3>Add a new release in database.</h3> + </td> + </tr> + <tr> + <td>Selected module:</td> + <td><b><?php echo $_GET["module"]; ?></b></td> + </tr> + <tr> + <td>New release name(*):</td> + <td><input type="text" name="ts_name" maxlength="30" size="80" value=<?php echo "\"".$_GET["ts_name"]."\""; ?>></td> + </tr> + <tr> + <td>New release description:</td> + <td><textarea name="ts_descr" rows="3" cols="79"><?php echo $_GET["ts_descr"]; ?></textarea></td> + </tr> + <tr> + <td>Path to new release(*):</td> + <td><input type="text" name="ts_root" size="80" value=<?php echo "\"".$_GET["ts_root"]."\""; ?>></td> + </tr> + <tr> + <td colspan=2 align=center><input type="submit" name="send" value="Send"></td> + </tr> + </table> +<p><a href="index.php">Go back</a> to administration index.</p> +<?php + echo "</form>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + /* Here we're in step 2 in process: ready to proceed */ + + $tslp->select_module($_GET["module"]) or die("Invalid plugin"); + + $tmp = $tslp->TS_parse($_GET["ts_name"], $_GET["ts_descr"], $_GET["ts_root"]); + } + + if (isset($_GET["delete_ts"])) + { + if (!isset($_GET["tsid"])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + /* We already confirmed the deletion */ + if ($_GET["action"] == 2) + { + echo "<pre>\n"; + $tmp = $tslp->TS_delete($_GET["tsid"]); + echo "</pre>\n"; + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>Error:</b> <i>".$tslp->last_error."</i>.</p>\n"; + } + } + + /* Require confirmation */ + if ($_GET["action"] < 2) + { + /* Output the new testsuite form */ + echo "<form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; + echo " <input type=\"hidden\" name=\"delete_ts\" value=\"del\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; + echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; + $sql= " SELECT ver_name, ver_comment " + ." FROM opts_versions" + ." WHERE ver_id=".$_GET["tsid"] + ." AND ver_module=".stringToDB($_GET["module"]); + $release = db_execute_select($sql); + if (!$release) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } +?> + <table border="1" align="center" width="80%"> + <tr> + <td colspan="2" align="center"> + <h3>Delete a release from database.</h3> + </td> + </tr> + <tr> + <td>Release name:</td> + <td><?php echo stringFromDB($release[0]["ver_name"]); ?></td> + </tr> + <tr> + <td>Release description:</td> + <td><pre><?php echo stringFromDB($release[0]["ver_comment"]); ?></pre></td> + </tr> + <tr> + <td colspan=2 align=center><input type="submit" name="Delete" value="confirm"></td> + </tr> + </table> +<p><a href="index.php">Go back</a> to administration index.</p> +<?php + echo "</form>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + } + + + if (isset($_GET["edit_ts"])) + { + if (!isset($_GET["tsid"])) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + + if ($_GET["action"] == 2) + { + $sql= " UPDATE opts_versions " + ." SET ver_comment=".stringToDB($_GET["ts_descr"]) + ." WHERE ver_id=".$_GET["tsid"] + ." AND ver_module=".stringToDB($_GET["module"]); + $tmp = db_execute_insert($sql); + if (!$tmp) + { + $_GET["action"] = 1; + echo "<p><b>An error occured,</b> release NOT changed.</p>\n"; + } + } + + + /* Ask new description */ + if ($_GET["action"] < 2) + { + /* Output the new testsuite form */ + echo "<form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"2\">\n"; + echo " <input type=\"hidden\" name=\"edit_ts\" value=\"del\">\n"; + echo " <input type=\"hidden\" name=\"tsid\" value=\"".$_GET["tsid"]."\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"".$_GET["module"]."\">\n"; + $sql= " SELECT ver_name, ver_comment " + ." FROM opts_versions" + ." WHERE ver_id=".$_GET["tsid"] + ." AND ver_module=".stringToDB($_GET["module"]); + $release = db_execute_select($sql); + if (!$release) + { + echo "<b>Invalid parameters</b>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } +?> + <table border="1" align="center" width="80%"> + <tr> + <td colspan="2" align="center"> + <h3>Edit a release description.</h3> + </td> + </tr> + <tr> + <td>Release name:</td> + <td><?php echo stringFromDB($release[0]["ver_name"]); ?></td> + </tr> + <tr> + <td>Release description:</td> + <td><textarea name="ts_descr" rows="3" cols="79"><?php echo stringFromDB($release[0]["ver_comment"]); ?></textarea></td> + </tr> + <tr> + <td colspan=2 align=center><input type="submit" name="Change" value="confirm"></td> + </tr> + </table> +<p><a href="index.php">Go back</a> to administration index.</p> +<?php + echo "</form>\n"; + db_fini(); + require($root."footer.inc.php"); + die(); + } + } +} + + + +/* We are building the global array */ + +/* list the releases and runs from the database */ $sql= " SELECT ver_name, ver_comment, ver_id, ver_module " ." FROM opts_versions" ." ORDER BY ver_id DESC"; @@ -163,21 +419,22 @@ echo " <tr>\n"; echo " <td"; if ($mod_data["count"]) - echo " rowspan=\"".$mod_data["count"]."\""; + echo " rowspan=\"".$mod_data["count"]."\""; if ($plugged) - echo " title=\"".$mod_data["module"]."\""; + echo " title=\"".$mod_data["module"]."\""; echo " align=\"center\" valign=\"top\">\n"; echo "<p>".$module."</p>\n"; if ($plugged) - echo "<p><a href=\"module_info.php?module=$module\">About...</a></p>\n"; + echo "<p><a href=\"module_info.php?module=$module\">About...</a></p>\n"; else - echo "<p>Unsupported module</p>\n"; + echo "<p>Unsupported module</p>\n"; echo " </td>\n"; if ($plugged) { echo " <td align=\"center\" colspan=\"2\">\n"; echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; echo " <input type=\"submit\" name=\"add_ts\" value=\"Add New Testsuite Version\">\n"; echo " </form>\n"; @@ -189,20 +446,21 @@ foreach ($mod_data["TS"] as $ts_name => $ts_data) { if ($plugged || ($tags > 0)) - echo " <tr>\n"; + echo " <tr>\n"; $known=isset($ts_data["id"]); if ($plugged && $known) { echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; echo " <input type=\"hidden\" name=\"tsid\" value=\"".$ts_data["id"]."\">\n"; } echo " <td"; if ($ts_data["count"]) - echo " rowspan=\"".$ts_data["count"]."\""; + echo " rowspan=\"".$ts_data["count"]."\""; echo " align=\"center\" valign=\"top\">\n"; echo "<p><code>".$ts_name."</code></p>\n"; if (!$known) @@ -211,21 +469,21 @@ { echo " <p><input type=\"Submit\" name=\"delete_ts\" value=\"Delete\""; if ((!$plugged) || ($ts_data["count"] > 1)) - echo " disabled"; + echo " disabled"; echo "></p>\n"; } echo " </td>\n"; echo " <td"; if ($ts_data["count"]) - echo " rowspan=\"".$ts_data["count"]."\""; + echo " rowspan=\"".$ts_data["count"]."\""; echo " valign=\"top\" align=\"center\">\n"; echo "<p><font size='-1'>".$ts_data["comment"]."</font></p>\n"; if ($known) { echo " <p><input type=\"Submit\" name=\"edit_ts\" value=\"Edit\""; if (!$plugged) - echo " disabled"; + echo " disabled"; echo "></p>\n"; } echo "</td>\n"; @@ -243,6 +501,7 @@ if ($known || ($tags > 1)) echo " <tr>\n"; echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"action\" value=\"1\">\n"; echo " <input type=\"hidden\" name=\"runid\" value=\"".$run_id."\">\n"; echo " <td valign=\"top\" align=\"center\">\n"; @@ -261,11 +520,9 @@ $tags = 1; } } -?> -</table> - -<?php +echo "</table>\n"; + /* End of file */ db_fini(); require($root."footer.inc.php"); |
From: Sebastien D. <sde...@us...> - 2005-01-06 17:29:58
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23501 Modified Files: HISTORY session.inc.php Log Message: Add/edit/delete TestSuite available. Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- HISTORY 5 Jan 2005 15:43:35 -0000 1.8 +++ HISTORY 6 Jan 2005 17:29:49 -0000 1.9 @@ -1,3 +1,6 @@ +2005-01-06: +- Added functionnality for adding/editing/deleting testsuite releases. + 2005-01-05: - Terminated Administrative User Interface (not functionnal yet). Index: session.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/session.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- session.inc.php 4 Jan 2005 17:46:13 -0000 1.1 +++ session.inc.php 6 Jan 2005 17:29:49 -0000 1.2 @@ -34,7 +34,7 @@ */ $authorized_session_vars=array( - "current_module"=>array("index.php") + "current_module"=>array("run-browse.php") ); |
From: Sebastien D. <sde...@us...> - 2005-01-05 15:43:46
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9370/admin Modified Files: index.php Log Message: Administrative user interface defined Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- index.php 4 Jan 2005 17:46:13 -0000 1.4 +++ index.php 5 Jan 2005 15:43:35 -0000 1.5 @@ -50,38 +50,223 @@ This file allows an admin to list the current releases and runs, to delete some entries or to add new ones. - It also shows the supported modules, the currently selected one - and can provide additional information on any module -*/ + We create an array with: + ---------------------------------------------------------------------------------- + | modules | TS releases | TS description | RUNs | RUN Descriptions | + ---------------------------------------------------------------------------------- + | opts | 1.5.0 | This is the... | Fedora Core 3 | Run on IA32 ... | + | <info> | <delete*> | <edit> | <delete> | <edit> | + | | | |----------------------------------| + | | | | Solaris 10 | Run on ... | + | | | | <delete> | <edit> | + | | | |----------------------------------| + | | | | <add new> | | + | |-------------------------------------------------------------------| + | | <add new> | | | | + |--------------------------------------------------------------------------------| + | ltp | 200412 | This is... | <add new> | | + | <info> | <delete> | <edit> | | | + | |-------------------------------------------------------------------| + | | <add new> | | | | + |--------------------------------------------------------------------------------| + | nfsv4 | <add new> | | | | + | <info> | | | | | + |--------------------------------------------------------------------------------| -/* List the known modules */ -?> -<table border="0" align="right"> - <tr> - <td><i>Loaded plug-ins:</td> -<?php + */ +/* Query the modules list first */ $modules=$tslp->list_modules(); -sort($modules); -foreach($modules as $module) + +/* Then list the releases and runs from the database */ +$sql= " SELECT ver_name, ver_comment, ver_id, ver_module " + ." FROM opts_versions" + ." ORDER BY ver_id DESC"; +$release_table = db_execute_select($sql); + +$sql= " SELECT DISTINCT run_id, run_name, run_comments" + ." FROM opts_run" + ." ORDER BY run_id"; +$allrun_table = db_execute_select($sql); +$orphaned=array(); +foreach ($allrun_table as $myrow) + $orphaned[$myrow["run_id"]]=$myrow["run_name"]; + +$sql= " SELECT DISTINCT run_name, run_id, run_comments, ver_name, ver_module " + ." FROM opts_run, opts_run_results, opts_version_descriptions, opts_versions " + ." WHERE run_id=res_run" + ." AND res_testcase=descr_id" + ." AND descr_version=ver_id" + ." ORDER BY ver_name"; +$run_table = db_execute_select($sql); + +/* Sort all this information into an array */ +$DATA=array(); +foreach ($modules as $module) + $DATA[$module]=array( "module"=>strip_tags($tslp->module_info("title", $module)), + "TS"=>array(), + "count"=>1); /* We count the "add new TS line here" */ +foreach ($release_table as $release) { - echo " <td>\n"; - echo " <a title=\"".strip_tags($tslp->module_info( "title", $module ))."\"> <b>$module</b></a>\n"; - echo " </td>\n"; + if (!isset($DATA[$release["ver_module"]]["TS"])) + /* This release' module is not available */ + $DATA[$release["ver_module"]]=array("TS"=>array(), "count"=>0); + + $DATA[$release["ver_module"]]["TS"][$release["ver_name"]]= + array("id"=>$release["ver_id"], + "comment"=>$release["ver_comment"], + "RUNS"=>array(), + "count"=>1); /* count the "add new run" here */ + + $DATA[$release["ver_module"]]["count"] += 1; } +foreach ($run_table as $run) +{ + unset($orphaned[$run["run_id"]]); + if (!isset($DATA[$run["ver_module"]])) + /* This run's module is not available -- really abnormal */ + $DATA[$run["ver_module"]]=array("TS"=>array(),"count"=>0); + if (!isset($DATA[$run["ver_module"]]["TS"][$run["ver_name"]])) + /* This run belongs to no testsuite */ + $DATA[$run["ver_module"]]["TS"][$run["ver_name"]]=array("RUNS"=>array(),"count"=>0); + $DATA[$run["ver_module"]]["TS"][$run["ver_name"]]["RUNS"][$run["run_id"]]= + array( "run_name"=>$run["run_name"], + "run_comments"=>$run["run_comments"]); + $DATA[$release["ver_module"]]["count"] += 1; + $DATA[$release["ver_module"]]["TS"][$run["ver_name"]]["count"] += 1; +} + +//echo "<hr><pre>\n"; +//print_r($DATA); +//echo "</pre><hr>\n"; + +if ($orphaned) +{ + echo "<p>The database contains <b>".count($orphaned)."</b> orphaned runs.</p>\n"; +} + +/* We're ready to build the array */ ?> +<table border="1" valign="top"> + <tr> + <td title="TestSuite Module" align="center"><b>Module</b></td> + <td title="TestSuite Release Name" align="center"><b>TS Release</b></td> + <td title="TestSuite Decription" align="center"><b>TS Description</b></td> + <td title="Execution Log Name" align="center"><b>RUN</b></td> + <td title="Execution Log Description" align="center"><b>RUN Description</b></td> </tr> -</table> <?php -/* Then list the releases and runs from the database */ -$TS_releases=query_version(); -echo "<pre>\n"; -print_r($TS_releases); -echo "</pre>\n"; + /* Output the array content */ + foreach ($DATA as $module => $mod_data) + { + $plugged=isset($mod_data["module"]); + $tags=0; + echo " <tr>\n"; + echo " <td"; + if ($mod_data["count"]) + echo " rowspan=\"".$mod_data["count"]."\""; + if ($plugged) + echo " title=\"".$mod_data["module"]."\""; + echo " align=\"center\" valign=\"top\">\n"; + echo "<p>".$module."</p>\n"; + if ($plugged) + echo "<p><a href=\"module_info.php?module=$module\">About...</a></p>\n"; + else + echo "<p>Unsupported module</p>\n"; + echo " </td>\n"; -?> + if ($plugged) + { + echo " <td align=\"center\" colspan=\"2\">\n"; + echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; + echo " <input type=\"submit\" name=\"add_ts\" value=\"Add New Testsuite Version\">\n"; + echo " </form>\n"; + echo " </td>\n"; + echo " <td colspan=\"2\"> </td>\n"; + echo " </tr>\n"; + } + + foreach ($mod_data["TS"] as $ts_name => $ts_data) + { + if ($plugged || ($tags > 0)) + echo " <tr>\n"; + + $known=isset($ts_data["id"]); + if ($plugged && $known) + { + echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"module\" value=\"$module\">\n"; + echo " <input type=\"hidden\" name=\"tsid\" value=\"".$ts_data["id"]."\">\n"; + } + + echo " <td"; + if ($ts_data["count"]) + echo " rowspan=\"".$ts_data["count"]."\""; + echo " align=\"center\" valign=\"top\">\n"; + echo "<p><code>".$ts_name."</code></p>\n"; + if (!$known) + echo " <p><i>Unknown TS</i></p>\n"; + else + { + echo " <p><input type=\"Submit\" name=\"delete_ts\" value=\"Delete\""; + if ((!$plugged) || ($ts_data["count"] > 1)) + echo " disabled"; + echo "></p>\n"; + } + echo " </td>\n"; + + echo " <td"; + if ($ts_data["count"]) + echo " rowspan=\"".$ts_data["count"]."\""; + echo " valign=\"top\" align=\"center\">\n"; + echo "<p><font size='-1'>".$ts_data["comment"]."</font></p>\n"; + if ($known) + { + echo " <p><input type=\"Submit\" name=\"edit_ts\" value=\"Edit\""; + if (!$plugged) + echo " disabled"; + echo "></p>\n"; + } + echo "</td>\n"; + /* Add new run if we are in a known TS */ + if ($known) + { + echo " <td align=\"center\" colspan=\"2\">"; + echo " <input type=\"submit\" name=\"add_run\" value=\"Add New Logfile\"></td>\n"; + echo " </tr>\n"; + } + echo "</form>\n"; + + foreach ($ts_data["RUNS"] as $run_id => $run_data) + { + if ($known || ($tags > 1)) + echo " <tr>\n"; + echo " <form method=\"GET\">\n"; + echo " <input type=\"hidden\" name=\"runid\" value=\"".$run_id."\">\n"; + + echo " <td valign=\"top\" align=\"center\">\n"; + echo " <p><code>".$run_data["run_name"]."</code></p>\n"; + echo " <p><input type=\"submit\" name=\"Delete\" value=\"Delete\"></p>\n"; + echo " </td>\n"; + echo " <td valign=\"top\" align=\"center\">\n"; + echo " <p><font size='-1'>".$run_data["run_comments"]."</font></p>\n"; + echo " <p><input type=\"submit\" name=\"Edit\" value=\"Edit\"></p>\n"; + echo " </td>\n"; + echo " </form>\n"; + echo " </tr>\n"; + $tags = 2; + } + + $tags = 1; + } + } +?> +</table> + <?php +/* End of file */ db_fini(); require($root."footer.inc.php"); ?> |
From: Sebastien D. <sde...@us...> - 2005-01-05 15:43:46
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9370 Modified Files: HISTORY Log Message: Administrative user interface defined Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- HISTORY 4 Jan 2005 17:46:13 -0000 1.7 +++ HISTORY 5 Jan 2005 15:43:35 -0000 1.8 @@ -1,3 +1,6 @@ +2005-01-05: +- Terminated Administrative User Interface (not functionnal yet). + 2005-01-04: - Added some session stuff (new file: session.inc.php) - Renamed ltp.mod.php into ltp.mod.php.example |
From: Sebastien D. <sde...@us...> - 2005-01-04 17:46:26
|
Update of /cvsroot/tslogparser/tslogparser/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5647/admin/modules Modified Files: opts.mod.php Added Files: ltp.mod.php.example Removed Files: ltp.mod.php Log Message: - Added some session stuff (new file: session.inc.php) - Renamed ltp.mod.php into ltp.mod.php.example - Some additions into the modules design (module_info method) - Administrativa index started (not functionnal yet). Index: opts.mod.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules/opts.mod.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- opts.mod.php 3 Jan 2005 16:27:49 -0000 1.3 +++ opts.mod.php 4 Jan 2005 17:46:14 -0000 1.4 @@ -100,16 +100,23 @@ All information related to the module (version, known bugs, ...) are suitable for this function (think of it as the only documentation for the module). */ - function module_info() + function module_info($what="") { - echo "<p><b>Open POSIX Test Suite</b> parser module for <b>TSLogParser</b></p>\n"; - echo "<p>Release: <b>0.1</b> 2004/12/31</p>\n"; - echo "<p>Limitations and known problems: \n"; - echo "<ul>\n<li>In case an assertion.xml file is malformed, the XML parser will fail\n"; - echo " For this reason, you need a recent Open POSIX Test Suite release (1.5.0 is OK)\n"; - echo "</li></ul></p>\n"; - echo "<p>See the <a href='http://posixtest.sourceforge.net/'>test suite homepage</a> for more information.</p>\n"; - return; + $title = "<b>Open POSIX Test Suite</b> parser module for <b>TSLogParser</b>"; + + $text = "<p>$title</p>\n"; + $text.= "<p>Release: <b>0.1</b> 2004/12/31</p>\n"; + $text.= "<p>Limitations and known problems: \n"; + $text.= "<ul>\n<li>In case an assertion.xml file is malformed, the XML parser will fail\n"; + $text.= " For this reason, you need a recent Open POSIX Test Suite release (1.5.0 is OK)\n"; + $text.= "</li></ul></p>\n"; + $text.= "<p>See the <a href='http://posixtest.sourceforge.net/'>test suite homepage</a> for more information.</p>\n"; + + if ($what == "title") + return $title; + + /* default to all */ + return $text; } /* --- ltp.mod.php DELETED --- --- NEW FILE: ltp.mod.php.example --- <?php /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* This module is an exemple model for a new module. Adapt it for your own needs and please submit your new modules on the project mailing list. */ class ltp { function module_info($what="") { $title = "<b>Linux Test Project</b> parser module for <b>TSLogParser</b>"; $text = "<p>$title</p>\n"; $text.= "<p>Release: <b>0.0</b> 2004/12/31</p>\n"; $text.= "<p>Limitations and known problems: \n"; $text.= "<ul>\n<li>This module is just for test purpose; no function is working yet\n"; $text.= "</li></ul></p>\n"; $text.= "<p>See the <a href='http://ltp.sourceforge.net/'>test suite homepage</a> for more information.</p>\n"; if ($what == "title") return $title; /* default to all */ return $text; } function TS_parse(&$parent, $TS_name, $TS_description, $path) { return $false; } function TS_delete(&$parent, $TS_id) { return $false; } function RUN_parse(&$parent, $RUN_name, $RUN_description, $TS_id, $CONTENT) { return $false; } function RUN_delete(&$parent, $RUN_id) { return $false; } } /* Return the class name so it is added to the catalog */ return("ltp"); ?> |