summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-05-22 20:04:31 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-05-22 20:04:31 (GMT)
commitdbd5e50583752baccb59d981c2e434d3e518f762 (patch)
treef10d3ddd27ab90e6799e209fe297644106c13aa0 /contrib
parent1779c82ad2916f9a3c3ad2dd350dbeb2d6692f9d (diff)
test-suite: apply cleanup pass
Remove all non-modifiable items (target tuple, gcc version, toolchain path...) Makefile syntax ( use $(...) instead of ${...} ) Update doc Space-damage cleanups
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gcc-test-suite/Makefile68
-rw-r--r--contrib/gcc-test-suite/README38
-rw-r--r--contrib/gcc-test-suite/default.cfg7
3 files changed, 61 insertions, 52 deletions
diff --git a/contrib/gcc-test-suite/Makefile b/contrib/gcc-test-suite/Makefile
index 96b954d..d78c178 100644
--- a/contrib/gcc-test-suite/Makefile
+++ b/contrib/gcc-test-suite/Makefile
@@ -12,64 +12,68 @@
# option) any later version.
#
-# Internal directory configuration
-TOPDIR=${shell pwd}
-TMPDIR=${TOPDIR}/tmp
+# Internal configuration
+TARGET:=@@DG_TARGET@@
+TOPDIR:=$(shell pwd)
+LOGDIR:=$(TOPDIR)/tmp
# Include default configuration
include default.cfg
# Add toolchain to path
-PATH:=${DG_TOOLCHAIN_DIR}:${PATH}
+PATH:=$(shell cd ../../bin && pwd):$(PATH)
# Select test set
-ifeq (${DG_TOOLNAME},gcc)
- DG_TESTS=$(DG_C_TESTS)
+ifeq ($(DG_TOOLNAME),gcc)
+ DG_TESTS:=$(DG_C_TESTS)
endif
-ifeq (${DG_TOOLNAME},g++)
- DG_TESTS=$(DG_CPP_TESTS)
+ifeq ($(DG_TOOLNAME),g++)
+ DG_TESTS:=$(DG_CPP_TESTS)
endif
# Check that we have 'runtest' installed
RUNTEST=$(shell which runtest)
-ifeq "${RUNTEST}" ""
+ifeq ($(RUNTEST),)
$(error "DejaGnu 'runtest' not found - please install (eg. apt-get install dejagnu)")
endif
# Targets
all: test
-gcc-testsuite-${DG_GCC_VERSION}.tar.gz:
-# wget -nc ${DG_GCC_URL}
-
-gcc-${DG_GCC_VERSION}: gcc-testsuite-${DG_GCC_VERSION}.tar.gz
-# tar xzf gcc-testsuite-${DG_GCC_VERSION}.tar.gz
+$(LOGDIR):
+ @mkdir -p $@
-config:
- @mkdir -p ${TMPDIR}
- @{ echo 'lappend boards_dir "."'; \
- echo "set target_alias ${DG_TARGET}"; } > ${TMPDIR}/site.exp
+$(LOGDIR)/site.exp: $(TOPDIR)/default.cfg $(LOGDIR)
+ @{ echo 'lappend boards_dir "$(LOGDIR)"'; \
+ echo "set target_alias $(TARGET)"; } > $@
+
+$(LOGDIR)/board.exp: $(TOPDIR)/default.cfg $(LOGDIR)
@{ echo -e "load_generic_config \"unix\""; \
echo -e "process_multilib_options \"\"" ; \
echo "set_board_info bmk,use_alarm 1" ; \
echo "set_board_info rsh_prog ssh" ; \
echo "set_board_info rcp_prog scp" ; \
- echo "set_board_info hostname ${DG_TARGET_HOSTNAME}"; \
- echo "set_board_info username ${DG_TARGET_USERNAME}"; } > ${TMPDIR}/board.exp
+ echo "set_board_info hostname $(DG_TARGET_HOSTNAME)"; \
+ echo "set_board_info username $(DG_TARGET_USERNAME)"; } > $@
-test: gcc-${DG_GCC_VERSION} config
- cd ${TMPDIR} && \
- runtest --tool ${DG_TOOLNAME} \
- --srcdir ${DG_SRC_DIR} \
- --all \
- --target ${DG_TARGET} \
- --target_board board \
- ${DG_TESTS} \
- GXX_UNDER_TEST=${DG_TARGET}-g++ ; \
- mv ${TMPDIR}/*.log ${TOPDIR} ; \
- mv ${TMPDIR}/*.sum ${TOPDIR}
+# As Martin puts it:
+# > The thing is that when you run 50k+ test cases the odds are that at
+# > least one will fail and thus runtest basically always return an error
+# > despite the fact that the test session has executed successfully.
+# So just ignore any error reported by runtest
+test: $(LOGDIR)/board.exp $(LOGDIR)/site.exp $(LOGDIR)
+ @runtest --tool $(DG_TOOLNAME) \
+ --srcdir $(TOPDIR)/testsuite \
+ --objdir $(LOGDIR) \
+ --outdir $(LOGDIR) \
+ --all \
+ --target $(TARGET) \
+ --target_board board \
+ $(DG_TESTS) \
+ GXX_UNDER_TEST=$(DG_TARGET)-g++ || true
+ @printf "Result files available in '%s'\n" "$(LOGDIR)"
clean:
- rm -rf gcc-testsuite-${DG_GCC_VERSION}.tar.gz gcc-${DG_GCC_VERSION} ${TMPDIR} *.log *.sum
+ rm -rf $(LOGDIR)
.PHONY: config test clean
diff --git a/contrib/gcc-test-suite/README b/contrib/gcc-test-suite/README
index 99d61cc..0c81be9 100644
--- a/contrib/gcc-test-suite/README
+++ b/contrib/gcc-test-suite/README
@@ -7,7 +7,6 @@ Requirements
* DejaGnu 'runtest' v1.4.4+
* Make v3.81+
-* wget
Configuration
@@ -19,16 +18,23 @@ Alternatively, override configuration variables on the command line.
Available config variables:
-DG_GCC_VERSION
-DG_GCC_URL
DG_TOOLNAME
-DG_TARGET
+ The name of the tool you want to test.
+ Currently supported: gcc or g++
+ Default: gcc
+
DG_TARGET_HOSTNAME
+ The hostname or IP of the machine to execute run-tests
+ Default: 127.0.0.1
+
DG_TARGET_USERNAME
+ Execute the run-test as this user on DG_TARGET_HOSTNAME
+ Default: root
+
DG_C_TESTS
DG_CPP_TESTS
-DG_TOOLCHAIN_DIR
-DG_SRC_DIR
+ The C/C++ tests you want to check
+ Default: (empty, means all tests)
Run examples
@@ -53,19 +59,25 @@ SSH automatic login configuration example
On host do:
ssh-keygen -t rsa (then simply press enter thru all steps)
-scp ~/.ssh/id_rsa.pub <username>@<target IP>:~/
-
-On target do:
-cd ~
-mkdir .ssh
-cat id_rsa.pub >> .ssh/authorized_keys
-rm id_rsa.pub
+ssh-copy-id -i ~/.ssh/id_rsa.pub <username>@<target IP>
Now automatic ssh login should work - test by doing a simple ssh session to target.
Note: The procedure might be slightly different for your particular target.
+Getting rid of the test-suite
+-----------------------------
+
+If you no longer have a need for the test-suite, then you can remove it altogether
+from your toolchain. Just delete the test-suite/ dub-dir.
+
+
Author
------
Martin Lund <mgl@doredevelopment.dk>
+ Initial content
+
+"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
+ Getting rid of the test-suite
+ Minor fixes
diff --git a/contrib/gcc-test-suite/default.cfg b/contrib/gcc-test-suite/default.cfg
index d9e2bfe..d523008 100644
--- a/contrib/gcc-test-suite/default.cfg
+++ b/contrib/gcc-test-suite/default.cfg
@@ -1,16 +1,9 @@
# Default test suite configuration
-# GCC configuration
-DG_GCC_VERSION = 4.3.2
-DG_GCC_URL = ftp://gcc.gnu.org/pub/gcc/releases/gcc-${DG_GCC_VERSION}/gcc-testsuite-${DG_GCC_VERSION}.tar.gz
-
# Default DejaGnu configuration
DG_TOOLNAME = gcc
DG_TARGET_HOSTNAME = 127.0.0.1
DG_TARGET_USERNAME = root
-DG_TARGET = powerpc-unknown-linux-gnu
-DG_SRC_DIR = ${TOPDIR}/gcc-${DG_GCC_VERSION}/gcc/testsuite
-DG_TOOLCHAIN_DIR = ${TOPDIR}/../../bin
# Default tests
DG_C_TESTS =