Changeset 2405 for pjproject/trunk/tests/cdash/cfg_gnu.py
- Timestamp:
- Jan 1, 2009 12:11:17 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/tests/cdash/cfg_gnu.py
r2401 r2405 24 24 # Each configurator must export this function 25 25 def create_builder(args): 26 usage = """\ 27 Usage: 28 main.py cfg_gnu [-h|--help] [cfg_site] 29 30 Arguments: 31 cfg_site: site configuration module. If not specified, "cfg_site" 32 is implied 33 -h, --help Show this help screen 34 35 """ 26 36 # (optional) args format: 27 37 # site configuration module. If not specified, "cfg_site" is implied 28 38 29 if len(args)>0: 30 file = args[0] 31 else: 32 file = "cfg_site" 33 34 if os.access(file+".py", os.F_OK) == False: 35 print "Error: file '%s.py' doesn't exist." % (file) 39 cfg_site = "cfg_site" 40 41 for arg in args: 42 if arg=="-h" or arg=="--help": 43 print usage 44 sys.exit(0) 45 elif arg[0]=="-": 46 print usage 47 sys.exit(1) 48 else: 49 cfg_site = arg 50 51 if os.access(cfg_site+".py", os.F_OK) == False: 52 print "Error: file '%s.py' doesn't exist." % (cfg_site) 36 53 sys.exit(1) 37 54 38 cfg_site = __import__( file)55 cfg_site = __import__(cfg_site) 39 56 test_cfg = builder.BaseConfig(cfg_site.BASE_DIR, \ 40 57 cfg_site.URL, \
Note: See TracChangeset
for help on using the changeset viewer.