From d797df53c90b50b326fb0f39a6928e207e1cbe1d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 1 Aug 2010 20:07:17 +0200 Subject: allow to execute gcc testsuite (remotely on target) --- .gitignore | 2 ++ Config.in | 6 ++++++ Makefile | 3 +++ mk/build.mk | 12 ++++++++++++ rules.mk | 1 + target/qemu-x86/files/etc/network/interfaces | 5 +++++ tests/adk.exp | 5 +++++ tests/adk.exp.in | 5 +++++ tests/master.exp | 4 ++++ tests/master.exp.in | 4 ++++ 10 files changed, 47 insertions(+) create mode 100644 target/qemu-x86/files/etc/network/interfaces create mode 100644 tests/adk.exp create mode 100644 tests/adk.exp.in create mode 100644 tests/master.exp create mode 100644 tests/master.exp.in diff --git a/.gitignore b/.gitignore index adbaa3500..cfed11d66 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ config/zconf.hash.c config/zconf.output config/zconf.tab.c config/zconf.tab.h +tests/master.exp +tests/adk.exp prereq.mk toolchain_build_*/ .ADK_HAVE_DOT_CONFIG diff --git a/Config.in b/Config.in index c36987e00..b96d61cfb 100644 --- a/Config.in +++ b/Config.in @@ -115,6 +115,12 @@ config ADK_FORCE_PARALLEL help Do not enable this! It's for testing purposes only. +config ADK_TARGET_IP + prompt "Set target ip address for make check" + string + default "127.0.0.1" + help + choice prompt "Hostsystem (do not change!)" config ADK_HOST_LINUX diff --git a/Makefile b/Makefile index ae9e28a7c..bfa10b106 100644 --- a/Makefile +++ b/Makefile @@ -153,6 +153,9 @@ bulkall: .prereq_done bulkallmod: .prereq_done @${GMAKE_INV} bulkallmod +check: .prereq_done + @${GMAKE_INV} check + menu: .prereq_done @${GMAKE_INV} menu diff --git a/mk/build.mk b/mk/build.mk index 9530da61d..f71808b3f 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -443,6 +443,7 @@ distclean: @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG + endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y) # build all targets and combinations @@ -504,3 +505,14 @@ dep: mksh $(TOPDIR)/package/depmaker .PHONY: menu dep + +include $(TOPDIR)/toolchain/gcc/Makefile.inc + +check: + @-rm tests/adk.exp tests/master.exp + @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" tests/adk.exp.in > \ + tests/adk.exp + @sed -e "s#@TOPDIR@#$(TOPDIR)#" tests/master.exp.in > \ + tests/master.exp + env DEJAGNU=$(TOPDIR)/tests/master.exp \ + $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-gcc diff --git a/rules.mk b/rules.mk index 92e455cbf..ea59f4d86 100644 --- a/rules.mk +++ b/rules.mk @@ -29,6 +29,7 @@ ADK_TARGET:= $(strip $(subst ",, $(ADK_TARGET))) ADK_LIBC:= $(strip $(subst ",, $(ADK_LIBC))) ADK_HOST:= $(strip $(subst ",, $(ADK_HOST))) ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR))) +ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP))) ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX))) ADK_COMPRESSION_TOOL:= $(strip $(subst ",, $(ADK_COMPRESSION_TOOL))) diff --git a/target/qemu-x86/files/etc/network/interfaces b/target/qemu-x86/files/etc/network/interfaces new file mode 100644 index 000000000..104c1a1b6 --- /dev/null +++ b/target/qemu-x86/files/etc/network/interfaces @@ -0,0 +1,5 @@ +auto lo +iface lo inet loopback + +auto eth0 +iface eth0 inet dhcp diff --git a/tests/adk.exp b/tests/adk.exp new file mode 100644 index 000000000..537173234 --- /dev/null +++ b/tests/adk.exp @@ -0,0 +1,5 @@ +load_generic_config "unix"; +set_board_info hostname 192.168.1.24 +set_board_info username root +set_board_info rsh_prog /usr/bin/ssh +set_board_info rcp_prog /usr/bin/scp diff --git a/tests/adk.exp.in b/tests/adk.exp.in new file mode 100644 index 000000000..7b35b775d --- /dev/null +++ b/tests/adk.exp.in @@ -0,0 +1,5 @@ +load_generic_config "unix"; +set_board_info hostname @ADK_TARGET_IP@ +set_board_info username root +set_board_info rsh_prog /usr/bin/ssh +set_board_info rcp_prog /usr/bin/scp diff --git a/tests/master.exp b/tests/master.exp new file mode 100644 index 000000000..0617230d2 --- /dev/null +++ b/tests/master.exp @@ -0,0 +1,4 @@ +lappend boards_dir /home/wbx/openadk/tests +lappend boards_dir /usr/share/dejagnu +set myboard adk +set target_list adk diff --git a/tests/master.exp.in b/tests/master.exp.in new file mode 100644 index 000000000..297c0ce5d --- /dev/null +++ b/tests/master.exp.in @@ -0,0 +1,4 @@ +lappend boards_dir @TOPDIR@/tests +lappend boards_dir /usr/share/dejagnu +set myboard adk +set target_list adk -- cgit v1.2.3