#env:
# - ARCH=host HOST_ARCH=x86 USE_ACPICA=0
# - ARCH=host HOST_ARCH=x86_64 CC="$CC -m64"
-script: "make -k utest mtest"
+script:
+ - "make utest-build mtest-build"
+ - "make -k utest-run mtest-run"
.PHONY: all clean SyscallList all-user
-SUBMAKE = $(MAKE) --no-print-directory
+SUBMAKE = $(MAKE)
+# --no-print-directory
USRLIBS := crt0.o acess.ld ld-acess.so libc.so libc++.so libposix.so
USRLIBS += libreadline.so libnet.so liburi.so libpsocket.so
clean: clean-kmode clean-user
install: install-Filesystem SyscallList install-user install-kmode
-utest: $(USRLIBS:%=utest-%)
+utest-build: $(USRLIBS:%=utest-build-%)
+utest-run: $(USRLIBS:%=utest-run-%)
+utest: utest-build utest-run
-$(USRLIBS:%=utest-%): utest-%:
+utest-build-%:
@CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src generate_exp
- @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src utest -k
+ @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src utest-build
+utest-run-%:
+ @CC=$(NCC) $(SUBMAKE) -C Usermode/Libraries/$*_src utest-run -k
# TODO: Module tests using DiskTool and NetTest
-mtest: mtest-Network
+mtest: mtest-build mtest-run
@echo > /dev/null
-
-mtest-Network:
- @$(SUBMAKE) -C Tools/nativelib
- @$(SUBMAKE) -C Tools/NetTest
- @$(SUBMAKE) -C Tools/NetTest_Runner
+mtest-build:
+ # Network
+ @CC=$(NCC) $(SUBMAKE) -C Tools/nativelib
+ @CC=$(NCC) $(SUBMAKE) -C Tools/NetTest
+ @CC=$(NCC) $(SUBMAKE) -C Tools/NetTest_Runner
+mtest-run:
+ @echo "=== Network Module Test ==="
@cd Tools && ./nettest_runner
SyscallList: include/syscalls.h
.PHONY: _libs
+.PRECIOUS: .no
-HEADERS := $(patsubst include_exp/%,../../include/%,$(shell find include_exp/ -name \*.h))
+HEADERS := $(patsubst include_exp/%,../../include/%,$(shell find include_exp/ -name \*.h 2>/dev/null))
_libs: $(HEADERS)
../../include/%: include_exp/%
@echo > /dev/null
utest-build: $(UTESTS:%=TEST_%)
+ @echo > /dev/null
utest-run: $(UTESTS:%=runtest-%)
@echo > /dev/null
BIN = $(OUTPUTDIR)Libs/acess.ld
-.PHONY: all clean install utest generate_exp
+.PHONY: all clean install utest utest-build utest-run generate_exp
all: $(BIN)
install: $(BIN)
# How does one unit test a linker script?
-utest generate_exp:
+utest generate_exp utest-build utest-run:
@echo > /dev/null
$(BIN): acess_$(ARCHDIR).ld.h
BIN = $(OUTPUTDIR)Libs/crt0.o $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o
-.PHONY: all clean install utest generate_exp
+.PHONY: all clean install utest utest-build generate_exp
all: $(BIN)
$(RM) $(BIN)
# Disabled unit tests
-utest generate_exp:
+utest generate_exp utest-build utest-run:
@echo > /dev/null
$(OUTPUTDIR)Libs/%.o: %.c