aboutsummaryrefslogtreecommitdiff
path: root/tests-mx32/gen_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests-mx32/gen_tests.sh')
-rwxr-xr-xtests-mx32/gen_tests.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests-mx32/gen_tests.sh b/tests-mx32/gen_tests.sh
index b0624365..b41983ee 100755
--- a/tests-mx32/gen_tests.sh
+++ b/tests-mx32/gen_tests.sh
@@ -1,6 +1,7 @@
#!/bin/sh -efu
#
# Copyright (c) 2017 Dmitry V. Levin <ldv@altlinux.org>
+# Copyright (c) 2017-2018 The strace developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -54,7 +55,7 @@ fi
names=
-while read -r name args; do {
+while read -r name arg0 args; do {
[ -n "${name###*}" ] || continue
if [ -z "$match" ]; then
names="$names $name"
@@ -65,13 +66,14 @@ while read -r name args; do {
hdr="\
#!/bin/sh -efu
-# Generated by $0 from $input ($name $args); do not edit."
+# Generated by $0 from $input ($name $arg0 $args); do not edit."
- case "$args" in
+ case "$arg0" in
+*)
cat <<-EOF
$hdr
- . "\${srcdir=.}/${args#+}"
+ set -- $args
+ . "\${srcdir=.}/${arg0#+}"
EOF
;;
@@ -79,7 +81,7 @@ while read -r name args; do {
cat <<-EOF
$hdr
. "\${srcdir=.}/init.sh"
- run_strace_match_diff $args
+ run_strace_match_diff $arg0 $args
EOF
;;
@@ -87,7 +89,7 @@ while read -r name args; do {
cat <<-EOF
$hdr
. "\${srcdir=.}/init.sh"
- $args
+ $arg0 $args
EOF
;;
esac > "$output"