Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
b007e47b
Commit
b007e47b
authored
Nov 05, 2020
by
Antoine Kaufmann
Browse files
experiments: more compact names for simulator paths and in verbose output
parent
7932260e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
experiments/modes/experiments.py
experiments/modes/experiments.py
+5
-5
experiments/modes/simulators.py
experiments/modes/simulators.py
+4
-3
No files found.
experiments/modes/experiments.py
View file @
b007e47b
...
@@ -163,22 +163,22 @@ class ExpEnv(object):
...
@@ -163,22 +163,22 @@ class ExpEnv(object):
self
.
qemu_kernel_path
=
self
.
repodir
+
'/images/bzImage'
self
.
qemu_kernel_path
=
self
.
repodir
+
'/images/bzImage'
def
hdcopy_path
(
self
,
sim
):
def
hdcopy_path
(
self
,
sim
):
return
'%s/hdcopy.%s
.%d
'
%
(
self
.
workdir
,
sim
.
name
,
id
(
sim
)
)
return
'%s/hdcopy.%s'
%
(
self
.
workdir
,
sim
.
name
)
def
hd_path
(
self
,
hd_name
):
def
hd_path
(
self
,
hd_name
):
return
'%s/images/output-%s/%s'
%
(
self
.
repodir
,
hd_name
,
hd_name
)
return
'%s/images/output-%s/%s'
%
(
self
.
repodir
,
hd_name
,
hd_name
)
def
cfgtar_path
(
self
,
sim
):
def
cfgtar_path
(
self
,
sim
):
return
'%s/cfg.%s.
%d.
tar'
%
(
self
.
workdir
,
sim
.
name
,
id
(
sim
)
)
return
'%s/cfg.%s.tar'
%
(
self
.
workdir
,
sim
.
name
)
def
nic_pci_path
(
self
,
sim
):
def
nic_pci_path
(
self
,
sim
):
return
'%s/nic.pci.%s
.%d
'
%
(
self
.
workdir
,
sim
.
name
,
id
(
sim
)
)
return
'%s/nic.pci.%s'
%
(
self
.
workdir
,
sim
.
name
)
def
nic_eth_path
(
self
,
sim
):
def
nic_eth_path
(
self
,
sim
):
return
'%s/nic.eth.%s
.%d
'
%
(
self
.
workdir
,
sim
.
name
,
id
(
sim
)
)
return
'%s/nic.eth.%s'
%
(
self
.
workdir
,
sim
.
name
)
def
nic_shm_path
(
self
,
sim
):
def
nic_shm_path
(
self
,
sim
):
return
'%s/nic.shm.%s
.%d
'
%
(
self
.
workdir
,
sim
.
name
,
id
(
sim
)
)
return
'%s/nic.shm.%s'
%
(
self
.
workdir
,
sim
.
name
)
class
ExpOutput
(
object
):
class
ExpOutput
(
object
):
def
__init__
(
self
,
exp
):
def
__init__
(
self
,
exp
):
...
...
experiments/modes/simulators.py
View file @
b007e47b
...
@@ -23,9 +23,10 @@ class HostSim(Simulator):
...
@@ -23,9 +23,10 @@ class HostSim(Simulator):
self
.
nics
=
[]
self
.
nics
=
[]
def
full_name
(
self
):
def
full_name
(
self
):
return
'host.
%s.%d'
%
(
self
.
name
,
id
(
self
))
return
'host.
'
+
self
.
name
def
add_nic
(
self
,
nic
):
def
add_nic
(
self
,
nic
):
nic
.
name
=
self
.
name
+
'.'
+
nic
.
name
self
.
nics
.
append
(
nic
)
self
.
nics
.
append
(
nic
)
class
NICSim
(
Simulator
):
class
NICSim
(
Simulator
):
...
@@ -42,7 +43,7 @@ class NICSim(Simulator):
...
@@ -42,7 +43,7 @@ class NICSim(Simulator):
env
.
nic_shm_path
(
self
))
env
.
nic_shm_path
(
self
))
def
full_name
(
self
):
def
full_name
(
self
):
return
'nic.
%s.%d'
%
(
self
.
name
,
id
(
self
))
return
'nic.
'
+
self
.
name
class
NetSim
(
Simulator
):
class
NetSim
(
Simulator
):
name
=
''
name
=
''
...
@@ -51,7 +52,7 @@ class NetSim(Simulator):
...
@@ -51,7 +52,7 @@ class NetSim(Simulator):
self
.
nics
=
[]
self
.
nics
=
[]
def
full_name
(
self
):
def
full_name
(
self
):
return
'net.
%s.%d'
%
(
self
.
name
,
id
(
self
))
return
'net.
'
+
self
.
name
class
QemuHost
(
HostSim
):
class
QemuHost
(
HostSim
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment