From: Garrett C. <ris...@li...> - 2010-07-06 01:28:26
|
The branch, pu, has been updated via 8ddfef16230888ae507540c9137a6b396dacba18 (commit) via 59cfa75ca85b14396bb524d6a586b03aa45d4c09 (commit) from 7da13d4fc396f5c2e0afa4cd37ab2a9236607c12 (commit) - Log ----------------------------------------------------------------- commit 8ddfef16230888ae507540c9137a6b396dacba18 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 5 18:24:57 2010 -0700 Push -j1 down in targets, remove obsolete comment. Signed-off-by: Garrett Cooper <yan...@gm...> commit 59cfa75ca85b14396bb524d6a586b03aa45d4c09 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 5 18:24:10 2010 -0700 Update run.sh when Makefile changes, and fix path. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/open_posix_testsuite/Makefile | 46 +++++---- .../scripts/generate-makefiles.sh | 4 +- testcases/open_posix_testsuite/scripts/run-test.sh | 105 -------------------- 3 files changed, 26 insertions(+), 129 deletions(-) delete mode 100755 testcases/open_posix_testsuite/scripts/run-test.sh diff --git a/testcases/open_posix_testsuite/Makefile b/testcases/open_posix_testsuite/Makefile index 1c08bae..edf3fcc 100644 --- a/testcases/open_posix_testsuite/Makefile +++ b/testcases/open_posix_testsuite/Makefile @@ -21,8 +21,6 @@ LOGFILE?= logfile # Subdirectories to traverse down. SUBDIRS= conformance functional stress -# Force to -j1 so the output in the logfile won't be wonky. -MAKE+= -j1 MAKE_ENV= "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" MAKE_ENV+= "LDLIBS=$(LDLIBS)" MAKE_ENV+= LOGFILE=`if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@ @@ -31,7 +29,7 @@ BUILD_MAKE= env $(MAKE_ENV) $(MAKE) top_srcdir?= . -all: conformance-all functional-all stress-all tools +all: conformance-all functional-all stress-all tools-all clean: $(CRITICAL_MAKEFILES) @rm -f $(LOGFILE)* @@ -39,62 +37,66 @@ clean: $(CRITICAL_MAKEFILES) $(MAKE) -C $$dir clean >/dev/null; \ done -# Clean out all of the generated Makefiles; this is done this way to ensure -# there won't be an argument overflow, and to remain POSIXly correct (POSIX -# find(1) doesn't support -mindepth like BSD and GNU find do...). +# Clean out all of the generated Makefiles. distclean-makefiles: - for dir in $(SUBDIRS); do \ + @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir $@; \ done generate-makefiles: distclean-makefiles - @export top_srcdir=$(top_srcdir); \ - $(top_srcdir)/scripts/generate-makefiles.sh + @env top_srcdir=$(top_srcdir) \ + $(top_srcdir)/scripts/generate-makefiles.sh install: conformance-install functional-install stress-install - install -m 0755 scripts/run-test.sh \ + @install -m 0755 scripts/run-test.sh \ $(DESTDIR)/`$(SHELL) $(top_srcdir)/scripts/print-prefix.sh`/. -tools: - $(MAKE) -C tools all +test: conformance-test functional-test stress-test + @ln tools/t0 bin/t0 # Test build and execution targets. conformance-all: $(CRITICAL_CONFORMANCE_MAKEFILE) @rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@ - @$(BUILD_MAKE) -C conformance all + @$(BUILD_MAKE) -C conformance -j1 all conformance-install: - $(MAKE) -C conformance install + @$(MAKE) -C conformance install conformance-test: - $(MAKE) -C conformance test + @$(MAKE) -C conformance test functional-all: $(CRITICAL_FUNCTIONAL_MAKEFILE) @rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@ - @$(BUILD_MAKE) -C functional all + @$(BUILD_MAKE) -C functional -j1 all functional-install: - $(MAKE) -C functional install + @$(MAKE) -C functional install functional-test: - $(MAKE) -C functional test + @$(MAKE) -C functional test stress-all: $(CRITICAL_STRESS_MAKEFILE) @rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@ - @$(BUILD_MAKE) -C stress all + @$(BUILD_MAKE) -C stress -j1 all stress-install: - $(MAKE) -C stress install + @$(MAKE) -C stress install stress-test: - $(MAKE) -C stress test + @$(MAKE) -C stress test + +tools-all: + @$(MAKE) -C tools all + +tools-install: + @$(MAKE) -C tools install $(CRITICAL_MAKEFILES): \ $(top_srcdir)/scripts/generate-makefiles.sh \ $(top_srcdir)/CFLAGS \ $(top_srcdir)/LDFLAGS \ $(top_srcdir)/LDLIBS - $(MAKE) generate-makefiles + @$(MAKE) generate-makefiles #tests-pretty: # $(MAKE) all | column -t -s: diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh index 925bfe4..46c4838 100755 --- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh +++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh @@ -131,9 +131,9 @@ test: all run.sh \$(INSTALL_DIR): mkdir -p \$@ -run.sh: +run.sh: \$(srcdir)/Makefile @echo '#/bin/sh' > \$@ - @echo '\$(top_srcdir)/run-test.sh \$(INSTALL_TARGETS)' >> \$@ + @echo '\$(top_srcdir)/bin/run-test.sh \$(INSTALL_TARGETS)' >> \$@ EOF diff --git a/testcases/open_posix_testsuite/scripts/run-test.sh b/testcases/open_posix_testsuite/scripts/run-test.sh deleted file mode 100755 index 6c8720e..0000000 --- a/testcases/open_posix_testsuite/scripts/run-test.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# -# A simple wrapper for pre- and post-execution activities for any given -# openposix test. -# -# run_test contains logic moved out of Makefile. -# -# Garrett Cooper, June 2010 -# - -LOGFILE=${LOGFILE:=logfile} - -NUM_FAIL=0 -NUM_PASS=0 -NUM_TESTS=0 - -run_test_loop() { - - for test in $*; do - - if run_test $test; then - : $(( NUM_PASS += 1 )) - else - : $(( NUM_FAIL += 1 )) - fi - : $(( NUM_TESTS += 1 )) - - done - - cat <<EOF -***************** -SUMMARY -***************** -PASS $NUM_PASS -FAIL $NUM_FAIL -***************** -TOTAL $NUM_TESTS -***************** -EOF - -} - -run_test() { - - testname=`echo "$1" | sed -e 's,.run-test$,,'` - - complog=$testname.log.$$ - - $SHELL -c "'$(dirname "$0")/t0' ./$1" > $complog 2>&1 - - ret_code=$? - - if [ "$ret_code" = "0" ]; then - echo "$testname: execution: PASS" >> $(LOGFILE) - else - case "$ret_code" in - 1) - msg="FAILED" - ;; - 2) - msg="UNRESOLVED" - ;; - 4) - msg="UNSUPPORTED" - ;; - 5) - msg="UNTESTED" - ;; - $TIMEOUT_RET) - msg="HUNG" - ;; - *) - msg="SIGNALED" - esac - (echo "$testname: execution: $msg: Output: "; cat $complog) >> \ - ${LOGFILE} - echo "$testname: execution: $msg " - fi - - rm -f $complog - - return $ret_code - -} - -# SETUP -if echo > "$LOGFILE"; then - : -else - echo >&2 "ERROR: $LOGFILE not writable" - exit 1 -fi -if TIMEOUT_RET=$(cat "$(dirname "$0")/t0.val"); then - TIMEOUT_VAL=${TIMEOUT_VAL:=240} - if [ -f test_defs ] ; then - . ./test_defs || exit $? - fi - trap '' INT - - # RUN - run_test_loop $@ - exit $NUM_FAIL -else - exit $? -fi hooks/post-receive -- ltp |