Changes in / [105d8d6:15d0046] in mainline
- Files:
-
- 60 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r105d8d6 r15d0046 600 600 ! CONFIG_WRITE_CORE_FILES (n/y) 601 601 602 % Build userspace unit tests (PCUT) 603 ! CONFIG_PCUT_TESTS (n/y) 604 602 605 % Include development files (headers, libraries) 603 606 ! CONFIG_DEVEL_FILES (n/y) -
boot/Makefile
r105d8d6 r15d0046 68 68 cp "$$file" "$(DIST_PATH)/app/" ; \ 69 69 done 70 ifeq ($(CONFIG_PCUT_TESTS),y) 71 echo "echo Running all tests..." >"$(DIST_PATH)/test/run_all" 72 echo "<html><head><title>HelenOS test results</title></head><body>" >"$(DIST_PATH)/test/test.html" 73 echo "<h1>HelenOS test results</h1><ul>" >>"$(DIST_PATH)/test/test.html" 74 for file in $(RD_TESTS) ; do \ 75 file2=`basename $$file`; \ 76 cp "$$file" "$(DIST_PATH)/test/" ; \ 77 echo "echo ' ->' $$file2" >>"$(DIST_PATH)/test/run_all"; \ 78 echo "/test/$$file2 | to /test/$$file2.out" >>"$(DIST_PATH)/test/run_all"; \ 79 echo "cat /test/$$file2.out" >>"$(DIST_PATH)/test/run_all"; \ 80 echo "cp -f /test/$$file2.out /data/web/result-$$file2.txt" >>"$(DIST_PATH)/test/run_all"; \ 81 echo "<li><a href=\"result-$$file2.txt\">$$file2</a></li>" >>"$(DIST_PATH)/test/test.html"; \ 82 done 83 echo "cp -f /test/test.html /data/web/test.html" >>"$(DIST_PATH)/test/run_all" 84 echo "</ul></body></html>" >>"$(DIST_PATH)/test/test.html" 85 endif 86 70 87 for drv in $(RD_DRVS) ; do \ 71 88 drv_dir="`dirname "$$drv"`" ; \ … … 100 117 rm -rf $(USPACE_PATH)/dist/inc/* 101 118 rm -f $(USPACE_PATH)/dist/app/* 119 rm -f $(USPACE_PATH)/dist/test/* 102 120 rm -f $(USPACE_PATH)/dist/cfg/net/* -
boot/Makefile.common
r105d8d6 r15d0046 221 221 $(USPACE_PATH)/app/fontviewer/fontviewer 222 222 223 RD_TESTS = \ 224 $(USPACE_PATH)/lib/c/test-libc \ 225 $(USPACE_PATH)/lib/posix/test-libposix \ 226 $(USPACE_PATH)/app/bdsh/test-bdsh 227 228 223 229 COMPONENTS = \ 224 230 $(KERNEL_PATH)/kernel.bin \ -
uspace/Makefile
r105d8d6 r15d0046 236 236 lib/gpt 237 237 238 ifeq ($(CONFIG_PCUT_TESTS),y) 239 LIBS += lib/pcut 240 endif 241 238 242 LIBC_BUILD = $(addsuffix .build,$(LIBC)) 239 243 LIBS_BUILD = $(addsuffix .build,$(LIBS)) 240 244 LIBN_BUILD = $(addsuffix .build,$(LIBN)) 241 245 BUILDS := $(addsuffix .build,$(DIRS)) 246 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) lib/c) 242 247 243 248 CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBN)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC)) … … 245 250 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) $(BUILDS) $(CLEANS) clean 246 251 247 all: $(BUILDS) 252 all: $(BUILDS) $(BUILDS_TESTS) 253 254 $(BUILDS_TESTS): $(BUILDS) 255 $(MAKE) -C $(basename $@) all-test PRECHECK=$(PRECHECK) 248 256 249 257 clean: $(CLEANS) -
uspace/Makefile.common
r105d8d6 r15d0046 78 78 JOB = $(BINARY).job 79 79 OUTPUT = $(BINARY) 80 TEST_BINARY = test-$(BINARY) 80 81 EXTRA_OUTPUT += $(BINARY).disasm 81 82 EXTRA_CLEAN += $(BINARY).map … … 85 86 JOB = $(LIBRARY).job 86 87 OUTPUT = $(LIBRARY).a 88 TEST_BINARY = test-$(LIBRARY) 87 89 endif 88 90 … … 200 202 endif 201 203 204 # PCUT-based unit tests 205 ifeq ($(CONFIG_PCUT_TESTS),y) 206 ifneq ($(TEST_SOURCES),) 207 TEST_OUTPUT = $(TEST_BINARY) 208 TEST_CFLAGS = -I$(LIB_PREFIX)/pcut/include -D__helenos__ 209 TEST_OUTPUT_LIBS = $(LIB_PREFIX)/pcut/libpcut.a 210 EXTRA_CLEAN += $(TEST_OUTPUT) $(TEST_OUTPUT).map 211 ifneq ($(LIBRARY),) 212 TEST_OUTPUT_LIBS += $(OUTPUT) 213 endif 214 TEST_OUTPUT_LIBS += $(TEST_LIBS) 215 endif 216 endif 217 202 218 .PHONY: all clean 203 219 204 220 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT) 205 221 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV) 222 223 all-test: $(TEST_OUTPUT) 206 224 207 225 clean: … … 294 312 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 295 313 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES))) 314 TEST_OBJECTS := $(addsuffix .test.o,$(basename $(TEST_SOURCES))) 296 315 297 316 ifneq ($(BINARY),) … … 338 357 endif 339 358 359 ifeq ($(CONFIG_PCUT_TESTS),y) 360 ifneq ($(TEST_OUTPUT),) 361 $(TEST_OUTPUT): $(LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_OUTPUT_LIBS) 362 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(TEST_OUTPUT).map -o $@ $(TEST_OBJECTS) $(TEST_OUTPUT_LIBS) $(LIBS) $(BASE_LIBS) 363 ifeq ($(CONFIG_STRIP_BINARIES),y) 364 $(STRIP) $(TEST_OUTPUT) 365 endif 366 endif 367 endif 368 340 369 %.o: %.S $(DEPEND) 341 370 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@ … … 356 385 endif 357 386 387 %.test.o: %.c $(DEPEND) 388 $(CC) $(DEFS) $(CFLAGS) $(TEST_CFLAGS) -c $< -o $@ 389 ifeq ($(PRECHECK),y) 390 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 391 endif 392 358 393 %.lo: %.S $(DEPEND) 359 394 $(CC) $(DEFS) $(LIB_CFLAGS) -D__ASM__ -c $< -o $@ … … 375 410 376 411 $(DEPEND): $(PRE_DEPEND) 377 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null412 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) $(TEST_SOURCES) > $@ 2> /dev/null 378 413 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 379 414 -
uspace/app/bdsh/Makefile
r105d8d6 r15d0046 65 65 tok.c 66 66 67 TEST_SOURCES = \ 68 tok.c \ 69 test/toktest.c 70 67 71 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/c/Makefile
r105d8d6 r15d0046 165 165 $(ARCH_SOURCES) 166 166 167 TEST_SOURCES = \ 168 test/main.c \ 169 test/sprintf.c 170 167 171 include $(USPACE_PREFIX)/Makefile.common 168 172 -
uspace/lib/posix/Makefile
r105d8d6 r15d0046 79 79 source/unistd.c 80 80 81 TEST_SOURCES = \ 82 test/main.c \ 83 test/scanf.c 84 81 85 include $(USPACE_PREFIX)/Makefile.common 82 86
Note:
See TracChangeset
for help on using the changeset viewer.