Changeset 01579ad in mainline
- Timestamp:
- 2014-04-11T08:10:18Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2bff9860
- Parents:
- 9a5abb78
- Files:
-
- 52 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r9a5abb78 r01579ad 612 612 ! CONFIG_WRITE_CORE_FILES (n/y) 613 613 614 % Build userspace unit tests (PCUT) 615 ! CONFIG_PCUT_TESTS (n/y) 616 614 617 % Include development files (headers, libraries) 615 618 ! CONFIG_DEVEL_FILES (n/y) -
boot/Makefile
r9a5abb78 r01579ad 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
r9a5abb78 r01579ad 237 237 endif 238 238 239 RD_TESTS = \ 240 241 239 242 COMPONENTS = \ 240 243 $(KERNEL_PATH)/kernel.bin \ -
uspace/Makefile
r9a5abb78 r01579ad 247 247 lib/gpt 248 248 249 ifeq ($(CONFIG_PCUT_TESTS),y) 250 LIBS += lib/pcut 251 endif 252 249 253 LIBC_BUILD = $(addsuffix .build,$(LIBC)) 250 254 LIBS_BUILD = $(addsuffix .build,$(LIBS)) 251 255 LIBN_BUILD = $(addsuffix .build,$(LIBN)) 252 256 BUILDS := $(addsuffix .build,$(DIRS)) 257 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) lib/c) 253 258 254 259 CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBN)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC)) … … 256 261 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(LIBN_BUILD) $(BUILDS) $(CLEANS) clean 257 262 258 all: $(BUILDS) 263 all: $(BUILDS) $(BUILDS_TESTS) 264 265 $(BUILDS_TESTS): $(BUILDS) 266 $(MAKE) -C $(basename $@) all-test PRECHECK=$(PRECHECK) 259 267 260 268 clean: $(CLEANS) -
uspace/Makefile.common
r9a5abb78 r01579ad 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 ifneq ($(LIBRARY),) 211 TEST_OUTPUT_LIBS += $(OUTPUT) 212 endif 213 TEST_OUTPUT_LIBS += $(TEST_LIBS) 214 endif 215 endif 216 202 217 .PHONY: all clean 203 218 204 219 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT) 205 220 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV) 221 222 all-test: $(TEST_OUTPUT) 206 223 207 224 clean: … … 294 311 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 295 312 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES))) 313 TEST_OBJECTS := $(addsuffix .test.o,$(basename $(TEST_SOURCES))) 296 314 297 315 ifneq ($(BINARY),) … … 338 356 endif 339 357 358 ifeq ($(CONFIG_PCUT_TESTS),y) 359 ifneq ($(TEST_OUTPUT),) 360 $(TEST_OUTPUT): $(LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_OUTPUT_LIBS) 361 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(TEST_OUTPUT).map -o $@ $(TEST_OBJECTS) $(TEST_OUTPUT_LIBS) $(LIBS) $(BASE_LIBS) 362 ifeq ($(CONFIG_STRIP_BINARIES),y) 363 $(STRIP) $(TEST_OUTPUT) 364 endif 365 endif 366 endif 367 340 368 %.o: %.S $(DEPEND) 341 369 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@ … … 356 384 endif 357 385 386 %.test.o: %.c $(DEPEND) 387 $(CC) $(DEFS) $(CFLAGS) $(TEST_CFLAGS) -c $< -o $@ 388 ifeq ($(PRECHECK),y) 389 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 390 endif 391 358 392 %.lo: %.S $(DEPEND) 359 393 $(CC) $(DEFS) $(LIB_CFLAGS) -D__ASM__ -c $< -o $@ … … 375 409 376 410 $(DEPEND): $(PRE_DEPEND) 377 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null411 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) $(TEST_SOURCES) > $@ 2> /dev/null 378 412 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 379 413
Note:
See TracChangeset
for help on using the changeset viewer.