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-04 17:46:26
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5647/admin Modified Files: index.php modules.inc.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: modules.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- modules.inc.php 3 Jan 2005 16:27:49 -0000 1.3 +++ modules.inc.php 4 Jan 2005 17:46:14 -0000 1.4 @@ -67,16 +67,17 @@ -> 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) + (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 default. + -> 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. - The selected module information is persistent through a session. */ + class testsuite { var $modules_catalog; @@ -84,16 +85,12 @@ var $last_error=""; var $debug=2; - /* Class constructor: initializes the modules catalog and the default selected */ - function testsuite($default_catalog="") + /* Class constructor: initializes the modules catalog */ + function testsuite() { $this->modules_catalog=array(); $this->selected_module=""; - /* If the default catalog is not specified, get it from session */ - /* @@@ Session is not implemented yet */ - // $default_catalog=$_SESSION["active_module"]; - /* Enumerate the modules files and include them */ foreach (glob("modules/*.mod.php") as $filename) { @@ -101,23 +98,12 @@ if (is_string($tmp) && class_exists($tmp)) { $this->modules_catalog[]=$tmp; - if ($tmp == $default_catalog) - $this->selected_module=$tmp; } else { die("File $filename has an incorrect format\n"); } } - - if ($this->selected_module !== $default_catalog) - { - /* Remove this information from the session */ - /* @@@ session not implemented yet */ - - /* Stop here */ - die("The required module <i>$default_catalog</i> is unavailable."); - } } /* Functions for manipulating the selected module */ @@ -135,36 +121,39 @@ { if (in_array($newmod, $this->modules_catalog)) { - /* Set the module for this execution and for the whole session */ + /* Set the module for this execution */ $this->selected_module=$newmod; - - /* @@@ session information is not available yet */ + return true; } + return false; } function deselect_module() { $this->selected_module=""; - /* We also have to remove it from session */ - - /* @@@ session information is not available yet */ } /* Wrapper functions to the selected module */ - function module_info() + function module_info($what="", $module="") { - /* Check the environment is correct */ - if ($this->selected_module == "") + if (!$module) { - die("No selected module"); + /* Check the environment is correct */ + if ($this->selected_module == "") + { + die("No selected module"); + } + $module=$this->selected_module; } - if (!is_callable(array($this->selected_module,'module_info'))) + if (!is_callable(array($module,'module_info'))) { - die("Module ".$this->selected_module." is malformed.\n"); + die("Module ".$module." is malformed.\n"); } /* Call actually the module method */ - return call_user_func(array($this->selected_module, 'module_info')); + return call_user_func_array( + array($module, 'module_info'), + array($what)); } function TS_parse($TS_name, $TS_description, $path) Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.php 3 Jan 2005 16:27:49 -0000 1.3 +++ index.php 4 Jan 2005 17:46:13 -0000 1.4 @@ -32,8 +32,18 @@ /* Initialize the plugins modules */ require($root."admin/modules.inc.php"); -$tslp = new testsuite("opts"); +$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"]=""; + } /* @@ -44,44 +54,34 @@ and can provide additional information on any module */ - - - -/******************************************** - Testing the functions -********************************************/ -/* -echo "<pre>\n"; - -$tmp = $tslp->TS_delete(13); -if ($tmp == false) -{ - echo "Erreur: <b>".$tslp->last_error."</b>\n"; -} - - -$tmp = $tslp->TS_parse("pts1.5.0", "Release officielle 1.5.0", "/home/thedoc/travail/CVS-sf.net/posixtestsuite"); -if ($tmp == false) -{ - echo "Erreur: <b>".$tslp->last_error."</b>\n"; -} - -$DATA=file_get_contents("/home/thedoc/travail/CVS-sf.net/posixtestsuite/logfile") or die("failed to read file"); - -$tmp = $tslp->RUN_parse("test_run", "Run de test", 14, $DATA); -if ($tmp == false) -{ - echo "Erreur: <b>".$tslp->last_error."</b>\n"; -} - -$tmp = $tslp->RUN_delete(19); -if ($tmp == false) +/* List the known modules */ +?> +<table border="0" align="right"> + <tr> + <td><i>Loaded plug-ins:</td> +<?php +$modules=$tslp->list_modules(); +sort($modules); +foreach($modules as $module) { - echo "Erreur: <b>".$tslp->last_error."</b>\n"; + echo " <td>\n"; + echo " <a title=\"".strip_tags($tslp->module_info( "title", $module ))."\"> <b>$module</b></a>\n"; + echo " </td>\n"; } - +?> + </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"; -*/ +?> + +<?php +db_fini(); +require($root."footer.inc.php"); ?> |
From: Sebastien D. <sde...@us...> - 2005-01-04 17:46:26
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5647 Modified Files: HISTORY functions.inc.php header.inc.php Added Files: session.inc.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: header.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/header.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- header.inc.php 3 Jan 2005 16:27:49 -0000 1.3 +++ header.inc.php 4 Jan 2005 17:46:13 -0000 1.4 @@ -18,6 +18,10 @@ if (!isset($_PAGE["title"])) die("Incorrect page inclusion.\n"); + +/* We load the session module here */ +require_once($root."session.inc.php"); + ?> <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> Index: functions.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/functions.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- functions.inc.php 3 Jan 2005 16:27:49 -0000 1.2 +++ functions.inc.php 4 Jan 2005 17:46:13 -0000 1.3 @@ -118,7 +118,7 @@ */ function query_version($release_name="", $exact_match=0) { - $sql = "SELECT ver_id, ver_name, ver_comment FROM opts_versions"; + $sql = "SELECT ver_id, ver_name, ver_comment, ver_module FROM opts_versions"; if ($release_name != "") { $sql .= " WHERE ver_name LIKE "; @@ -134,7 +134,8 @@ { $result[$data["ver_name"]]= array( "ver_id"=>$data["ver_id"], - "ver_comment"=>$data["ver_comment"]); + "ver_comment"=>$data["ver_comment"], + "ver_module" =>$data["ver_module"]); } return $result; } Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- HISTORY 3 Jan 2005 16:27:49 -0000 1.6 +++ HISTORY 4 Jan 2005 17:46:13 -0000 1.7 @@ -1,3 +1,9 @@ +2005-01-04: +- 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). + 2005-01-03: - opts parser module is now able to parse a testsuite release and run - new field added to the database for storing which module can deal --- NEW FILE: session.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. */ /* We don't really care about security yet, so the default session handler is suitable for us. If one want to add better security, a good start is the php manual. */ session_start(); /* Below is a definition of authorized session variables for each user page. If a session variable is found out of this definition, it is unset. The format is $authorized_session_vars["variable"]=array("page1","page2"...); where variable is the session variable name (key in $_SESSION) and page1, page2 the pages where this variable is allowed. */ $authorized_session_vars=array( "current_module"=>array("index.php") ); /* Below is the mechanism which will delete unauthorized sessions vars */ foreach ($_SESSION as $var => $authorization) { if (!isset($authorized_session_vars[$var])) { unset($_SESSION[$var]); continue; } if (!in_array(basename($_SERVER["PHP_SELF"]),$authorized_session_vars[$var])) { unset($_SESSION[$var]); } } ?> |
From: Sebastien D. <sde...@us...> - 2005-01-03 16:28:03
|
Update of /cvsroot/tslogparser/tslogparser/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22310/admin/modules Modified Files: opts.mod.php Log Message: finalize opts module Index: opts.mod.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules/opts.mod.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- opts.mod.php 3 Jan 2005 14:22:56 -0000 1.2 +++ opts.mod.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -490,6 +490,22 @@ return FALSE; } + /* Check the testsuite is an OPTS one */ + $sql = "SELECT ver_module from opts_versions" + ." WHERE ver_id=".$TS_id; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_select($sql); + if (!$tmp) + { + $parent->last_error="The testsuite cannot be found in the database.\n"; + return FALSE; + } + if ($tmp[0]["ver_module"] != "opts") + { + $parent->last_error="The testsuite is not an OPTS -- cannot be deleted within the current module.\n"; + return FALSE; + } /* Now, delete the testsuite description */ $sql = "DELETE from opts_version_descriptions" @@ -523,7 +539,182 @@ { if ( $parent->debug ) echo "opts->RUN_parse($RUN_name, $RUN_description, $TS_id, ...".strlen($CONTENT)."c...)\n"; - return false; + + /* Check this TS id first */ + $sql = "SELECT ver_id, ver_name, ver_comment, ver_module FROM opts_versions WHERE ver_id=$TS_id"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $release = db_execute_select($sql); + if (!$release) + { + $parent->last_error="The provided testsuite ID was not found in database\n"; + return false; + } + if ($release[0]["ver_module"] != "opts") + { + $parent->last_error="This testsuite's ID is not of type Open POSIX Test Suite. Aborted.\n"; + return false; + } + + /* Check that run name is free */ + $sql = "SELECT run_id, run_name, run_comments FROM opts_run WHERE run_name LIKE ".stringToDB($RUN_name); + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $res = db_execute_select($sql); + if ($res) + { + $elem=$res[0]; + $parent->last_error ="The test run '$RUN_name' is already in the database\n"; + $parent->last_error.="<i>".stringFromDB($elem["run_comments"])."</i>\n"; + return false; + } + + /* The trick for parsing the logfile is matching with a perl regexp */ + $log_data=array(); + + $regexp = "/conformance\/" + ."\w+\/" /* definition, interface, ... */ + ."((sys\/)?" /* special case for headers <sys/...> */ + ."\w+)\/" /* routine name matching */ + ."(speculative\/)?" /* we also want speculative tests */ + ."(\d*)-(\d*):" /* test name */ + ."\s*(build|link|execution):" /* Status type */ + ."\s*(FAILED|PASS|SKIP|UNSUPPORTED|UNTESTED|HUNG|INTERRUPTED|UNRESOLVED)" /* status */ + ."\s*:*\s*/"; + $num_match = 7; /* This is the number of grouping directives in this regexp */ + + /* Actually parse the logfile */ + $temp_array=preg_split($regexp, $CONTENT, -1, PREG_SPLIT_DELIM_CAPTURE); + + if ( $parent->debug > 4 ) + print_r($temp_array); + + if (count($temp_array) % ($num_match+1) != 1) + { + $parent->last_error="Regexp match error.\nInvalid logfile format -- expecting opts."; + return false; + } + + /* See preg_split documentation for more information on the data here */ + for ($idx=1; isset($temp_array[$idx]); $idx+=($num_match+1)) + { + $log_data[]=array( + "routine" => $temp_array[$idx+0], + "assert_num" => $temp_array[$idx+3], + "test_num" => $temp_array[$idx+4], + "status" => $temp_array[$idx+5]." ".$temp_array[$idx+6], + "log" => $temp_array[$idx+7] + ); + } + /* free some resources */ + unset($CONTENT); + unset($temp_array); + if ( $parent->debug > 1 ) + print_r($log_data); + /* We're done with the file parsing. */ + + /* Next step is to eliminate duplicates and match testcases with database definition */ + + /* We'll need the routine list */ + $routines=query_routines(); + if (!$routines) + { + $parent->last_error="Failed to get routines list from database"; + return false; + } + + /* We also need this testsuite complete definition */ + $sql = "SELECT descr_id, assert_routine, descr_num_assert, descr_num_test" + ." FROM opts_version_descriptions, opts_assertions" + ." WHERE opts_version_descriptions.descr_assert=opts_assertions.assert_id" + ." AND descr_version=$TS_id"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $opts_definition_tmp = db_execute_select($sql); + if (!$opts_definition_tmp) + { + $parent->last_error="The OPTS release description was not found in database.\n"; + return false; + } + /* We hash the result for efficiency */ + $opts_definition = array(); + foreach($opts_definition_tmp as $record) + $opts_definition + [$record["assert_routine"]] + [$record["descr_num_assert"]] + [$record["descr_num_test"]] + =$record["descr_id"]; + unset($opts_definition_tmp); + + /* We're ready to proceed: + * -> walk through the log file (analyzed) + * -> foreach test, find the corresponding description ID + * -> save a record with the information: description ID, test status, test log. + * -> this will then be used to generate the database entries. + */ + $result = array(); + foreach ($log_data as $record) + { + if (!isset($opts_definition + [$routines[$record["routine"]]["routine_id"]] + [$record["assert_num"]] + [$record["test_num"]])) + echo "The test ".$record["routine"]."/".$record["assert_num"]."-".$record["test_num"]." was not found in the database -- ignored\n"; + else + $result[$opts_definition + [$routines[$record["routine"]]["routine_id"]] + [$record["assert_num"]] + [$record["test_num"]] + ]=array( + "status"=>$record["status"], + "log" =>$record["log"]); + } + /* We can trash everything else :) */ + unset ($routines); + unset ($opts_definition); + unset ($log_data); + + echo "\n<b>".count($result)."</b> test results can be inserted in the results database.\n\n"; + + /* Now we've got to add the new run name in the database and get its ID */ + $sql = "INSERT INTO opts_run ( run_name, run_comments )" + ." VALUES ( ".stringToDB($RUN_name).", ".stringToDB($RUN_description)." )"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $res = db_execute_insert($sql); + if (!$res) + { + $parent->last_error="Failed to insert new run name"; + return false; + } + + $sql = "SELECT run_id, run_name, run_comments FROM opts_run WHERE run_name LIKE ".stringToDB($RUN_name); + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $res = db_execute_select($sql); + if (!$res) + { + $parent->last_error="Internal error: the run was inserted but disappeared\n"; + return false; + } + $run_id=$res[0]["run_id"]; + + $counter=0; + foreach($result as $desc_id => $testdata) + { + $sql = "INSERT INTO opts_run_results ( res_run, res_testcase, res_status, res_log )" + ." VALUES ( $run_id, $desc_id, ".stringToDB($testdata["status"]).", " + .stringToDB($testdata["log"])." )"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + if (db_execute_insert($sql)) + $counter++; + else + echo "<b><i>Failed to execute the following instruction</i></b>; skipping.\n$sql\n"; + } + echo "<b>$counter</b> records added to the database!\n"; + + return true; } @@ -531,7 +722,54 @@ { if ( $parent->debug ) echo "opts->RUN_delete($RUN_id)\n"; - return false; + + /* Check this run belongs to an OPTS testsuite */ + $sql = "SELECT ver_module FROM opts_versions, opts_version_descriptions, opts_run_results" + ." WHERE res_run=$RUN_id" + ." AND res_testcase=descr_id AND descr_version=ver_id" + ." GROUP BY ver_module"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_select($sql); + if (!$tmp) + { + $parent->last_error="The run ID or corresponding testsuite cannot be found in the database.\n"; + return FALSE; + } + if ($tmp[0]["ver_module"] != "opts") + { + $parent->last_error="The testsuite is not an OPTS -- cannot be deleted within the current module.\n"; + return FALSE; + } + + /* We can delete everything related to this run */ + $sql = "DELETE from opts_run_results " + ."WHERE res_run=$RUN_id"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_insert($sql); + if ($tmp == 0) + { + $parent->last_error="No row deleted in opts_run_results\n"; + return FALSE; + } + if ($parent->debug > 1) + echo "$tmp rows deleted from opts_run_results<br>\n"; + + $sql = "DELETE from opts_run " + ."WHERE run_id=$RUN_id"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_insert($sql); + if ($tmp == 0) + { + $parent->last_error="No row deleted in opts_run\n"; + return FALSE; + } + if ($parent->debug > 1) + echo "$tmp row deleted from opts_run<br>\n"; + + return true; } } |
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22310 Modified Files: HISTORY database.inc.php detailed.php footer.inc.php functions.inc.php header.inc.php index.php report.php run-browse.php Log Message: finalize opts module Index: run-browse.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/run-browse.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- run-browse.php 29 Nov 2004 14:04:01 -0000 1.3 +++ run-browse.php 3 Jan 2005 16:27:49 -0000 1.4 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: detailed.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/detailed.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- detailed.php 29 Nov 2004 14:04:01 -0000 1.2 +++ detailed.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -1,7 +1,7 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: footer.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/footer.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- footer.inc.php 31 Dec 2004 15:13:11 -0000 1.2 +++ footer.inc.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -1,4 +1,20 @@ <?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. + */ /* Check there is no hack attempt */ if (!isset($root)) die ("Hack attempt detected\n"); Index: header.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/header.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- header.inc.php 15 Dec 2004 15:28:41 -0000 1.2 +++ header.inc.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- HISTORY 3 Jan 2005 14:22:55 -0000 1.5 +++ HISTORY 3 Jan 2005 16:27:49 -0000 1.6 @@ -1,5 +1,5 @@ 2005-01-03: -- opts parser module is now able to parse a testsuite release +- opts parser module is now able to parse a testsuite release and run - new field added to the database for storing which module can deal with a given testsuite. sql: ALTER TABLE `opts_versions` ADD `ver_module` VARCHAR( 50 ) DEFAULT 'opts' NOT NULL ; Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.php 31 Dec 2004 15:13:11 -0000 1.3 +++ index.php 3 Jan 2005 16:27:49 -0000 1.4 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: functions.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/functions.inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- functions.inc.php 22 Nov 2004 10:34:38 -0000 1.1.1.1 +++ functions.inc.php 3 Jan 2005 16:27:49 -0000 1.2 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: report.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/report.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- report.php 29 Nov 2004 14:04:01 -0000 1.3 +++ report.php 3 Jan 2005 16:27:49 -0000 1.4 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: database.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/database.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- database.inc.php 3 Jan 2005 14:22:55 -0000 1.2 +++ database.inc.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 |
From: Sebastien D. <sde...@us...> - 2005-01-03 16:28:01
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22310/admin Modified Files: enter-new-run.php index.php modules.inc.php Log Message: finalize opts module Index: enter-new-run.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/enter-new-run.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- enter-new-run.php 29 Nov 2004 14:04:01 -0000 1.2 +++ enter-new-run.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * 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 Index: modules.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- modules.inc.php 3 Jan 2005 14:22:56 -0000 1.2 +++ modules.inc.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -215,7 +215,22 @@ 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)); + } } ?> Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.php 3 Jan 2005 14:22:56 -0000 1.2 +++ index.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -50,9 +50,9 @@ /******************************************** Testing the functions ********************************************/ +/* echo "<pre>\n"; -/* $tmp = $tslp->TS_delete(13); if ($tmp == false) { @@ -65,18 +65,23 @@ { echo "Erreur: <b>".$tslp->last_error."</b>\n"; } -*/ $DATA=file_get_contents("/home/thedoc/travail/CVS-sf.net/posixtestsuite/logfile") or die("failed to read file"); -$tmp = $tslp->RUN_parse("test_run", "Run de test", $DATA); +$tmp = $tslp->RUN_parse("test_run", "Run de test", 14, $DATA); if ($tmp == false) { echo "Erreur: <b>".$tslp->last_error."</b>\n"; } - +$tmp = $tslp->RUN_delete(19); +if ($tmp == false) +{ + echo "Erreur: <b>".$tslp->last_error."</b>\n"; +} echo "</pre>\n"; +*/ -?> \ No newline at end of file + +?> |
From: Sebastien D. <sde...@us...> - 2005-01-03 14:23:10
|
Update of /cvsroot/tslogparser/tslogparser/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25792/db Modified Files: dbresults.sql Log Message: Updated HISTORY, database, and opts module is able to parse a testsuite directory Index: dbresults.sql =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/db/dbresults.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- dbresults.sql 22 Nov 2004 10:34:39 -0000 1.1.1.1 +++ dbresults.sql 3 Jan 2005 14:22:56 -0000 1.2 @@ -155,6 +155,7 @@ `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`) |
From: Sebastien D. <sde...@us...> - 2005-01-03 14:23:09
|
Update of /cvsroot/tslogparser/tslogparser/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25792/admin/modules Modified Files: ltp.mod.php opts.mod.php readme.txt Log Message: Updated HISTORY, database, and opts module is able to parse a testsuite directory Index: opts.mod.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules/opts.mod.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- opts.mod.php 31 Dec 2004 15:13:12 -0000 1.1 +++ opts.mod.php 3 Jan 2005 14:22:56 -0000 1.2 @@ -24,37 +24,32 @@ var $assertion; var $xml_parser; + var $debug=0; - function opts_xml_routines() - { - $this->assertion = array("cur"=>-1); - $this->xml_parser = xml_parser_create(); - xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, true); - xml_set_element_handler($this->xml_parser, array($this, "startElement"), array($this, "endElement")); - xml_set_character_data_handler($this->xml_parser, array($this, "characterData")); - } - /* The functions below are used within the XML parser -- see PHP doc for more info */ function startElement($parser, $name, $attrs) { + if ($this->debug) + echo "startElement($name)\n"; if ($name == "ASSERTION") { - echo "startElement($name, ".$attrs["ID"].")\n"; $this->assertion["cur"]=$attrs["ID"]; $this->assertion[$attrs["ID"]]=""; } } - function endElement($name) + function endElement($parser, $name) { - echo "endElement($name)\n"; + if ($this->debug) + echo "endElement($name)\n"; if ($name == "ASSERTION") $this->assertion["cur"]=-1; } - function characterData($data) + function characterData($parser, $data) { - var_dump($data); + if ($this->debug) + echo $data; if (($this->assertion["cur"] != -1) && (trim($data))) $this->assertion[$this->assertion["cur"]] .= $data."\n"; } @@ -62,18 +57,38 @@ /* This function is called for each assertions.xml file */ function parse_assertions($file) { + /* Open the file for reading */ + if ($this->debug) + echo "Opening <i>$file</i>\n"; if (!($fp = fopen($file, "r"))) { die("could not open XML input"); } + /* Create the XML parser */ + $this->assertion = array("cur"=>-1); + $this->xml_parser = xml_parser_create(); + xml_set_object($this->xml_parser, $this); + xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, true); + xml_set_element_handler($this->xml_parser, "startElement", "endElement"); + xml_set_character_data_handler($this->xml_parser, "characterData"); + + /* Parse the file */ while ($data = fread($fp, 4096)) { + if ($this->debug) + echo "Raw:<hr>".htmlentities($data)."<hr>\n"; if (!xml_parse($this->xml_parser, $data, feof($fp))) { die(sprintf("XML error: %s at line %d<br>\nin ".$file, xml_error_string(xml_get_error_code($this->xml_parser)), xml_get_current_line_number($this->xml_parser))); } } + + /* Clean up the XML parser */ + xml_parser_free($this->xml_parser); + unset($this->assertion["cur"]); + + /* return */ return $this->assertion; } } @@ -105,8 +120,8 @@ */ function TS_parse(&$parent, $TS_name, $TS_description, $path) { - echo "opts->TS_parse($TS_name, $TS_description, $path)\n"; - $releases=query_version(); + if ( $parent->debug ) + echo "opts->TS_parse($TS_name, $TS_description, $path)\n"; $xmlparser = new opts_xml_routines(); @@ -234,27 +249,288 @@ closedir($dh); /* We've parsed the whole tree */ - echo "<pre>\n"; - print_r($opts_tree); - echo "</pre>\n"; + if ($parent->debug > 1) + print_r($opts_tree); + + /* The database shall be initialized here */ + if (!is_db_init()) + { + $parent->last_error="Database was not initialized\n"; + return FALSE; + } + + /* Check no release with the same name already exist */ + $releases=query_version($TS_name, 1); + if ($releases) + { + $parent->last_error= "The release '$TS_name' is already in the database \n". + "<i>".stringFromDB($releases[$TS_name]["ver_comment"])."</i>\n"; + return FALSE; + } + + /* Now, compare the $opts_tree with the $current_asserts and build up the list of assertions + to be added to the database.*/ + + $current_routines=query_routines(); + + /* We start with looking for missing routines */ + $missing_routines=array(); + + /* browse the new release assertions */ + foreach ($opts_tree as $domain) + { + foreach ($domain as $routine=>$asserts) + { + /* If the routine name is missing from opts_routines table, we'll add it */ + if (!isset($current_routines[$routine])) + $missing_routines[]=$routine; + } + } + + if ($parent->debug > 1) + print_r($missing_routines); + + /* If any routine is missing, it must be added previously to further processing */ + if ($missing_routines) + { + echo "New routines are being added to the database...\n"; + $counter=0; + foreach ($missing_routines as $routine) + { + $sql = "INSERT INTO opts_routines ( rou_name, rou_comment ) " + ."VALUES ( ".stringToDB($routine)."," + .stringToDB("Added on ".date("F j, Y")." with release '$new_release_name'")." )"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + if (db_execute_insert($sql)) + $counter++; + else + echo "Failed to add $routine to the database...\n"; + } + echo "Done. <b>$counter</b> routine have been added.\n\n"; + $current_routines=query_routines(); + } + + $current_asserts=query_all_asserts(); + $missing_assertions=array(); + + + /* browse the new release assertions */ + foreach ($opts_tree as $domain) + { + foreach ($domain as $routine=>$asserts) + { + /* Check if the routine is already in the database */ + if (!isset($current_asserts[$routine])) + { + if (!isset($current_routines[$routine])) + { + $parent->last_error="Internal script error: routine $routine was not added in 1st pass"; + return FALSE; + } + + /* We now schedule addition of the assertions for this routine, as none was already defined */ + foreach ($asserts["assertions"] as $id => $assert) + { + + $missing_assertions[]=array( + "routine"=>$routine, + "assert"=>$assert, + "oldid"=>$id); + } + } + else + { + foreach ($asserts["assertions"] as $id => $assert) + { + /* Check if this assertion text was already in the database */ + if(!in_array($assert, $current_asserts[$routine])) + $missing_assertions[]=array( + "routine"=>$routine, + "assert"=>$assert, + "oldid"=>$id); + } + } + } + } + if ($parent->debug > 1) + print_r($missing_assertions); + + /* If any assertion is missing, it must be added previously to further processing */ + if ($missing_assertions) + { + echo "New assertions are being added to the database...\n"; + $counter=0; + foreach ($missing_assertions as $assertion) + { + $sql = "INSERT INTO opts_assertions ( assert_routine, assert_text ) " + ."VALUES ( ".$current_routines[$assertion["routine"]]["routine_id"]."," + .stringToDB($assertion["assert"])." )"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + if (db_execute_insert($sql)) + $counter++; + else + echo "Failed to add assertion ".$assertion["oldid"]." of ".$assertion["routine"]." to the database...\n"; + } + echo "Done. <b>$counter</b> assertions have been added.\n\n"; + $current_asserts=query_all_asserts(); + } + + /* OK, we can now create the new release of OPTS in the database */ + $sql="INSERT INTO opts_versions (ver_name, ver_comment) " + . "VALUES ( ".stringToDB($TS_name).", " + . stringToDB($TS_description)." )"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + if (!db_execute_insert($sql)) + { + $parent->last_error= "Failed to insert new version in the database\n"; + return FALSE; + } + + /* We retrieve the new release uniqueID */ + $releases=query_version($TS_name, 1); + + if (!$releases) + { + $parent->last_error= "Internal error: the new OPTS version was not created\n"; + return FALSE; + } + if ($parent->debug > 1) + print_r($current_asserts); + + /* We can create the full release description */ + $release_description = array(); + $missing_test=0; + foreach ($opts_tree as $domain) + { + foreach ($domain as $routine=>$asserts) + { + if (!isset($current_asserts[$routine]) || !isset($current_routines[$routine])) + { + + $parent->last_error= "Internal script error: routine $routine was not added in 1st pass"; + return FALSE; + } + + /* We now schedule addition of the assertions for this routine, as none was already defined */ + foreach ($asserts["assertions"] as $id => $assert) + { + if (!isset($asserts["testcase"][$id])) + $missing_test++; + else + { + foreach ($asserts["testcase"][$id] as $number => $infos) + { + $release_description[]=array( + "descr_assert" => array_search($assert, $current_asserts[$routine]), + "descr_num_assert" => $id, + "descr_num_test" => $number, + "descr_info" => $infos); + } + unset($asserts["testcase"][$id]); + } + } + if (isset($asserts["testcase"])) + foreach($asserts["testcase"] as $id => $tcinfos) + echo "<b>Warning</b>, $routine's test $id-* has no matching assertions and therefore will be ignored.\n"; + } + } + + if ($missing_test) + echo "\n<i>Info:</i> $missing_test assertions are not tested.\n\n"; + + /* We've enough information now; we can create the release */ + reset($releases); + $rlstmp=current($releases); + $release_id=$rlstmp["ver_id"]; + + $counter=0; + foreach ($release_description as $testcase) + { + $sql = "INSERT INTO opts_version_descriptions " + ." (descr_version, descr_assert, descr_num_assert, descr_num_test, descr_info)" + ." VALUES (".$release_id.", " + .$testcase["descr_assert"].", " + .$testcase["descr_num_assert"].", " + .$testcase["descr_num_test"].", " + .stringToDB($testcase["descr_info"])." )"; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + if (db_execute_insert($sql)) + $counter++; + else + echo "Failed to execute: ".htmlentities($sql)."\n"; + } + + echo "<b><i>$counter testcases have been added</i></b>\n\n"; + echo "Process terminated.\n"; + return TRUE; } - function TS_delete($TS_id) + function TS_delete(&$parent, $TS_id) { - return false; + + if ( $parent->debug ) + echo "opts->TS_delete($TS_id)\n"; + + /* Check there is no run within this testsuite */ + $sql = "SELECT * from opts_run_results, opts_version_descriptions" + ." WHERE res_testcase=descr_id" + ." AND descr_version=".$TS_id; + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_select($sql); + if ($tmp) + { + $parent->last_error="The testsuite contains runs -- cannot be deleted.\n Delete the runs first.\n"; + return FALSE; + } + + + /* Now, delete the testsuite description */ + $sql = "DELETE from opts_version_descriptions" + ." WHERE descr_version=".$TS_id; + + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_insert($sql); + echo "$tmp rows deleted from opts_version_descriptions<br>\n"; + + /* and the testsuite name */ + $sql = "DELETE from opts_versions" + ." WHERE ver_id=".$TS_id; + + if ($parent->debug > 1) + echo htmlentities($sql)."<br>\n"; + $tmp = db_execute_insert($sql); + if ($tmp == 0) + { + $parent->last_error="No row deleted in opts_version\n"; + return FALSE; + } + if ($parent->debug > 1) + echo "$tmp rows deleted from opts_version<br>\n"; + + return true; } - function RUN_parse($RUN_name, $RUN_description, $TS_id, $CONTENT) + function RUN_parse(&$parent, $RUN_name, $RUN_description, $TS_id, &$CONTENT) { + if ( $parent->debug ) + echo "opts->RUN_parse($RUN_name, $RUN_description, $TS_id, ...".strlen($CONTENT)."c...)\n"; return false; } - function RUN_delete($RUN_id) + function RUN_delete(&$parent, $RUN_id) { + if ( $parent->debug ) + echo "opts->RUN_delete($RUN_id)\n"; return false; } } Index: ltp.mod.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules/ltp.mod.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ltp.mod.php 31 Dec 2004 15:13:12 -0000 1.1 +++ ltp.mod.php 3 Jan 2005 14:22:56 -0000 1.2 @@ -16,8 +16,9 @@ * Temple Place - Suite 330, Boston MA 02111-1307, USA. */ - /* This module is for use with the Open POSIX Test Suite. - Based on code from earlier TSLogParser releases. */ + /* 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() @@ -30,19 +31,19 @@ echo "<p>See the <a href='http://ltp.sourceforge.net/'>test suite homepage</a> for more information.</p>\n"; return; } - function TS_parse($TS_name, $TS_description, $path) + function TS_parse(&$parent, $TS_name, $TS_description, $path) { return $false; } - function TS_delete($TS_id) + function TS_delete(&$parent, $TS_id) { return $false; } - function RUN_parse($RUN_name, $RUN_description, $TS_id, $CONTENT) + function RUN_parse(&$parent, $RUN_name, $RUN_description, $TS_id, $CONTENT) { return $false; } - function RUN_delete($RUN_id) + function RUN_delete(&$parent, $RUN_id) { return $false; } Index: readme.txt =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules/readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- readme.txt 31 Dec 2004 15:13:12 -0000 1.1 +++ readme.txt 3 Jan 2005 14:22:56 -0000 1.2 @@ -1,2 +1,3 @@ Modules decription: -see file modules.inc.php for details \ No newline at end of file +see file modules.inc.php in parent directory for details + |
From: Sebastien D. <sde...@us...> - 2005-01-03 14:23:06
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25792/admin Modified Files: index.php modules.inc.php Log Message: Updated HISTORY, database, and opts module is able to parse a testsuite directory Index: modules.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- modules.inc.php 31 Dec 2004 15:13:12 -0000 1.1 +++ modules.inc.php 3 Jan 2005 14:22:56 -0000 1.2 @@ -20,10 +20,10 @@ A module consists in four functions closely related to a testsuite model ("type"). These functions are: - int TS_parse(string TS_name, string TS_description, string TS_path); - int TS_delete(int TS_id); - int RUN_parse(string RUN_name, string RUN_description, int TS_id, string CONTENT); - int RUN_delete(int RUN_id); + 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) @@ -50,6 +50,9 @@ 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 @@ -79,6 +82,7 @@ var $modules_catalog; var $selected_module; var $last_error=""; + var $debug=2; /* Class constructor: initializes the modules catalog and the default selected */ function testsuite($default_catalog="") @@ -179,6 +183,38 @@ 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)); + } } Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- index.php 31 Dec 2004 15:13:12 -0000 1.1 +++ index.php 3 Jan 2005 14:22:56 -0000 1.2 @@ -44,12 +44,39 @@ and can provide additional information on any module */ + + + +/******************************************** + Testing the functions +********************************************/ echo "<pre>\n"; + +/* +$tmp = $tslp->TS_delete(13); +if ($tmp == false) +{ + echo "Erreur: <b>".$tslp->last_error."</b>\n"; +} + + $tmp = $tslp->TS_parse("pts1.5.0", "Release officielle 1.5.0", "/home/thedoc/travail/CVS-sf.net/posixtestsuite"); if ($tmp == false) { echo "Erreur: <b>".$tslp->last_error."</b>\n"; } +*/ + +$DATA=file_get_contents("/home/thedoc/travail/CVS-sf.net/posixtestsuite/logfile") or die("failed to read file"); + +$tmp = $tslp->RUN_parse("test_run", "Run de test", $DATA); +if ($tmp == false) +{ + echo "Erreur: <b>".$tslp->last_error."</b>\n"; +} + + + echo "</pre>\n"; ?> \ No newline at end of file |
From: Sebastien D. <sde...@us...> - 2005-01-03 14:23:05
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25792 Modified Files: HISTORY database.inc.php Log Message: Updated HISTORY, database, and opts module is able to parse a testsuite directory Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- HISTORY 31 Dec 2004 15:13:11 -0000 1.4 +++ HISTORY 3 Jan 2005 14:22:55 -0000 1.5 @@ -1,6 +1,13 @@ +2005-01-03: +- opts parser module is now able to parse a testsuite release +- new field added to the database for storing which module can deal + with a given testsuite. + sql: ALTER TABLE `opts_versions` ADD `ver_module` VARCHAR( 50 ) DEFAULT 'opts' NOT NULL ; + 2004-11-31: - added specification for test suites modules -- new files: +- new files: admin/index.php admin/modules.inc.php + admin/modules/{ltp.mod.php,opts.mod.php,readme.txt} 2004-11-22: tag v02 - Fix in run-browse.php when a testsuite contains only one run. Index: database.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/database.inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- database.inc.php 22 Nov 2004 10:34:39 -0000 1.1.1.1 +++ database.inc.php 3 Jan 2005 14:22:55 -0000 1.2 @@ -58,6 +58,13 @@ mysql_close($db_link); } +/* Check DB link */ +function is_db_init() +{ + global $db_link; + return ($db_link != false); +} + function db_execute_select($sql) { $rows=array(); |
From: Sebastien D. <sde...@us...> - 2004-12-31 15:13:24
|
Update of /cvsroot/tslogparser/tslogparser/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16198/admin/modules Added Files: ltp.mod.php opts.mod.php readme.txt Log Message: Started new modular implementation for different testsuites support --- NEW FILE: opts.mod.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 module is for use with the Open POSIX Test Suite. Based on code from earlier TSLogParser releases. */ /* The following class contains the routines for the XML parser used later */ class opts_xml_routines { var $assertion; var $xml_parser; function opts_xml_routines() { $this->assertion = array("cur"=>-1); $this->xml_parser = xml_parser_create(); xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, true); xml_set_element_handler($this->xml_parser, array($this, "startElement"), array($this, "endElement")); xml_set_character_data_handler($this->xml_parser, array($this, "characterData")); } /* The functions below are used within the XML parser -- see PHP doc for more info */ function startElement($parser, $name, $attrs) { if ($name == "ASSERTION") { echo "startElement($name, ".$attrs["ID"].")\n"; $this->assertion["cur"]=$attrs["ID"]; $this->assertion[$attrs["ID"]]=""; } } function endElement($name) { echo "endElement($name)\n"; if ($name == "ASSERTION") $this->assertion["cur"]=-1; } function characterData($data) { var_dump($data); if (($this->assertion["cur"] != -1) && (trim($data))) $this->assertion[$this->assertion["cur"]] .= $data."\n"; } /* This function is called for each assertions.xml file */ function parse_assertions($file) { if (!($fp = fopen($file, "r"))) { die("could not open XML input"); } while ($data = fread($fp, 4096)) { if (!xml_parse($this->xml_parser, $data, feof($fp))) { die(sprintf("XML error: %s at line %d<br>\nin ".$file, xml_error_string(xml_get_error_code($this->xml_parser)), xml_get_current_line_number($this->xml_parser))); } } return $this->assertion; } } class opts { /* 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). */ function module_info() { 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; } /* 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. */ function TS_parse(&$parent, $TS_name, $TS_description, $path) { echo "opts->TS_parse($TS_name, $TS_description, $path)\n"; $releases=query_version(); $xmlparser = new opts_xml_routines(); $opts_tree=array(); $regexp_testcase="^([0-9]*)-([0-9]*|.*buildonly)\.(c|sh)$"; /* Check the directory contains a coherent structure */ if ((!is_dir($path)) || (!is_dir($path."/conformance"))) { $parent->last_error="Directory '$path' does not contain a valid source tree.\n"; return FALSE; } /* Open and browse the tree */ $dh = opendir($path."/conformance/"); if (!$dh) { $parent->last_error="Failed to open directory $path/conformance/ for reading.\n"; return FALSE; } while (($file = readdir($dh)) !== false) { if (($file == ".") || ($file == "..") || ($file == "CVS")) continue; if (is_dir($path."/conformance/".$file)) { $dh2 = opendir($path."/conformance/".$file); if (!$dh2) { $parent->last_error= "Failed to open directory $path/conformance/$file for reading.\n"; return FALSE; } while (($file2 = readdir($dh2)) !== false) { if (($file2 == ".") || ($file2 == "..") || ($file2 == "CVS")) continue; $file2array=array($file2); /* Special case: headers sys/mman.h etc... */ if (($file == "definitions") && ($file2 == "sys")) { $dh2b = opendir($path."/conformance/definitions/sys"); if (!$dh2b) { $parent->last_error= "Failed to open dir $path/conformance/definitions/sys for reading.\n"; return FALSE; } $file2array=array(); while (($file2b = readdir($dh2b)) !== false) { if (($file2b == ".") || ($file2b == "..") || ($file2b == "CVS")) continue; $file2array[]="sys/".$file2b; } closedir($dh2b); } foreach ($file2array as $file2) { if (is_dir($path."/conformance/".$file."/".$file2)) { $dh3 = opendir($path."/conformance/".$file."/".$file2); if (!$dh3) { $parent->last_error= "Failed to open directory $path/conformance/$file/$file2 for reading.\n"; return FALSE; } $assertion_file = 0; while (($file3 = readdir($dh3)) !== false) { if (($file3 == ".") || ($file3 == "..") || ($file3 == "CVS")) continue; /* We're looking for "assertions.xml" files */ if ($file3 == "assertions.xml") { $assertion_file = 1; continue; } /* We also keep track of every testcase file */ if (ereg($regexp_testcase, $file3, $regs)) $opts_tree[$file][$file2]["testcase"][$regs[1]][(int)$regs[2]]=$regs[1]."-".$regs[2].".".$regs[3]; /* Last but not least, we want the speculative tests in the database */ if ($file3 == "speculative") { $dh4 = opendir($path."/conformance/".$file."/".$file2."/".$file3); if (!$dh4) { $parent->last_error= "Failed to open directory $path/conformance/$file/$file2/speculative for reading.\n"; return FALSE; } while (($file4 = readdir($dh4)) !== false) { if (($file4 == ".") || ($file4 == "..") || ($file4 == "CVS")) continue; if (ereg($regexp_testcase, $file4, $regs)) $opts_tree[$file][$file2]["testcase"][$regs[1]][(int)$regs[2]]="speculative/".$regs[1]."-".$regs[2].".".$regs[3]; } closedir($dh4); } } closedir($dh3); /* We now parse the assertions */ if ($assertion_file) { $opts_tree[$file][$file2]["assertions"]=$xmlparser->parse_assertions($path."/conformance/".$file."/".$file2."/assertions.xml"); } } } } closedir ($dh2); } } closedir($dh); /* We've parsed the whole tree */ echo "<pre>\n"; print_r($opts_tree); echo "</pre>\n"; return TRUE; } function TS_delete($TS_id) { return false; } function RUN_parse($RUN_name, $RUN_description, $TS_id, $CONTENT) { return false; } function RUN_delete($RUN_id) { return false; } } /* Return the class name so it is added to the catalog */ return("opts"); ?> --- NEW FILE: ltp.mod.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 module is for use with the Open POSIX Test Suite. Based on code from earlier TSLogParser releases. */ class ltp { function module_info() { echo "<p><b>Linux Test Project</b> parser module for <b>TSLogParser</b></p>\n"; echo "<p>Release: <b>0.0</b> 2004/12/31</p>\n"; echo "<p>Limitations and known problems: \n"; echo "<ul>\n<li>This module is just for test purpose; no function is working yet\n"; echo "</li></ul></p>\n"; echo "<p>See the <a href='http://ltp.sourceforge.net/'>test suite homepage</a> for more information.</p>\n"; return; } function TS_parse($TS_name, $TS_description, $path) { return $false; } function TS_delete($TS_id) { return $false; } function RUN_parse($RUN_name, $RUN_description, $TS_id, $CONTENT) { return $false; } function RUN_delete($RUN_id) { return $false; } } /* Return the class name so it is added to the catalog */ return("ltp"); ?> --- NEW FILE: readme.txt --- Modules decription: see file modules.inc.php for details |
From: Sebastien D. <sde...@us...> - 2004-12-31 15:13:23
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16198 Modified Files: HISTORY footer.inc.php index.php Log Message: Started new modular implementation for different testsuites support Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- HISTORY 22 Nov 2004 17:34:32 -0000 1.3 +++ HISTORY 31 Dec 2004 15:13:11 -0000 1.4 @@ -1,3 +1,7 @@ +2004-11-31: +- added specification for test suites modules +- new files: + 2004-11-22: tag v02 - Fix in run-browse.php when a testsuite contains only one run. - Fix in admin/parse-opts-release.php for filename inclusion. Index: footer.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/footer.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- footer.inc.php 29 Nov 2004 14:04:01 -0000 1.1 +++ footer.inc.php 31 Dec 2004 15:13:11 -0000 1.2 @@ -1,6 +1,7 @@ <?php -if (!isset($_PAGE["title"])) - die("Incorrect page inclusion.\n"); +/* Check there is no hack attempt */ +if (!isset($root)) + die ("Hack attempt detected\n"); ?> <hr width="100%"> Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.php 29 Nov 2004 14:04:01 -0000 1.2 +++ index.php 31 Dec 2004 15:13:11 -0000 1.3 @@ -17,7 +17,10 @@ */ /* Redirect to the browser page */ -header("Location: http://" . $_SERVER['HTTP_HOST'] +$index = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) - . "/run-browse.php"); /* Redirect browser */ + . "/run-browse.php"; + +header("Location: $index"); /* Redirect browser */ +echo "You'll be redirected to <a href='$index'>the index page</a>.\n"; ?> |
From: Sebastien D. <sde...@us...> - 2004-12-31 15:13:23
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16198/admin Added Files: index.php modules.inc.php Log Message: Started new modular implementation for different testsuites support --- 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(string TS_name, string TS_description, string TS_path); int TS_delete(int TS_id); int RUN_parse(string RUN_name, string RUN_description, int TS_id, string CONTENT); int RUN_delete(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. 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) -> The function selected_module returns the currently selected module. -> The function deselect_module changes the selection back to default. -> 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. The selected module information is persistent through a session. */ class testsuite { var $modules_catalog; var $selected_module; var $last_error=""; /* Class constructor: initializes the modules catalog and the default selected */ function testsuite($default_catalog="") { $this->modules_catalog=array(); $this->selected_module=""; /* If the default catalog is not specified, get it from session */ /* @@@ Session is not implemented yet */ // $default_catalog=$_SESSION["active_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; if ($tmp == $default_catalog) $this->selected_module=$tmp; } else { die("File $filename has an incorrect format\n"); } } if ($this->selected_module !== $default_catalog) { /* Remove this information from the session */ /* @@@ session not implemented yet */ /* Stop here */ die("The required module <i>$default_catalog</i> is unavailable."); } } /* 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 and for the whole session */ $this->selected_module=$newmod; /* @@@ session information is not available yet */ } } function deselect_module() { $this->selected_module=""; /* We also have to remove it from session */ /* @@@ session information is not available yet */ } /* Wrapper functions to the selected module */ function module_info() { /* Check the environment is correct */ if ($this->selected_module == "") { die("No selected module"); } if (!is_callable(array($this->selected_module,'module_info'))) { die("Module ".$this->selected_module." is malformed.\n"); } /* Call actually the module method */ return call_user_func(array($this->selected_module, 'module_info')); } 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)); } } ?> --- 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. */ $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("opts"); /* 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 */ echo "<pre>\n"; $tmp = $tslp->TS_parse("pts1.5.0", "Release officielle 1.5.0", "/home/thedoc/travail/CVS-sf.net/posixtestsuite"); if ($tmp == false) { echo "Erreur: <b>".$tslp->last_error."</b>\n"; } echo "</pre>\n"; ?> |
From: Sebastien D. <sde...@us...> - 2004-12-31 15:12:01
|
Update of /cvsroot/tslogparser/tslogparser/admin/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15750/admin/modules Log Message: Directory /cvsroot/tslogparser/tslogparser/admin/modules added to the repository |
From: Sebastien D. <sde...@us...> - 2004-12-28 09:46:53
|
Update of /cvsroot/nptltracetool/trace/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3525/build Log Message: Directory /cvsroot/nptltracetool/trace/build added to the repository |
From: Sebastien D. <sde...@us...> - 2004-12-28 09:46:53
|
Update of /cvsroot/nptltracetool/trace/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3525/bin Log Message: Directory /cvsroot/nptltracetool/trace/bin added to the repository |
From: Sebastien D. <sde...@us...> - 2004-12-28 09:46:52
|
Update of /cvsroot/nptltracetool/trace/bin/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3525/bin/tests Log Message: Directory /cvsroot/nptltracetool/trace/bin/tests added to the repository |
From: Sebastien D. <sde...@us...> - 2004-12-15 15:28:51
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17803 Modified Files: header.inc.php Log Message: fix link in header.inc.php Index: header.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/header.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- header.inc.php 29 Nov 2004 14:04:01 -0000 1.1 +++ header.inc.php 15 Dec 2004 15:28:41 -0000 1.2 @@ -28,5 +28,5 @@ <body> <h1 align="center"><?php echo $_PAGE["title"]; ?></h1> <hr width='30%'> - <p>Back to <a href="run-browse.php">browser</a>.</p> + <p>Back to <a href="<?php echo $root; ?>run-browse.php">browser</a>.</p> |
From: Sebastien D. <sde...@us...> - 2004-12-14 10:37:20
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30019 Modified Files: parse-opts-release.php Log Message: Verbose message on XML parsing error Index: parse-opts-release.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/parse-opts-release.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- parse-opts-release.php 29 Nov 2004 14:04:01 -0000 1.3 +++ parse-opts-release.php 14 Dec 2004 10:37:11 -0000 1.4 @@ -146,7 +146,7 @@ while ($data = fread($fp, 4096)) { if (!xml_parse($xml_parser, $data, feof($fp))) { - die(sprintf("XML error: %s at line %d", + die(sprintf("XML error: %s at line %d<br>\nin ".$file, xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } |
From: Bryce H. <br...@us...> - 2004-12-09 02:31:28
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28675 Modified Files: INSTALL Log Message: spelling Index: INSTALL =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/INSTALL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- INSTALL 22 Nov 2004 10:34:38 -0000 1.1.1.1 +++ INSTALL 9 Dec 2004 02:31:18 -0000 1.2 @@ -8,7 +8,7 @@ -> create a file containing your database access information, and include it from: database.inc.php - as described. Here is an exemple of such a configuration file: + as described. Here is an example of such a configuration file: $ cat > db_inc.php <<EOF <?php // Database server name or IP: @@ -35,19 +35,19 @@ -> Make the system know about your testsuite. The first step is to provide the system with the description of your - testsuite. Do achieve this, you'll have to open the + 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). The page asks for several descriptive information -- enter anything you like, but I'd suggest to put explicit naming convention and description. - exemple: + example: Name: OPTS-CVS-2004-11-19 Desc: Open POSIX Test Suite cvs checkout from 2004-11-19, used to ... 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.: + your files to 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. @@ -62,7 +62,7 @@ (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 + then 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 |
From: Sebastien D. <sde...@us...> - 2004-12-01 15:03:44
|
Update of /cvsroot/tslogparser/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6330 Modified Files: checkoutlist loginfo Added Files: commitlog Log Message: do not publish CVSROOT changes on the mailing list Index: checkoutlist =================================================================== RCS file: /cvsroot/tslogparser/CVSROOT/checkoutlist,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- checkoutlist 25 Nov 2004 13:58:43 -0000 1.2 +++ checkoutlist 1 Dec 2004 15:03:18 -0000 1.3 @@ -12,4 +12,5 @@ # # comment lines begin with '#' avail +commitlog Index: loginfo =================================================================== RCS file: /cvsroot/tslogparser/CVSROOT/loginfo,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- loginfo 1 Dec 2004 14:48:57 -0000 1.3 +++ loginfo 1 Dec 2004 15:03:19 -0000 1.4 @@ -25,5 +25,6 @@ #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog +CVSROOT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail -u %{sVv} tsl...@li... --- NEW FILE: commitlog --- |
From: Sebastien D. <sde...@us...> - 2004-12-01 14:49:06
|
Update of /cvsroot/tslogparser/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2888 Modified Files: loginfo Log Message: Change mail format to unified diff Index: loginfo =================================================================== RCS file: /cvsroot/tslogparser/CVSROOT/loginfo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** loginfo 25 Nov 2004 14:20:23 -0000 1.2 --- loginfo 1 Dec 2004 14:48:57 -0000 1.3 *************** *** 26,29 **** # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail %{sVv} tsl...@li... --- 26,29 ---- # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail -u %{sVv} tsl...@li... |
From: Sebastien D. <sde...@us...> - 2004-11-29 14:04:10
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17897/admin Modified Files: enter-new-run.php parse-opts-release.php Log Message: (*) Added 2 files: header.inc.php and footer.inc.php (*) Changes in all other files to use the 2 new files (*) Defaulting run browser to hide PASS and SKIP tests Index: enter-new-run.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/enter-new-run.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** enter-new-run.php 22 Nov 2004 10:34:40 -0000 1.1.1.1 --- enter-new-run.php 29 Nov 2004 14:04:01 -0000 1.2 *************** *** 32,50 **** $root="../"; - ?> - <html> - <head> - <title> - Open POSIX TestSuite execution logfile parser - </title> - </head> - <body> - <h1 align=center>Open POSIX TestSuite Execution Log File Parser</h1> - <hr align=center width="30%"> - <p>Go back to the <a href="<?php echo $root; ?>run-browse.php">Results browser</a>.</p> - <?php if (! ( isset($_POST["opts_release"]) && trim($_POST["opts_release"]) && isset($_POST["logfile_name"]) && trim($_POST["logfile_name"]) --- 32,41 ---- $root="../"; + $_PAGE["title"]="Open POSIX TestSuite Execution Log File Parser"; + + require($root."header.inc.php"); if (! ( isset($_POST["opts_release"]) && trim($_POST["opts_release"]) && isset($_POST["logfile_name"]) && trim($_POST["logfile_name"]) *************** *** 263,271 **** echo "<b>$counter</b> records added to the database!\n"; ! ?> ! </pre> ! </body> ! </html> ! <?php db_fini(); ?> --- 254,260 ---- echo "<b>$counter</b> records added to the database!\n"; ! echo "</pre>\n"; ! db_fini(); + require($root."footer.inc.php"); ?> Index: parse-opts-release.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/parse-opts-release.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** parse-opts-release.php 22 Nov 2004 16:55:36 -0000 1.2 --- parse-opts-release.php 29 Nov 2004 14:04:01 -0000 1.3 *************** *** 18,34 **** $root="../"; ! ?> ! <html> ! <head> ! <title> ! Open POSIX TestSuite parser ! </title> ! </head> ! <body> ! <h1 align=center>Open POSIX TestSuite Parser</h1> ! <hr align=center width="30%"> - <p>Go back to the <a href="<?php echo $root; ?>run-browse.php">Results browser</a>.</p> - <?php /* The purpose of this file is to get a full OPTS archive of the testsuite --- 18,25 ---- $root="../"; ! $_PAGE["title"]="Open POSIX TestSuite Parser"; ! ! require($root."header.inc.php"); /* The purpose of this file is to get a full OPTS archive of the testsuite *************** *** 494,500 **** echo "Process terminated.\n"; ?> ! </pre> ! </body> ! </html> --- 485,492 ---- echo "Process terminated.\n"; + echo "</pre>\n"; + + require($root."footer.inc.php"); ?> ! |
From: Sebastien D. <sde...@us...> - 2004-11-29 14:04:09
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17897 Modified Files: detailed.php index.php report.php run-browse.php Added Files: footer.inc.php header.inc.php Log Message: (*) Added 2 files: header.inc.php and footer.inc.php (*) Changes in all other files to use the 2 new files (*) Defaulting run browser to hide PASS and SKIP tests Index: run-browse.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/run-browse.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** run-browse.php 22 Nov 2004 17:08:12 -0000 1.2 --- run-browse.php 29 Nov 2004 14:04:01 -0000 1.3 *************** *** 24,40 **** */ - ?> - <html> - <head> - <title>Open POSIX TestSuite - Results browser</title> - </head> - <body> - <h1 align="center">Open POSIX TestSuite - Results browser</h1> - <hr align=center width="30%"> - - <h3>Available results in database</h3> - - <?php - /* We need to find all runs inside the database */ $root=""; --- 24,27 ---- *************** *** 43,46 **** --- 30,37 ---- db_init(); + $_PAGE["title"]="Open POSIX TestSuite - Results browser"; + + require($root."header.inc.php"); + /* *************** *** 91,94 **** --- 82,88 ---- /* Ok, now we'll display the result on the html page */ ?> + + <h3>Available results in database</h3> + <table border="1"> <tr> *************** *** 138,141 **** --- 132,141 ---- echo " <form method='POST' action='report.php'>\n"; echo " <input type='hidden' name='opts_rel' value=\"".$data["id"]."\">\n"; + + /* default to masking PASS and SKIP status */ + echo " <input type='hidden' name='build_PASS' value='hidden'>\n"; + echo " <input type='hidden' name='link_SKIP' value='hidden'>\n"; + echo " <input type='hidden' name='execution_PASS' value='hidden'>\n"; + foreach ($data["runs"] as $run_id => $run_data) { *************** *** 175,181 **** ?> </table> - </body> - </html> <?php db_fini(); ?> --- 175,180 ---- ?> </table> <?php db_fini(); + require($root."footer.inc.php"); ?> Index: detailed.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/detailed.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** detailed.php 22 Nov 2004 10:34:39 -0000 1.1.1.1 --- detailed.php 29 Nov 2004 14:04:01 -0000 1.2 *************** *** 30,52 **** */ - ?> - <html> - <head> - <title> - Open POSIX TestSuite Testcase Detail - </title> - </head> - <body> - <h1 align=center>Open POSIX TestSuite Testcase Detail</h1> - <hr align=center width="30%"> - <?php if (!isset($_GET["run_id"]) || (!isset($_GET["testcase_id"]))) die("<p><b>Wrong parameter format.</b></p>\n</body></html>\n"); - $root=""; - require($root."database.inc.php"); - require($root."functions.inc.php"); db_init(); --- 30,45 ---- */ + $root=""; + require($root."database.inc.php"); + require($root."functions.inc.php"); + + $_PAGE["title"]="Open POSIX TestSuite Testcase Detail"; + + require($root."header.inc.php"); if (!isset($_GET["run_id"]) || (!isset($_GET["testcase_id"]))) die("<p><b>Wrong parameter format.</b></p>\n</body></html>\n"); db_init(); *************** *** 112,119 **** </tr> </table> - </body> - </html> <?php db_fini(); ?> --- 105,111 ---- </tr> </table> <?php db_fini(); + require($root."footer.inc.php"); ?> --- NEW FILE: footer.inc.php --- <?php if (!isset($_PAGE["title"])) die("Incorrect page inclusion.\n"); ?> <hr width="100%"> <p> <font size='-2' color='grey'> Generated with <a href="http://tslogparser.sourceforge.net">TsLogParser</a>. </font> </p> </body> </html> --- NEW FILE: header.inc.php --- <?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"); ?> <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>TsLogParser Project</title> </head> <body> <h1 align="center"><?php echo $_PAGE["title"]; ?></h1> <hr width='30%'> <p>Back to <a href="run-browse.php">browser</a>.</p> Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/index.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.php 22 Nov 2004 10:34:39 -0000 1.1.1.1 --- index.php 29 Nov 2004 14:04:01 -0000 1.2 *************** *** 1,3 **** --- 1,20 ---- <?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. + */ + /* Redirect to the browser page */ header("Location: http://" . $_SERVER['HTTP_HOST'] Index: report.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/report.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** report.php 22 Nov 2004 15:55:59 -0000 1.2 --- report.php 29 Nov 2004 14:04:01 -0000 1.3 *************** *** 42,59 **** //echo "</pre>\n"; ! ?> ! <html> ! <head> ! <title> ! Open POSIX TestSuite Reporting Tool ! </title> ! </head> ! <body> ! <h1 align=center>Open POSIX TestSuite Reporting Tool</h1> ! <hr align=center width="30%"> ! <p>Go back to the <a href="run-browse.php">Results browser</a>.</p> ! <?php if (!isset($_POST["opts_rel"])) die("<p>No valid parameter found. Please use <a href='run-browse.php'>this page</a>.</p>\n</body></html>\n"); --- 42,54 ---- //echo "</pre>\n"; ! $root=""; ! require($root."database.inc.php"); ! require($root."functions.inc.php"); ! $_PAGE["title"]="Open POSIX TestSuite Reporting Tool"; ! require($root."header.inc.php"); ! ! /* Verify that the page was not opened directly */ if (!isset($_POST["opts_rel"])) die("<p>No valid parameter found. Please use <a href='run-browse.php'>this page</a>.</p>\n</body></html>\n"); *************** *** 91,94 **** --- 86,94 ---- unset($_POST["noasserts"]); } + if (isset($_POST["nodetails"])) + { + unset($_POST["details"]); + unset($_POST["nodetails"]); + } if (isset($_POST["filter"]) && ($_POST["filter"]=="Show")) { *************** *** 156,162 **** /* Whatever the mode is, we need to query the database with the same informations */ - $root=""; - require($root."database.inc.php"); - require($root."functions.inc.php"); db_init(); --- 156,159 ---- *************** *** 211,215 **** while ($row = db_getline($res)) { ! if (!isset($_POST[str_replace (' ','_',$row["res_status"])])) { $data[$row["rou_name"]][$row["assert_id"]][$row["descr_info"]][$row["descr_id"]][$row["run_name"]]=array( --- 208,212 ---- while ($row = db_getline($res)) { ! if ($mode != "BROWSE" || !isset($_POST[str_replace (' ','_',$row["res_status"])])) { $data[$row["rou_name"]][$row["assert_id"]][$row["descr_info"]][$row["descr_id"]][$row["run_name"]]=array( *************** *** 445,452 **** unset($data); unset($runs); ?> ! <p> </p> ! <hr width='30%'> ! <font size='-2' color='grey'>Generated with <a href="http://sourceforge.net/projects/tslogparser/">TsLogParser</a></font> ! </body> ! </html> --- 442,448 ---- unset($data); unset($runs); + + + require($root."footer.inc.php"); ?> ! |