[Zope-CVS] CVS: Packages/FunctionalTests/FunctionalTests - ScenarioGenerator.py:1.5

Tres Seaver tseaver@zope.com
Fri, 23 May 2003 18:09:38 -0400


Update of /cvs-repository/Packages/FunctionalTests/FunctionalTests
In directory cvs.zope.org:/tmp/cvs-serv18696/FunctionalTests

Modified Files:
	ScenarioGenerator.py 
Log Message:


  - Make more logical command line args for the "short" versions.

  - Make output default to stdout.


=== Packages/FunctionalTests/FunctionalTests/ScenarioGenerator.py 1.4 => 1.5 ===
--- Packages/FunctionalTests/FunctionalTests/ScenarioGenerator.py:1.4	Fri May 23 18:02:23 2003
+++ Packages/FunctionalTests/FunctionalTests/ScenarioGenerator.py	Fri May 23 18:09:37 2003
@@ -87,7 +87,7 @@
   %(GENERATOR_EXE)s [-?vq] \\
                      [-l log_dir] [-f log_prefix] [-e log_extension] \\
                      [-o file] [-x pattern] [-X file] \\
-                     [-u site_host] [-r site_path]
+                     [-h site_host] [-r site_path]
 
     -?, --help                      Print this help message
 
@@ -118,10 +118,10 @@
     -X, --exclude-file              Exclude requests which match any pattern
                                     read from 'file' (one pattern per line).
 
-    -u, --site-host                 Specify the host / port of the site being
+    -h, --site-host                 Specify the host / port of the site being
                                     tested.
 
-    -r, --site-path                 Specify the path to the "base" of the
+    -p, --site-path                 Specify the path to the "base" of the
                                     site being tested.
 
 %(MESSAGE)s\n""" % { 'GENERATOR_EXE'        : sys.argv[0]
@@ -143,7 +143,7 @@
 
         try:
             opts, ignored = getopt.getopt( args
-                                         , "?vqcCl:f:e:o:x:X:u:r:"
+                                         , "?vqcCl:f:e:o:x:X:h:p:"
                                          , [ 'help'
                                            , 'verbose'
                                            , 'quiet'
@@ -197,10 +197,10 @@
             if o == '-X' or o == '--exclude-file':
                 exclude_file = v
 
-            if o == '-u' or o == '--site-host':
+            if o == '-h' or o == '--site-host':
                 site_host = v
 
-            if o == '-r' or o == '--site-path':
+            if o == '-p' or o == '--site-path':
                 site_path = v
 
         self._verbosity = verbosity
@@ -222,15 +222,9 @@
             self._site_path = site_path
 
         if output_file is not None:
-            if output_file == '-':
-                self._output_file = sys.stdout
-            else:
-                self._output_file = open( output_file, 'w' )
+            self._output_file = open( output_file, 'w' )
         else:
-            self._output_file = open( '%s/%s.zft'
-                                    % ( self._logfile_directory
-                                      , self._logfile_prefix
-                                      ), 'w' )
+            self._output_file = sys.stdout
 
         if exclude_file is not None:
             self._exclude_file = exclude_file