8000 qemu-arm: Let tinytest.o be built by standard build rules. · micropython/micropython@1e2f751 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e2f751

Browse files
committed
qemu-arm: Let tinytest.o be built by standard build rules.
This makes sure tinytest.o is rebuilt if any of its dependencies change.
1 parent 0bd7d1f commit 1e2f751

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

ports/qemu-arm/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ endif
3333

3434
CROSS_COMPILE = arm-none-eabi-
3535

36-
TINYTEST = $(TOP)/lib/tinytest
37-
3836
INC += -I.
3937
INC += -I$(TOP)
4038
INC += -I$(BUILD)
41-
INC += -I$(TINYTEST)
4239

4340
CFLAGS += $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 $(COPT) \
4441
-ffunction-sections -fdata-sections
@@ -71,6 +68,7 @@ SRC_RUN_C = \
7168

7269
SRC_TEST_C = \
7370
test_main.c \
71+
lib/tinytest/tinytest.c \
7472

7573
LIB_SRC_C += $(addprefix lib/,\
7674
libc/string0.c \
@@ -108,7 +106,6 @@ ALL_OBJ_RUN = $(OBJ_COMMON) $(OBJ_RUN)
108106

109107
OBJ_TEST =
110108
OBJ_TEST += $(addprefix $(BUILD)/, $(SRC_TEST_C:.c=.o))
111-
OBJ_TEST += $(BUILD)/tinytest.o
112109

113110
ALL_OBJ_TEST = $(OBJ_COMMON) $(OBJ_TEST)
114111

ports/qemu-arm/Makefile.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ $(BUILD)/genhdr/tests.h:
1313
(cd $(TOP)/tests; ./run-tests --target=qemu-arm --write-exp)
1414
$(Q)echo "Generating $@";(cd $(TOP)/tests; ../tools/tinytest-codegen.py) > $@
1515

16-
$(BUILD)/tinytest.o:
17-
$(Q)$(CC) $(CFLAGS) -DNO_FORKING -o $@ -c $(TINYTEST)/tinytest.c
16+
$(BUILD)/lib/tinytest/tinytest.o: CFLAGS += -DNO_FORKING
1817

1918
$(BUILD)/firmware-test.elf: $(LDSCRIPT) $(ALL_OBJ_TEST)
2019
$(Q)$(LD) $(LDFLAGS) -o $@ $(ALL_OBJ_TEST) $(LIBS)

ports/qemu-arm/test_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
#include "py/gc.h"
1313
#include "py/mperrno.h"
1414
#include "lib/utils/gchelper.h"
15-
16-
#include "tinytest.h"
17-
#include "tinytest_macros.h"
15+
#include "lib/tinytest/tinytest.h"
16+
#include "lib/tinytest/tinytest_macros.h"
1817

1918
#define HEAP_SIZE (100 * 1024)
2019

0 commit comments

Comments
 (0)
0