From b782769986db676b49d10b22e20f2b8184448fc0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 11 Mar 2014 13:56:39 +0100 Subject: add adk-test-tools package - scripts to shutdown qemu from linux - only start klogd when printk is available --- package/adk-test-tools/Makefile | 28 ++++++++++++++++++++++++++++ package/adk-test-tools/files/test.init | 11 +++++++++++ package/adk-test-tools/src/qmp | 4 ++++ package/adk-test-tools/src/quit | 2 ++ 4 files changed, 45 insertions(+) create mode 100644 package/adk-test-tools/Makefile create mode 100755 package/adk-test-tools/files/test.init create mode 100755 package/adk-test-tools/src/qmp create mode 100755 package/adk-test-tools/src/quit (limited to 'package/adk-test-tools') diff --git a/package/adk-test-tools/Makefile b/package/adk-test-tools/Makefile new file mode 100644 index 000000000..bc2624fe9 --- /dev/null +++ b/package/adk-test-tools/Makefile @@ -0,0 +1,28 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= adk-test-tools +PKG_VERSION:= 0.1 +PKG_RELEASE:= 1 +PKG_DESCR:= helper tools and scripts for adk-test-framework +PKG_SECTION:= misc +PKG_URL:= http://openadk.org/ + +NO_DISTFILES:= 1 + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,ADK_TEST_TOOLS,adk-test-tools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + +adk-test-tools-install: + $(INSTALL_DIR) $(IDIR_ADK_TEST_TOOLS)/usr/bin + $(INSTALL_BIN) $(WRKBUILD)/{qmp,quit} \ + $(IDIR_ADK_TEST_TOOLS)/usr/bin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/adk-test-tools/files/test.init b/package/adk-test-tools/files/test.init new file mode 100755 index 000000000..81095fa39 --- /dev/null +++ b/package/adk-test-tools/files/test.init @@ -0,0 +1,11 @@ +#!/bin/sh +#PKG adk-test-tools +#INIT 90 +[[ $1 = autostart ]] || exit 0 +echo "Starting test script ..." +if [ -x /run.sh ];then + exec /run.sh +else + echo "no run.sh found" +fi +quit diff --git a/package/adk-test-tools/src/qmp b/package/adk-test-tools/src/qmp new file mode 100755 index 000000000..8f9912222 --- /dev/null +++ b/package/adk-test-tools/src/qmp @@ -0,0 +1,4 @@ +#!/bin/sh +echo '{ "execute": "qmp_capabilities" }' +sleep 1 +echo '{ "execute": "quit" }' diff --git a/package/adk-test-tools/src/quit b/package/adk-test-tools/src/quit new file mode 100755 index 000000000..a625553e2 --- /dev/null +++ b/package/adk-test-tools/src/quit @@ -0,0 +1,2 @@ +#!/bin/sh +socat exec:/usr/bin/qmp tcp:10.0.2.2:4444 -- cgit v1.2.3