gem5: replace --gem5-src with --gem5-worktree-path

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-09-28 00:00:00 +00:00
parent f403f86934
commit ca55bc2d61
3 changed files with 30 additions and 30 deletions

View File

@@ -27,16 +27,17 @@ else:
start_time = time.time()
os.makedirs(binaries_dir, exist_ok=True)
os.makedirs(disks_dir, exist_ok=True)
if not os.path.exists(os.path.join(common.gem5_src_dir, '.git')):
if common.gem5_src_dir == common.gem5_default_src_dir:
raise Exception('gem5 submodule not checked out')
assert common.run_cmd([
'git',
'-C', common.gem5_default_src_dir,
'worktree', 'add',
'-b', os.path.join('wt', args.gem5_build_id),
common.gem5_src_dir
]) == 0
if args.gem5_src is None:
if not os.path.exists(os.path.join(common.gem5_src_dir, '.git')):
if common.gem5_src_dir == common.gem5_default_src_dir:
raise Exception('gem5 submodule not checked out')
assert common.run_cmd([
'git',
'-C', common.gem5_default_src_dir,
'worktree', 'add',
'-b', os.path.join('wt', args.gem5_build_id),
common.gem5_src_dir
]) == 0
if args.arch == 'x86_64':
dummy_img_path = os.path.join(disks_dir, 'linux-bigswap2.img')
with open(dummy_img_path, 'wb') as dummy_img_file: