Skip to content

Commit

Permalink
make flags more intuitive
Browse files Browse the repository at this point in the history
- 'disabled' -> 'no_hw_test'
- 'simulation_binary' -> 'has_simulation' as boolean

Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Jan 25, 2024
1 parent ecc75c6 commit efca536
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion camkes-vm/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def run_build(manifest_dir: str, build: Build):
["tar", "czf", f"../{build.name}-images.tar.gz", "images/"],
]

if plat.simulation_binary and plat.name != 'PC99':
if plat.has_simulation and plat.name != 'PC99':
script.append(
["bash", "-c",
f"expect -c 'spawn ./simulate; set timeout 3000; expect \"{build.success}\"'"]
Expand Down
4 changes: 2 additions & 2 deletions seL4-platforms/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, entries: dict, default={}):
self.error = None
self.settings = {}
self.timeout = 900
self.disabled = False
self.no_hw_test = False
self.image_base_name = "sel4test-driver"
[self.name] = entries.keys()
attribs = copy.deepcopy(default)
Expand Down Expand Up @@ -213,7 +213,7 @@ def __repr__(self) -> str:
f"'success': {self.success}, 'base': {self.image_base_name}" '})'

def is_disabled(self) -> bool:
return self.disabled or self.get_platform().disabled
return self.no_hw_test or self.get_platform().no_hw_test

def get_req(self) -> List[str]:
req = self.req or self.get_platform().req
Expand Down
14 changes: 7 additions & 7 deletions seL4-platforms/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def __init__(self, name: str, entries: dict):
self.smp = []
self.aarch_hyp = []
self.image_platform = None
self.simulation_binary = None
self.has_simulation = False
self.march = None
self.req = None
self.disabled = False
self.no_hw_test = False
self.no_hw_build = False
self.__dict__.update(**entries)
if not self.validate():
Expand Down Expand Up @@ -85,10 +85,10 @@ def opt_str(name):
mode_list(self.smp) and \
mode_list(self.aarch_hyp) and \
opt_str(self.image_platform) and \
opt_str(self.simulation_binary) and \
isinstance(self.has_simulation, bool) and \
opt_str(self.march) and \
(self.req is None or isinstance(self.req, str) or isinstance(self.req, list)) and \
isinstance(self.disabled, bool) and \
isinstance(self.no_hw_test, bool) and \
isinstance(self.no_hw_build, bool)

def __repr__(self):
Expand All @@ -104,10 +104,10 @@ def __repr__(self):
f" smp: {self.smp}",
f" aarch_hyp: {self.aarch_hyp}",
f" image_platform: {self.image_platform}",
f" simulation_binary: {self.simulation_binary}",
f" has_simulation: {self.has_simulation}",
f" march: {self.march}",
f" req: {self.req}",
f" disabled: {self.disabled}",
f" no_hw_test: {self.no_hw_test}",
f" no_hw_build: {self.no_hw_build}",
" }"
]])
Expand Down Expand Up @@ -247,4 +247,4 @@ def sup(p: Platform) -> str:
pprint([sup(p) for p in platforms.values() if p.arch == arch])

print("\n# all sim:")
pprint([p.name for p in platforms.values() if p.simulation_binary])
pprint([p.name for p in platforms.values() if p.has_simulation])
56 changes: 28 additions & 28 deletions seL4-platforms/platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,47 @@ architectures: [x86, arm, riscv]
# aarch_hyp: list of modes; optional (null = empty)
# platform: name; required
# image_platform: name; optional
# simulation_binary: string; optional
# has_simulation: boolean; optional; (null = false); platform is a simulation
# march: string; optional
# req: list of string; optional; names of test boards in machine queue
# disabled: optional; (null = false); no hw test on this platform
# no_hw_build: optional; (null = false); no hw build for this platform
# no_hw_test: optional; (null = false); no hw test on this platform
# no_hw_build: optional; (null = false); no hw build for this platform (implies no_hw_test then)

platforms:
SPIKE32:
arch: riscv
modes: [32]
platform: spike
simulation_binary: riscv32
has_simulation: true
march: rv32imac
disabled: true
no_hw_test: true
no_hw_build: true

SPIKE64:
arch: riscv
modes: [64]
platform: spike
simulation_binary: riscv64
has_simulation: true
march: rv64imac
disabled: true
no_hw_test: true
no_hw_build: true

RISCVVIRT64:
arch: riscv
modes: [64]
platform: qemu-riscv-virt
simulation_binary: qemu-riscv-virt64
has_simulation: true
march: rv64imac
disabled: true
no_hw_test: true
no_hw_build: true

RISCVVIRT32:
arch: riscv
modes: [32]
platform: qemu-riscv-virt
simulation_binary: qemu-riscv-virt32
has_simulation: true
march: rv32imac
disabled: true
no_hw_test: true
no_hw_build: true

HIFIVE:
Expand All @@ -74,7 +74,7 @@ platforms:
platform: sabre
image_platform: imx6
req: [sabre, sabre4, sabre2]
simulation_binary: sabre
has_simulation: true
march: armv7a

