Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset e9c1639 in mainline


Ignore:
Timestamp:
2020-12-09T15:53:25Z (6 weeks ago)
Author:
parth-27 <parth1020patel@…>
Children:
35a3dcdc
Parents:
25f26600
Message:

added option for running multiple cpus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    r25f26600 re9c1639  
    257257        cmd = 'qemu-' + suffix
    258258
     259        if cpus:
     260        cmd += ' -smp cpus=' + cpus + ' '
     261
    259262        cmdline = cmd
    260263        if 'qemu_path' in overrides.keys():
     
    419422def usage():
    420423        print("%s - emulator wrapper for running HelenOS\n" % os.path.basename(sys.argv[0]))
    421         print("%s [-d] [-h] [-net e1k|rtl8139|ne2k|virtio-net] [-hdd ata|virtio-blk] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
     424        print("%s [$] [-d] [-h] [-net e1k|rtl8139|ne2k|virtio-net] [-hdd ata|virtio-blk] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %
    422425            os.path.basename(sys.argv[0]))
     426        print("$\t to run multiple($) cpus")
    423427        print("-d\tDry run: do not run the emulation, just print the command line.")
    424428        print("-h\tPrint the usage information and exit.")
     
    442446        expect_hdd = False
    443447        expect_qemu = False
     448        global cpus
     449    cpus = ''
    444450
    445451        for i in range(1, len(sys.argv)):
     
    482488                        usage()
    483489                        exit()
     490                elif sys.argv[i].isdigit():
     491            cpus = sys.argv[i]
    484492                elif sys.argv[i] == '-d':
    485493                        overrides['dryrun'] = True
Note: See TracChangeset for help on using the changeset viewer.