Revision c0793cb5 util/vm/build.py

View differences:

util/vm/build.py
566 566
        log( '* Restoring logging to stdout' )
567 567
        vm.logfile = stdout
568 568

  
569
# A convenient alias for use - 'run'; we might want to allow
570
# 'run' to take a parameter
571
runTest = useTest
569 572

  
570 573
def checkOutBranch( vm, branch, prompt=Prompt ):
571 574
    # This is a bit subtle; it will check out an existing branch (e.g. master)
......
917 920

  
918 921
def buildFlavorString():
919 922
    "Return string listing valid build flavors"
920
    return 'valid build flavors: ( %s )' % ' '.join( sorted( isoURLs ) )
923
    return 'valid build flavors: %s' % ' '.join( sorted( isoURLs ) )
921 924

  
922 925

  
923 926
def testDict():
......
933 936

  
934 937
def testString():
935 938
    "Return string listing valid tests"
936
    return 'valid tests: ( %s )' % ' '.join( testDict().keys() )
939
    tests = [ '%s <%s>' % ( name, func.__doc__ )
940
              for name, func in testDict().iteritems() ]
941
    return 'valid tests: %s' % ', '.join( tests )
937 942

  
938 943

  
939 944
def parseArgs():
940 945
    "Parse command line arguments and run"
941 946
    global LogToConsole, NoKVM, Branch, Zip, TIMEOUT, Forward, Chown
942 947
    parser = argparse.ArgumentParser( description='Mininet VM build script',
943
                                      epilog=buildFlavorString() + ' ' +
944
                                      testString() )
948
                                      epilog='' )
945 949
    parser.add_argument( '-v', '--verbose', action='store_true',
946 950
                        help='send VM output to console rather than log file' )
947 951
    parser.add_argument( '-d', '--depend', action='store_true',
......
961 965
                         help='Boot and test an existing VM image' )
962 966
    parser.add_argument( '-t', '--test', metavar='test', default=[],
963 967
                         action='append',
964
                         help='specify a test to run' )
968
                         help='specify a test to run; ' + testString() )
965 969
    parser.add_argument( '-w', '--timeout', metavar='timeout', type=int,
966 970
                            default=0, help='set expect timeout' )
967 971
    parser.add_argument( '-r', '--run', metavar='cmd', default='',
......
971 975
    parser.add_argument( '-b', '--branch', metavar='branch',
972 976
                         help='branch to install and/or check out and test' )
973 977
    parser.add_argument( 'flavor', nargs='*',
974
                         help='VM flavor(s) to build (e.g. raring32server)' )
978
                         help='VM flavor(s) to build; ' + buildFlavorString() )
975 979
    parser.add_argument( '-z', '--zip', action='store_true',
976 980
                         help='archive .ovf and .vmdk into .zip file' )
977 981
    parser.add_argument( '-o', '--out',

Also available in: Unified diff