Ignore:
Timestamp:
Jan 1, 2009 12:11:17 AM (15 years ago)
Author:
bennylp
Message:

Added Symbian test configurator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/tests/cdash/cfg_gnu.py

    r2401 r2405  
    2424# Each configurator must export this function 
    2525def create_builder(args): 
     26    usage = """\ 
     27Usage: 
     28  main.py cfg_gnu [-h|--help] [cfg_site] 
     29 
     30Arguments: 
     31  cfg_site:            site configuration module. If not specified, "cfg_site"  
     32                       is implied 
     33  -h, --help           Show this help screen 
     34 
     35""" 
    2636    # (optional) args format: 
    2737    #   site configuration module. If not specified, "cfg_site" is implied 
    2838 
    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) 
    3653        sys.exit(1) 
    3754 
    38     cfg_site = __import__(file) 
     55    cfg_site = __import__(cfg_site) 
    3956    test_cfg = builder.BaseConfig(cfg_site.BASE_DIR, \ 
    4057                                  cfg_site.URL, \ 
Note: See TracChangeset for help on using the changeset viewer.