Skip to content
Snippets Groups Projects
Commit a303dbe1 authored by Marc Hartmayer's avatar Marc Hartmayer Committed by Thomas Huth
Browse files

run_tests/mkstandalone: add arch_cmd hook


This allows us, for example, to auto generate a new test case based on
an existing test case.

Reviewed-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarMarc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20200923134758.19354-4-mhartmay@linux.ibm.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent a8eb24ea
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ function for_each_unittest() ...@@ -19,7 +19,7 @@ function for_each_unittest()
while read -r -u $fd line; do while read -r -u $fd line; do
if [[ "$line" =~ ^\[(.*)\]$ ]]; then if [[ "$line" =~ ^\[(.*)\]$ ]]; then
if [ -n "${testname}" ]; then if [ -n "${testname}" ]; then
"$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" $(arch_cmd) "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout"
fi fi
testname=${BASH_REMATCH[1]} testname=${BASH_REMATCH[1]}
smp=1 smp=1
...@@ -49,11 +49,16 @@ function for_each_unittest() ...@@ -49,11 +49,16 @@ function for_each_unittest()
fi fi
done done
if [ -n "${testname}" ]; then if [ -n "${testname}" ]; then
"$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" $(arch_cmd) "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout"
fi fi
exec {fd}<&- exec {fd}<&-
} }
function arch_cmd()
{
[ "${ARCH_CMD}" ] && echo "${ARCH_CMD}"
}
# The current file has to be the only file sourcing the arch helper # The current file has to be the only file sourcing the arch helper
# file # file
ARCH_FUNC=scripts/${ARCH}/func.bash ARCH_FUNC=scripts/${ARCH}/func.bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment