57,63d56
< # Set the working directory in case we are executing from
< # outside gem5's source tree
< import os
< os.chdir(os.path.join(os.path.dirname(__file__), "../"))
<
< # The path to this script is the only parameter. Delete it so
< # we can execute the script that we want to execute.
65c58,61
< del sys.argv[1:]
---
> argv = [
> sys.argv[0],
> '-m %d' % maxtick,
> ]
67,69d62
< # Add a specific max tick
< sys.argv.append('-m %d' % maxtick)
<
71c64
< execfile(srcpath('configs/example/memcheck.py'), globals())
---
> run_config('configs/example/memcheck.py', argv=argv)