Skip to content

Commit

Permalink
test.mk: Additions to the testing facility
Browse files Browse the repository at this point in the history
  • Loading branch information
th0ma7 committed Mar 10, 2024
1 parent d18c9f0 commit 4a1fa6d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ spk-clean:
%: spk/%/Makefile
cd $(dir $^) && env $(MAKE)

%-clean: spk/%/Makefile
cd $(dir $^) && env $(MAKE) clean

native-%: native/%/Makefile
cd $(dir $^) && env $(MAKE)

Expand Down
39 changes: 37 additions & 2 deletions mk/spksrc.test-rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,41 @@ test:

###

TEST_DEFAULT = cross/tree spk/demoservice diyspk/tmux
TEST_RUSTC = cross/bat
TEST_CMAKE = cross/intel-gmmlib
TEST_GNUCONFIGURE = cross/ncursesw
TEST_MESON = cross/libdrm

.PHONY: testall
testall: test-dependency-tree test-dependency-flat test-dependency-list
testall: test-clean
testall: test-download test-digests
testall: test-depend
testall: test-download test-digests
testall: test-extract test-patch
testall: test-compile test-install
testall: test-toolchain
testall: test-rustc test-cmake test-gnuconfigure test-meson

.PHONY: test-info
test-info:
@echo SUPPORTED_ARCHS: $(SUPPORTED_ARCHS)
@echo LATEST_ARCHS: $(LATEST_ARCHS)
@echo SUPPORTED_KERNEL_VERSIONS: $(SUPPORTED_KERNEL_VERSIONS)

# Testing against toolchain and simple build use-cases
# Process 'clean' on toolchains at the end as otherwise rebuilt
.PHONY: test-%
test-%:
make -C toolchain/syno-qoriq-6.2.4 $*
@for arch in $(SUPPORTED_ARCHS) ; do \
for do_test in $(TEST_DEFAULT) ; do \
if [ "$*" = "clean" ]; then \
make -C $${do_test} clean ; \
else \
make -C $${do_test} ARCH=$${arch%%-*} TCVERSION=$${arch##*-} $* ; \
fi ; \
done ; \
done ; \

.PHONY: test-toolchain
test-toolchain: $(addprefix test-toolchain-,$(SUPPORTED_ARCHS))
Expand All @@ -42,3 +61,19 @@ test-toolchain: $(addprefix test-toolchain-,$(SUPPORTED_ARCHS))
test-toolchain-%:
make -C toolchain/syno-$* clean
make -C toolchain/syno-$*

.PHONY: test-rustc
test-rustc:
PARALLEL_MAKE=max make -j2 -C $(TEST_RUSTC) all-supported

.PHONY: test-cmake
test-cmake:
PARALLEL_MAKE=max make -j2 -C $(TEST_CMAKE) all-supported

.PHONY: test-gnuconfigure
test-gnuconfigure:
PARALLEL_MAKE=max make -j2 -C $(TEST_GNUCONFIGURE) all-supported

.PHONY: test-meson
test-meson:
PARALLEL_MAKE=max make -j2 -C $(TEST_MESON) all-supported

0 comments on commit 4a1fa6d

Please sign in to comment.