public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] realtime: add realtime tests to the default
Date: Thu, 31 Oct 2013 19:10:57 +0800	[thread overview]
Message-ID: <52723AC1.6090807@cn.fujitsu.com> (raw)


modify run.sh to check whether the kernel support RT PREEMPT

modify configure.ac to make the realtime tests default

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
 configure.ac                        | 10 ++++++----
 runtest/realtime                    |  1 +
 scenario_groups/default             |  1 +
 testcases/realtime/run.sh           | 20 ++++++++++++++++++++
 testcases/realtime/scripts/Makefile |  2 +-
 5 files changed, 29 insertions(+), 5 deletions(-)
 create mode 100644 runtest/realtime

diff --git a/configure.ac b/configure.ac
index 940f4f7..c4d63b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,14 +128,16 @@ else
 fi
 
 # testcases/realtime requires bash and python.
-if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
+AC_CHECK_PROG(bash_exist, bash, [yes], [no])
+AC_CHECK_PROG(python_exist, python, [yes], [no])
+if test "x$bash_exist" = xyes && test "x$python_exist" = xyes; then
     AC_ARG_WITH([realtime-testsuite],
-      [AC_HELP_STRING([--with-realtime-testsuite],
+      [AC_HELP_STRING([--without-realtime-testsuite],
         [compile and install the realtime testsuite (default=no)])],
-      [with_realtime_testsuite=yes]
+      [without_realtime_testsuite=yes],[without_realtime_testsuite=no]
     )
 fi
-if test "x$with_realtime_testsuite" = xyes; then
+if test "x$without_realtime_testsuite" = xno; then
     AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
     # Run configure on testcases/realtime as well.
     AC_CONFIG_SUBDIRS([testcases/realtime])
diff --git a/runtest/realtime b/runtest/realtime
new file mode 100644
index 0000000..ca6023c
--- /dev/null
+++ b/runtest/realtime
@@ -0,0 +1 @@
+realtime cd $LTPROOT/testcases/realtime/ && ./run.sh
diff --git a/scenario_groups/default b/scenario_groups/default
index 9eca8ad..f29e817 100644
--- a/scenario_groups/default
+++ b/scenario_groups/default
@@ -25,3 +25,4 @@ hugetlb
 commands
 hyperthreading
 kernel_misc
+realtime
diff --git a/testcases/realtime/run.sh b/testcases/realtime/run.sh
index a66e4e5..e4943b6 100755
--- a/testcases/realtime/run.sh
+++ b/testcases/realtime/run.sh
@@ -62,6 +62,17 @@ check_error()
 		exit 1
 	fi
 }
+
+check_kernel_config()
+{
+	local kernel_release=$(uname -r)
+	local config_file="/boot/config-${kernel_release}"
+
+	local is_exist=$(cat $config_file | grep "$1=y" -c)
+
+	return $is_exist
+}
+
 list_tests()
 {
 	echo
@@ -180,6 +191,15 @@ find_test()
 SCRIPTS_DIR="$(readlink -f "$(dirname "$0")")/scripts"
 source $SCRIPTS_DIR/setenv.sh
 
+# check whether the kernel support RT PREEMPT
+check_kernel_config "CONFIG_PREEMPT_RT"
+
+if [ $? -lt 1 ];then
+	echo "realtime      TCONF  Kernel don't support RT PREEMPT."
+	echo "see wiki <http://rt.wiki.kernel.org> for more information"
+	exit 0
+fi
+
 if [ $# -lt 1 ]; then
 	usage
 fi
diff --git a/testcases/realtime/scripts/Makefile b/testcases/realtime/scripts/Makefile
index 28bf88e..5dda3a7 100644
--- a/testcases/realtime/scripts/Makefile
+++ b/testcases/realtime/scripts/Makefile
@@ -22,5 +22,5 @@ top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../config.mk
-INSTALL_TARGETS		:= run_c_files.sh setenv.sh __init__.py parser.py
+INSTALL_TARGETS		:= run_all_test.sh run_c_files.sh setenv.sh __init__.py parser.py ../run.sh
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
1.8.2.1

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2013-10-31 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 11:10 Xiaoguang Wang [this message]
2013-10-31 17:49 ` [LTP] [PATCH] realtime: add realtime tests to the default chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52723AC1.6090807@cn.fujitsu.com \
    --to=wangxg.fnst@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox