se.py (3409:769707cf0664) se.py (3444:6abefa632e10)
1# Copyright (c) 2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 22 unchanged lines hidden (view full) ---

31# "m5 test.py"
32
33import m5
34from m5.objects import *
35import os, optparse, sys
36m5.AddToPath('../common')
37import Simulation
38
1# Copyright (c) 2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 22 unchanged lines hidden (view full) ---

31# "m5 test.py"
32
33import m5
34from m5.objects import *
35import os, optparse, sys
36m5.AddToPath('../common')
37import Simulation
38
39# Get paths we might need. It's expected this file is in m5/configs/example.
40config_path = os.path.dirname(os.path.abspath(__file__))
41config_root = os.path.dirname(config_path)
42m5_root = os.path.dirname(config_root)
43
39parser = optparse.OptionParser()
40
41# Benchmark options
42parser.add_option("-c", "--cmd",
44parser = optparse.OptionParser()
45
46# Benchmark options
47parser.add_option("-c", "--cmd",
43 default="../../tests/test-progs/hello/bin/alpha/linux/hello",
48 default=os.path.join(m5_root, "tests/test-progs/hello/bin/alpha/linux/hello"),
44 help="The binary to run in syscall emulation mode.")
45parser.add_option("-o", "--options", default="",
46 help="The options to pass to the binary, use \" \" around the entire\
47 string.")
48parser.add_option("-i", "--input", default="",
49 help="A file of input to give to the binary.")
50
49 help="The binary to run in syscall emulation mode.")
50parser.add_option("-o", "--options", default="",
51 help="The options to pass to the binary, use \" \" around the entire\
52 string.")
53parser.add_option("-i", "--input", default="",
54 help="A file of input to give to the binary.")
55
51execfile("Options.py")
56execfile(os.path.join(config_root, "common", "Options.py"))
52
53(options, args) = parser.parse_args()
54
55if args:
56 print "Error: script doesn't take any positional arguments"
57 sys.exit(1)
58
59process = LiveProcess()

--- 57 unchanged lines hidden ---
57
58(options, args) = parser.parse_args()
59
60if args:
61 print "Error: script doesn't take any positional arguments"
62 sys.exit(1)
63
64process = LiveProcess()

--- 57 unchanged lines hidden ---