Skip to content

Commit

Permalink
A few useful programs for Linux -RT testing.
Browse files Browse the repository at this point in the history
From: [email protected]
Signed-off-by: Martin J. Bligh <[email protected]>
  • Loading branch information
Michal Piotrowski committed Mar 30, 2007
1 parent cef493a commit 6531dfa
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 0 deletions.
1 change: 1 addition & 0 deletions rtlinuxtests/control
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
job.run_test('rtlinuxtests')
136 changes: 136 additions & 0 deletions rtlinuxtests/path-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
diff -uprN tests/func/pi-tests/run_auto.sh src/func/pi-tests/run_auto.sh
--- tests/func/pi-tests/run_auto.sh 2007-03-09 16:44:31.000000000 +0100
+++ src/func/pi-tests/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -3,7 +3,7 @@
#
#
CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

$SCRIPTS_DIR/run_c_files.sh "testpi-0" "testpi-1" "testpi-2" "testpi-4 ""testpi-5" "testpi-6" "testpi-7" "sbrk_mutex"

diff -uprN tests/func/prio-preempt/run_auto.sh src/func/prio-preempt/run_auto.sh
--- tests/func/prio-preempt/run_auto.sh 2007-03-09 16:44:31.000000000 +0100
+++ src/func/prio-preempt/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -3,7 +3,7 @@
#
#
CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

$SCRIPTS_DIR/run_c_files.sh "prio-preempt"

diff -uprN tests/func/prio-wake/run_auto.sh src/func/prio-wake/run_auto.sh
--- tests/func/prio-wake/run_auto.sh 2007-03-09 16:44:32.000000000 +0100
+++ src/func/prio-wake/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -3,7 +3,7 @@
#
#
CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

$SCRIPTS_DIR/run_c_files.sh "prio-wake"

diff -uprN tests/func/pthread_kill_latency/run_auto.sh src/func/pthread_kill_latency/run_auto.sh
--- tests/func/pthread_kill_latency/run_auto.sh 2007-03-09 16:44:31.000000000 +0100
+++ src/func/pthread_kill_latency/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -3,7 +3,7 @@
#
#
CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

$SCRIPTS_DIR/run_c_files.sh "pthread_kill_latency"

diff -uprN tests/func/sched_football/run_auto.sh src/func/sched_football/run_auto.sh
--- tests/func/sched_football/run_auto.sh 2007-03-09 16:44:32.000000000 +0100
+++ src/func/sched_football/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -3,7 +3,7 @@
#
#
CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

$SCRIPTS_DIR/run_c_files.sh "sched_football"

diff -uprN tests/func/sched_latency/run_auto.sh src/func/sched_latency/run_auto.sh
--- tests/func/sched_latency/run_auto.sh 2007-03-09 16:44:31.000000000 +0100
+++ src/func/sched_latency/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -3,7 +3,7 @@
#
#
CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

$SCRIPTS_DIR/run_c_files.sh "sched_latency"

diff -uprN tests/perf/latency/run_auto.sh src/perf/latency/run_auto.sh
--- tests/perf/latency/run_auto.sh 2007-03-09 16:53:21.000000000 +0100
+++ src/perf/latency/run_auto.sh 2007-03-29 23:47:05.000000000 +0200
@@ -1,6 +1,6 @@

export CUR_DIR=`pwd`
-export TESTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/
+export TESTS_DIR=${CUR_DIR%src*}src/
export SCRIPTS_DIR=$TESTS_DIR/scripts/

log="$LOG_DIR/$LOG_FORMAT-pthread_cond_many.log"
diff -uprN tests/run.sh src/run.sh
--- tests/run.sh 2007-03-09 16:53:21.000000000 +0100
+++ src/run.sh 2007-03-29 23:47:05.000000000 +0200
@@ -8,7 +8,7 @@
#==============================================================================

CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts

source $SCRIPTS_DIR/setenv.sh

diff -uprN tests/scripts/run_c_files.sh src/scripts/run_c_files.sh
--- tests/scripts/run_c_files.sh 2007-03-09 16:44:30.000000000 +0100
+++ src/scripts/run_c_files.sh 2007-03-29 23:47:05.000000000 +0200
@@ -8,7 +8,7 @@
#==============================================================================

CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts
source $SCRIPTS_DIR/setenv.sh
# COMPILE THE TESTCASES

diff -uprN tests/scripts/setenv.sh src/scripts/setenv.sh
--- tests/scripts/setenv.sh 2007-03-09 16:44:30.000000000 +0100
+++ src/scripts/setenv.sh 2007-03-29 23:48:01.000000000 +0200
@@ -6,8 +6,8 @@
# most of the test-cases
#==============================================================================
export CUR_DIR=`pwd`
-export RTLINUX_DIR=${CUR_DIR%rtlinux-tests*}
-export TESTS_DIR=$RTLINUX_DIR/rtlinux-tests
+export RTLINUX_DIR=${CUR_DIR%src*}
+export TESTS_DIR=$RTLINUX_DIR/src
export SCRIPTS_DIR=$TESTS_DIR/scripts
export LOG_DIR=$TESTS_DIR/logs
export ARGUMENTS_INPUT_ERROR=25
diff -uprN tests/scripts/ssh-keygen.sh src/scripts/ssh-keygen.sh
--- tests/scripts/ssh-keygen.sh 2007-03-09 16:44:30.000000000 +0100
+++ src/scripts/ssh-keygen.sh 2007-03-29 23:48:16.000000000 +0200
@@ -14,9 +14,9 @@
#==============================================================================

CUR_DIR=`pwd`
-export SCRIPTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/scripts
+export SCRIPTS_DIR=${CUR_DIR%src*}src/scripts
source $SCRIPTS_DIR/setenv.sh
-TESTS_DIR=${CUR_DIR%rtlinux-tests*}rtlinux-tests/
+TESTS_DIR=${CUR_DIR%src*}src/

if [ -z "$1" ]; then
echo " Useage : ssh-keygen.sh server-name "
28 changes: 28 additions & 0 deletions rtlinuxtests/rtlinuxtests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import test
from autotest_utils import *

# tests is a simple array of "cmd" "arguments"
tests = [["./run.sh", "tests=func"],
["./run.sh", "tests=pi-tests"],
]
name = 0
arglist = 1

class rtlinuxtests(test.test):
version = 1
preserve_srcdir = True

# http://www.kernel.org/pub/linux/kernel/people/dvhart/realtime/tests/tests.tar.bz2

def setup(self, tarball = 'tests.tar.bz2'):
check_glibc_ver('2.5')
self.tarball = unmap_url(self.bindir, tarball, self.tmpdir)
extract_tarball_to_dir(self.tarball, self.srcdir)
os.chdir(self.srcdir)
system('patch -p1 < ../path-fix.patch')

def execute(self, args = ''):
os.chdir(self.srcdir)
for test in tests:
cmd = 'echo y | ' + test[name] + ' ' + args + ' ' + test[arglist]
system(cmd)
Binary file added rtlinuxtests/tests.tar.bz2
Binary file not shown.

0 comments on commit 6531dfa

Please sign in to comment.