From: Nathan Binkert Date: Sat, 5 Feb 2005 18:50:25 +0000 (-0500) Subject: Tweak genini. X-Git-Tag: m5_1.0_tutorial~94^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4089562d5add225cd8275b59456eb7eb559b988;p=gem5.git Tweak genini. test/genini.py: Make it possible to run genini from a different directory. --HG-- extra : convert_revision : 57cfb010d6114512040bf334ea21c9ed87234be0 --- diff --git a/test/genini.py b/test/genini.py index db1a7a5b0..0dac0d409 100644 --- a/test/genini.py +++ b/test/genini.py @@ -26,10 +26,12 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import getopt, os, os.path, sys +from os.path import join as joinpath, realpath -sys.path.append('..') -sys.path.append('../configs/kernel') -sys.path.append('../sim/pyconfig') +mypath = sys.path[0] +sys.path.append(joinpath(mypath, '..')) +sys.path.append(joinpath(mypath, '../configs/kernel')) +sys.path.append(joinpath(mypath, '../sim/pyconfig')) from importer import mpy_exec, mpy_execfile, AddToPath from m5config import *