[Erp5-report] r20735 - /erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Apr 21 19:37:47 CEST 2008


Author: jerome
Date: Mon Apr 21 19:37:47 2008
New Revision: 20735

URL: http://svn.erp5.org?rev=20735&view=rev
Log:
make host, port and portal_name some parameter, so that we can run tests behind
a web frontend

Modified:
    erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py

Modified: erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py?rev=20735&r1=20734&r2=20735&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py (original)
+++ erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py Mon Apr 21 19:37:47 2008
@@ -22,6 +22,11 @@
   -s, --stdout               prints the results on stdout instead of sending
                              results by email (unless email_to_address is also
                              passed explictly)
+  --host                     the hostname of this ERP5 instance
+  --port                     the port of this ERP5 instance
+  --portal_name              the ID of the ERP5 site
+                             URLs will start with:
+                                 http://${host}:${port}/${portal_name}/
                              
 """
 
@@ -60,10 +65,13 @@
   global send_mail
   global stdout
   global email_to_address
+  global host
+  global port
+  global portal_name
   try:
     opts, args = getopt.getopt(sys.argv[1:],
           "hs", ["help", "stdout",
-                "email_to_address="] )
+                 "email_to_address=", "host=", "port=", "portal_name="] )
   except getopt.GetoptError, msg:
     usage(sys.stderr, msg)
     sys.exit(2)
@@ -77,6 +85,13 @@
     elif opt in ('-h', '--help'):
       usage(sys.stdout)
       sys.exit()
+    elif opt == "--host":
+      host = arg
+    elif opt == "--port":
+      port = int(arg)
+    elif opt == "--portal_name":
+      portal_name = arg
+
   if not stdout:
     send_mail = 1
 




More information about the Erp5-report mailing list