ROCKPRO64:
Expand All @@ -83,22 +83,22 @@ platforms:
platform: rockpro64
req: [rockpro64a]
march: armv8a
disabled: true
no_hw_test: true

QUARTZ64:
arch: arm
modes: [64]
platform: quartz64
march: armv8a
disabled: true
no_hw_test: true

ARMVIRT:
arch: arm
modes: [64]
platform: qemu-arm-virt
simulation_binary: qemu-arm-virt
has_simulation: true
march: armv8a # Cortex-A53 is emulated by default
disabled: true
no_hw_test: true
no_hw_build: true

IMX8MQ_EVK:
Expand Down Expand Up @@ -127,7 +127,7 @@ platforms:
platform: imx8mm-evk
req: [imx8mm]
march: armv8a
disabled: true # temporarily disabled for CI for benchmarking
no_hw_test: true # temporarily disabled for CI for benchmarking

TQMA8XQP1GB:
arch: arm
Expand Down Expand Up @@ -174,7 +174,7 @@ platforms:
platform: exynos4
req: [odroid]
march: armv7a
disabled: true
no_hw_test: true

ODROID_XU:
arch: arm
Expand All @@ -184,7 +184,7 @@ platforms:
req: [odroid-xu]
image_platform: exynos5
march: armv7a
disabled: true
no_hw_test: true

ARNDALE:
arch: arm
Expand All @@ -209,9 +209,9 @@ platforms:
modes: [32]
platform: zynq7000
req: [zc706]
simulation_binary: zc706
has_simulation: true
march: armv7a
disabled: true
no_hw_test: true

ZYNQMP:
arch: arm
Expand All @@ -236,7 +236,7 @@ platforms:
platform: hikey
req: [hikey]
march: armv8a
disabled: true
no_hw_test: true

TK1:
arch: arm
Expand All @@ -253,7 +253,7 @@ platforms:
req: [rpi3]
image_platform: bcm2837
march: armv8a # ARMv8 platform currently used in AARCH32 mode only.
disabled: true
no_hw_test: true

RPI4:
arch: arm
Expand All @@ -262,7 +262,7 @@ platforms:
req: [pi4B]
image_platform: bcm2711
march: armv8a
disabled: true
no_hw_test: true

TX1:
arch: arm
Expand Down Expand Up @@ -297,15 +297,15 @@ platforms:
platform: wandq
image_platform: imx6
# march: ?
disabled: true
no_hw_test: true
no_hw_build: true

ALLWINNER20:
arch: arm
modes: [32]
platform: allwinner20
march: armv7a
disabled: true
no_hw_test: true
no_hw_build: true

IMX7SABRE:
Expand All @@ -315,7 +315,7 @@ platforms:
req: [imx7]
image_platform: imx7
# march: ?
disabled: true
no_hw_test: true
no_hw_build: true

PC99:
Expand All @@ -324,7 +324,7 @@ platforms:
smp: [32, 64]
platform: x86_64
req: [skylake, haswell3, haswell4, skylake2]
simulation_binary: x86
has_simulation: true
march: nehalem

# platforms where MCS is wholly unsupported
Expand Down
2 changes: 1 addition & 1 deletion sel4test-hw/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def to_json(builds: List[Build]) -> str:
"""Return a GitHub build matrix per enabled hardware platform as GitHub output assignment."""

def run_for_plat(plat: Platform) -> List[dict]:
if plat.disabled or plat.no_hw_build:
if plat.no_hw_test or plat.no_hw_build:
return []

# separate runs for each compiler on arm
Expand Down
12 changes: 6 additions & 6 deletions sel4test-sim/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ variants:
# mode: [32, 64]


# only generate builds for platforms that have `simulation_binary` set
# only generate builds for platforms that have `has_simulation` set
# only generate builds with DOM set if debug is also set
build-filter:
- simulation_binary: true
- has_simulation: true
domains: ''
arch: [arm, x86]
- simulation_binary: true
- has_simulation: true
domains: DOM
debug: [debug]
arch: [arm, x86]
- simulation_binary: true
- has_simulation: true
arch: [riscv]
# Bamboo has no "release" simulation for RISCV, and it doesn't seem to work either:
debug: [debug]
Expand All @@ -65,7 +65,7 @@ build-filter:
# - arch: [x86, riscv]
# compiler: [gcc]
# mode: [32]
# simulation_binary:
# has_simulation:

# This will select all 64-bit armv7a builds with gcc or clang and all 32-bit x86
# and riscv builds on gcc with simulation_binary set.
# and riscv builds on gcc with has_simulation set.
2 changes: 1 addition & 1 deletion webserver/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run_build(manifest_dir: str, build: Build):
["tar", "czf", f"../{build.name}-images.tar.gz", "images/"],
]

if plat.simulation_binary and plat.name != 'PC99':
if plat.has_simulation and plat.name != 'PC99':
script.append(
["bash", "-c",
f"expect -c 'spawn ./simulate; set timeout 3000; expect \"{build.success}\"'"]
Expand Down

0 comments on commit efca536

Please sign in to comment.