Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
25a689ec
Commit
25a689ec
authored
Mar 07, 2019
by
Ondřej Surý
Browse files
Add shell system test driver
parent
85ea0edf
Pipeline
#12334
passed with stages
in 12 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/system-test-driver.sh
0 → 100755
View file @
25a689ec
#!/bin/sh
# shellcheck disable=SC2181
# shellcheck disable=SC2034
usage
()
{
echo
"
$0
--test-name=NAME --log-file=PATH.log --trs-file=PATH.trs --color-tests={yes|no} --expect-failure={yes|no} --enable-hard-errors={yes|no}"
}
#
# This requires GNU getopt
#
getopt
--test
>
/dev/null
if
[
"
$?
"
-ne
4
]
;
then
echo
"fatal: GNU getopt is required"
exit
1
fi
OPTS
=
$(
getopt
--shell
sh
--name
"
$(
basename
"
$0
"
)
"
--options
''
--longoptions
test-name:,log-file:,trs-file:,color-tests:,expect-failure:,enable-hard-errors:
--
"
$@
"
)
if
[
"
$?
"
!=
0
]
;
then
echo
"Failed parsing options."
>
&2
;
exit
1
;
fi
eval set
--
"
$OPTS
"
TEST_NAME
=
LOG_FILE
=
TRS_FILE
=
COLOR_TESTS
=
yes
EXPECT_FAILURE
=
no
HARD_ERRORS
=
yes
while
true
;
do
case
"
$1
"
in
--test-name
)
TEST_NAME
=
"
$2
"
;
shift
;
shift
;;
--log-file
)
LOG_FILE
=
"
$2
"
;
shift
;
shift
;;
--trs-file
)
TRS_FILE
=
"
$2
"
;
shift
;
shift
;;
--color-tests
)
COLOR_TESTS
=
"
$2
"
;
shift
;
shift
;;
--expect-failure
)
EXPECT_FAILURE
=
"
$2
"
;
shift
;
shift
;;
--hard-errors
)
HARD_ERRORS
=
"
$2
"
;
shift
;
shift
;;
--
)
shift
;
break
;;
*
)
break
;;
esac
done
if
[
-z
"
$1
"
]
;
then
echo
"fatal: test name required"
usage
exit
1
fi
TEST_PROGRAM
=
"
$1
"
shift
if
[
-z
"
$TEST_NAME
"
]
;
then
TEST_NAME
=
"
$(
basename
"
$TEST_PROGRAM
"
)
"
fi
if
[
-z
"
$LOG_FILE
"
]
;
then
LOG_FILE
=
"
$TEST_PROGRAM
.log"
fi
if
[
-z
"
$TRS_FILE
"
]
;
then
TRS_FILE
=
"
$TEST_PROGRAM
.trs"
fi
echo
"Running
$TEST_PROGRAM
"
./run.sh
-p
"
$((
$RANDOM
%
32000
+
32000
))
"
"
$@
"
"
$TEST_PROGRAM
"
exit
$?
util/copyrights
View file @
25a689ec
...
...
@@ -1088,6 +1088,7 @@
./bin/tests/system/synthfromdnssec/ns1/sign.sh SH 2017,2018,2019
./bin/tests/system/synthfromdnssec/setup.sh SH 2017,2018,2019
./bin/tests/system/synthfromdnssec/tests.sh SH 2017,2018,2019
./bin/tests/system/system-test-driver.sh X 2019
./bin/tests/system/tcp/clean.sh SH 2014,2016,2018,2019
./bin/tests/system/tcp/setup.sh SH 2018,2019
./bin/tests/system/tcp/tests.sh SH 2014,2016,2018,2019
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment