-#language: c
-#compiler: clang
+language: c
+compiler: clang
#before_install:
# - sudo apt-get update -qq
# - sudo apt-get install -qq nasm
#env:
# - ARCH=host HOST_ARCH=x86 USE_ACPICA=0
# - ARCH=host HOST_ARCH=x86_64 CC="$CC -m64"
-#script: "make all"
+script: "make utest mtest"
.PHONY: all clean install \
kmode all-kmode clean-kmode \
all-user clean-user \
+ utest mtest \
$(ALL_MODULES) all-Kernel $(ALL_USRLIBS) $(ALL_USRAPPS) \
$(AI_MODULES) allinstall-Kernel $(AI_USRLIBS) $(AI_USRAPPS) \
$(CLEAN_MODULES) clean-Kernel $(CLEAN_USRLIBS) $(CLEAN_USRAPPS) \
clean: $(CLEAN_DYNMODS) $(CLEAN_MODULES) clean-Kernel $(CLEAN_USRLIBS) $(CLEAN_USRAPPS)
install: install-Filesystem SyscallList $(INSTALL_USRLIBS) $(INSTALL_USRAPPS) $(INSTALL_DYNMODS) $(INSTALL_MODULES) install-Kernel
+utest: $(USRLIBS:%=utest-%)
+
+$(USRLIBS:%=utest-%): utest-%:
+ @$(SUBMAKE) -C Usermode/Libraries/$*_src generate_exp
+ @$(SUBMAKE) -C Usermode/Libraries/$*_src utest -k
+
+mtest:
+ ;
+
SyscallList: include/syscalls.h
include/syscalls.h: KernelLand/Kernel/Makefile KernelLand/Kernel/syscalls.lst
@make -C KernelLand/Kernel/ include/syscalls.h
utest: utest-build utest-run
+generate_exp: $(UTESTS:%=EXP_%.txt)
+
utest-build: $(UTESTS:%=TEST_%)
utest-run: $(UTESTS:%=runtest-%)
BIN = $(OUTPUTDIR)Libs/acess.ld
-.PHONY: all clean install
+.PHONY: all clean install utest generate_exp
all: $(BIN)
install: $(BIN)
+utest generate_exp:
+
$(BIN): acess_$(ARCHDIR).ld.h
@mkdir -p $(dir $(BIN))
cpp -nostdinc -U i386 -P -C $< -o $@ -D__LIBDIR=$(OUTPUTDIR)Libs
BIN = $(OUTPUTDIR)Libs/crt0.o $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o
-.PHONY: all clean install
+.PHONY: all clean install utest generate_exp
all: $(BIN)
clean:
$(RM) $(BIN)
+utest generate_exp:
+
$(OUTPUTDIR)Libs/%.o: %.c
@mkdir -p $(dir $@)
$(CC) -c $< -o $@
\r
include ../Makefile.tpl\r
\r
-.PHONY: generate_exp\r
-\r
-utest-run: generate_exp\r
-\r
-generate_exp: EXP_printf.txt\r
-\r
EXP_%.txt: TEST_%.native\r
./TEST_printf.native > EXP_printf.txt\r
rm TEST_printf.native\r