Browse Source

allow to execute gcc testsuite (remotely on target)

Waldemar Brodkorb 13 years ago
parent
commit
d797df53c9
10 changed files with 47 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 6 0
      Config.in
  3. 3 0
      Makefile
  4. 12 0
      mk/build.mk
  5. 1 0
      rules.mk
  6. 5 0
      target/qemu-x86/files/etc/network/interfaces
  7. 5 0
      tests/adk.exp
  8. 5 0
      tests/adk.exp.in
  9. 4 0
      tests/master.exp
  10. 4 0
      tests/master.exp.in

+ 2 - 0
.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

+ 6 - 0
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

+ 3 - 0
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
 

+ 12 - 0
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

+ 1 - 0
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)))
 

+ 5 - 0
target/qemu-x86/files/etc/network/interfaces

@@ -0,0 +1,5 @@
+auto lo
+iface lo inet loopback
+
+auto eth0
+iface eth0 inet dhcp

+ 5 - 0
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

+ 5 - 0
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

+ 4 - 0
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

+ 4 - 0
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