Skip to content

Commit a494d0c

Browse files
committed
Add local tests to build system and CI
Add a "make test" target to the Makefile and to CI. This is intended to run all tests that can be run locally, with just one for now. These tests run quickly, locally and independently of LAVA, so are bundled in with the debos recipe runs themselves in debos.yml. Signed-off-by: Robie Basak <[email protected]>
1 parent 2476450 commit a494d0c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/debos.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161
run: cp -av "/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest/rb1-boot.img" .
6262

6363
# mtools is needed for the flash recipe
64-
- name: Install debos and dependencies of the recipes
65-
run: apt -y install debos mtools
64+
- name: Install debos and dependencies of the recipes and local tests
65+
run: apt -y install debos make mtools python3-pexpect python3-pytest qemu-efi-aarch64 qemu-system-arm
6666

6767
- name: Setup local APT repo
6868
run: |
@@ -212,3 +212,5 @@ jobs:
212212
with:
213213
name: build_url
214214
path: build_url
215+
- name: Invoke test runner
216+
run: make test

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ all: disk-ufs.img.gz disk-sdcard.img.gz
1717
rootfs.tar.gz: debos-recipes/qualcomm-linux-debian-rootfs.yaml
1818
$(DEBOS) $<
1919

20-
disk-ufs.img.gz: debos-recipes/qualcomm-linux-debian-image.yaml rootfs.tar.gz
20+
disk-ufs.img disk-ufs.img.gz: debos-recipes/qualcomm-linux-debian-image.yaml rootfs.tar.gz
2121
$(DEBOS) $<
2222

2323
disk-sdcard.img.gz: debos-recipes/qualcomm-linux-debian-image.yaml rootfs.tar.gz
2424
$(DEBOS) -t imagetype:sdcard $<
2525

26-
.PHONY: all
26+
test: disk-ufs.img
27+
# rootfs/ is a build artifact, so should not be scanned for tests
28+
py.test-3 --ignore=rootfs
29+
30+
.PHONY: all test

0 commit comments

Comments
 (0)