From a745d2cd69b8b2005de7e0036712040a8be7874a Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Thu, 11 Jan 2024 11:48:18 +0100 Subject: [PATCH] make flags more intuitive - 'disabled' -> 'no_hw_test' - 'simulation_binary' -> 'has_simulation' as boolean Signed-off-by: Axel Heider --- camkes-vm/build.py | 2 +- seL4-platforms/builds.py | 4 +-- seL4-platforms/platforms.py | 14 ++++----- seL4-platforms/platforms.yml | 56 ++++++++++++++++++------------------ sel4test-hw/build.py | 2 +- sel4test-sim/builds.yml | 12 ++++---- webserver/build.py | 2 +- 7 files changed, 46 insertions(+), 46 deletions(-) diff --git a/camkes-vm/build.py b/camkes-vm/build.py index 471d43a9..c68e2649 100644 --- a/camkes-vm/build.py +++ b/camkes-vm/build.py @@ -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}\"'"] diff --git a/seL4-platforms/builds.py b/seL4-platforms/builds.py index 533d0bf2..f1e563f3 100644 --- a/seL4-platforms/builds.py +++ b/seL4-platforms/builds.py @@ -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) @@ -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 diff --git a/seL4-platforms/platforms.py b/seL4-platforms/platforms.py index f89b0d63..ef45777d 100644 --- a/seL4-platforms/platforms.py +++ b/seL4-platforms/platforms.py @@ -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(): @@ -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): @@ -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}", " }" ]]) @@ -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]) diff --git a/seL4-platforms/platforms.yml b/seL4-platforms/platforms.yml index 74bee7f0..fb83669c 100644 --- a/seL4-platforms/platforms.yml +++ b/seL4-platforms/platforms.yml @@ -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: @@ -74,7 +74,7 @@ platforms: platform: sabre image_platform: imx6 req: [sabre, sabre4, sabre2] - simulation_binary: sabre + has_simulation: true march: armv7a ROCKPRO64: @@ -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: @@ -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 @@ -174,7 +174,7 @@ platforms: platform: exynos4 req: [odroid] march: armv7a - disabled: true + no_hw_test: true ODROID_XU: arch: arm @@ -184,7 +184,7 @@ platforms: req: [odroid-xu] image_platform: exynos5 march: armv7a - disabled: true + no_hw_test: true ARNDALE: arch: arm @@ -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 @@ -236,7 +236,7 @@ platforms: platform: hikey req: [hikey] march: armv8a - disabled: true + no_hw_test: true TK1: arch: arm @@ -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 @@ -262,7 +262,7 @@ platforms: req: [pi4B] image_platform: bcm2711 march: armv8a - disabled: true + no_hw_test: true TX1: arch: arm @@ -297,7 +297,7 @@ platforms: platform: wandq image_platform: imx6 # march: ? - disabled: true + no_hw_test: true no_hw_build: true ALLWINNER20: @@ -305,7 +305,7 @@ platforms: modes: [32] platform: allwinner20 march: armv7a - disabled: true + no_hw_test: true no_hw_build: true IMX7SABRE: @@ -315,7 +315,7 @@ platforms: req: [imx7] image_platform: imx7 # march: ? - disabled: true + no_hw_test: true no_hw_build: true PC99: @@ -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 diff --git a/sel4test-hw/build.py b/sel4test-hw/build.py index 6d48466a..4682b4ac 100644 --- a/sel4test-hw/build.py +++ b/sel4test-hw/build.py @@ -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 diff --git a/sel4test-sim/builds.yml b/sel4test-sim/builds.yml index a350f7ed..4a297796 100644 --- a/sel4test-sim/builds.yml +++ b/sel4test-sim/builds.yml @@ -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] @@ -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. diff --git a/webserver/build.py b/webserver/build.py index 3abfab49..19e83487 100644 --- a/webserver/build.py +++ b/webserver/build.py @@ -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}\"'"]