|
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: -np...@bu... -(subscribe by sending "subscribe" to npt...@bu...) +tsl...@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). |