summaryrefslogtreecommitdiff
path: root/tests/cdash/cfg_gnu.py
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-01-01 00:11:17 +0000
committerBenny Prijono <bennylp@teluu.com>2009-01-01 00:11:17 +0000
commitf2bee5e8763778f0f261e1e07ab657c828821c2e (patch)
tree212cadd6127a8c10030f716145e5163dbdb62666 /tests/cdash/cfg_gnu.py
parentbeea36bf708bd92dfd5275dfe5eb53cff19c14b6 (diff)
Added Symbian test configurator
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2405 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'tests/cdash/cfg_gnu.py')
-rw-r--r--tests/cdash/cfg_gnu.py33
1 files changed, 25 insertions, 8 deletions
diff --git a/tests/cdash/cfg_gnu.py b/tests/cdash/cfg_gnu.py
index 75f22d75..4a1362b6 100644
--- a/tests/cdash/cfg_gnu.py
+++ b/tests/cdash/cfg_gnu.py
@@ -23,19 +23,36 @@ import sys
# Each configurator must export this function
def create_builder(args):
+ usage = """\
+Usage:
+ main.py cfg_gnu [-h|--help] [cfg_site]
+
+Arguments:
+ cfg_site: site configuration module. If not specified, "cfg_site"
+ is implied
+ -h, --help Show this help screen
+
+"""
# (optional) args format:
# site configuration module. If not specified, "cfg_site" is implied
- if len(args)>0:
- file = args[0]
- else:
- file = "cfg_site"
-
- if os.access(file+".py", os.F_OK) == False:
- print "Error: file '%s.py' doesn't exist." % (file)
+ cfg_site = "cfg_site"
+
+ for arg in args:
+ if arg=="-h" or arg=="--help":
+ print usage
+ sys.exit(0)
+ elif arg[0]=="-":
+ print usage
+ sys.exit(1)
+ else:
+ cfg_site = arg
+
+ if os.access(cfg_site+".py", os.F_OK) == False:
+ print "Error: file '%s.py' doesn't exist." % (cfg_site)
sys.exit(1)
- cfg_site = __import__(file)
+ cfg_site = __import__(cfg_site)
test_cfg = builder.BaseConfig(cfg_site.BASE_DIR, \
cfg_site.URL, \
cfg_site.SITE_NAME, \