@@ -99,7 +99,7 @@ embedded-build: check-mlibc
99
99
.PHONY : embedded-test
100
100
embedded-test : embedded-build
101
101
@echo " $( BLUE) Running embedded tests...$( NC) "
102
- @./run_all_embedded_tests.sh
102
+ @./test
103
103
104
104
.PHONY : embedded-clean
105
105
embedded-clean :
@@ -143,8 +143,8 @@ pc-test-$(1):
143
143
.PHONY: embedded-test-$(1 )
144
144
embedded-test-$(1 ) : check-mlibc
145
145
@echo "$(BLUE ) Testing $(1 ) (embedded)...$(NC ) "
146
- @if [ -f $(1 ) /run_embedded_test.sh ]; then \
147
- cd $(1 ) && ./run_embedded_test.sh ; \
146
+ @if [ -f $(1 ) /test ]; then \
147
+ cd $(1 ) && ./test ; \
148
148
else \
149
149
echo "$(RED ) No embedded tests for $(1 )$(NC ) "; \
150
150
fi
@@ -155,11 +155,20 @@ $(foreach dir,$(TEST_DIRS),$(eval $(call INDIVIDUAL_TEST_RULES,$(dir))))
155
155
# Check if mlibc is built
156
156
.PHONY : check-mlibc
157
157
check-mlibc :
158
- @if [ ! -f ../build/riscv32/libmlibc.a ]; then \
159
- echo " $( YELLOW) Building mlibc for RISC-V 32-bit...$( NC) " ; \
160
- $(MAKE ) -C .. ARCH=riscv32 || { \
158
+ @ARCH=$$ {EMBEDDED_ARCH:-riscv32}; \
159
+ if [ ! -f ../build/$$ ARCH/libmlibc.a ]; then \
160
+ if [ " $$ ARCH" = " arm" ]; then \
161
+ echo " $( YELLOW) Building mlibc for ARM...$( NC) " ; \
162
+ elif [ " $$ ARCH" = " aarch64" ]; then \
163
+ echo " $( YELLOW) Building mlibc for AArch64...$( NC) " ; \
164
+ elif [ " $$ ARCH" = " riscv64" ]; then \
165
+ echo " $( YELLOW) Building mlibc for RISC-V 64-bit...$( NC) " ; \
166
+ else \
167
+ echo " $( YELLOW) Building mlibc for RISC-V 32-bit...$( NC) " ; \
168
+ fi ; \
169
+ $(MAKE ) -C .. ARCH=$$ ARCH || { \
161
170
echo " $( RED) Failed to build mlibc!$( NC) " ; \
162
- echo " Please ensure you have the RISC-V toolchain installed." ; \
171
+ echo " Please ensure you have the $$ ARCH toolchain installed." ; \
163
172
echo " Set MLIBC_TOOLCHAIN environment variable if needed." ; \
164
173
exit 1; \
165
174
}; \
0 commit comments