aboutsummaryrefslogtreecommitdiff
path: root/automated/linux/rt-migrate-test
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2019-07-19 16:34:58 +0200
committerDaniel Wagner <wagi@monom.org>2019-07-22 12:15:08 +0200
commit927c2d25bdd57f1f266f2f9cde3a99ee6ee45318 (patch)
tree32307d6cc0aaafc6b5e6466382384f161aabc302 /automated/linux/rt-migrate-test
parent0d95232bd27be682b74e500a12962f2fd2d07519 (diff)
rt-migrate-test: Introduce duration option
Add duration command line to rt-migrate-test. rt-tests v1.4 added to many tools the option '-D'/'--duration'. Remove the loops argument in favor of duration. Signed-off-by: Daniel Wagner <wagi@monom.org>
Diffstat (limited to 'automated/linux/rt-migrate-test')
-rwxr-xr-xautomated/linux/rt-migrate-test/rt-migrate-test.sh10
-rw-r--r--automated/linux/rt-migrate-test/rt-migrate-test.yaml5
2 files changed, 7 insertions, 8 deletions
diff --git a/automated/linux/rt-migrate-test/rt-migrate-test.sh b/automated/linux/rt-migrate-test/rt-migrate-test.sh
index c477e2df..12d15901 100755
--- a/automated/linux/rt-migrate-test/rt-migrate-test.sh
+++ b/automated/linux/rt-migrate-test/rt-migrate-test.sh
@@ -7,16 +7,16 @@
OUTPUT="$(pwd)/output"
LOGFILE="${OUTPUT}/rt-migrate-test.txt"
RESULT_FILE="${OUTPUT}/result.txt"
-LOOPS="100"
+DURATION="1m"
usage() {
- echo "Usage: $0 [-l loops]" 1>&2
+ echo "Usage: $0 [-D duration]" 1>&2
exit 1
}
-while getopts ":l:" opt; do
+while getopts ":l:D:" opt; do
case "${opt}" in
- l) LOOPS="${OPTARG}" ;;
+ D) DURATION="${OPTARG}" ;;
*) usage ;;
esac
done
@@ -30,7 +30,7 @@ if ! binary=$(which rt-migrate-test); then
# shellcheck disable=SC2154
binary="./bin/${abi}/rt-migrate-test"
fi
-"${binary}" -c -l "${LOOPS}" | tee "${LOGFILE}"
+"${binary}" -D "${DURATION}" -c | tee "${LOGFILE}"
# Parse test log.
task_num=$(grep "Task" "${LOGFILE}" | tail -1 | awk '{print $2}')
diff --git a/automated/linux/rt-migrate-test/rt-migrate-test.yaml b/automated/linux/rt-migrate-test/rt-migrate-test.yaml
index 473d2b2a..df016909 100644
--- a/automated/linux/rt-migrate-test/rt-migrate-test.yaml
+++ b/automated/linux/rt-migrate-test/rt-migrate-test.yaml
@@ -25,11 +25,10 @@ metadata:
- d05
params:
- # Number of loops.
- LOOPS: "100"
+ DURATION: "5m"
run:
steps:
- cd ./automated/linux/rt-migrate-test/
- - ./rt-migrate-test.sh -l "${LOOPS}"
+ - ./rt-migrate-test.sh -D "${DURATION}"
- ../../utils/send-to-lava.sh ./output/result.txt