Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Wim Lewis
nettle
Commits
374595bb
Commit
374595bb
authored
Oct 01, 2002
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New file (copied from lsh testsuite).
Rev: src/nettle/examples/run-tests:1.1
parent
2f30a8e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
examples/run-tests
examples/run-tests
+69
-0
No files found.
examples/run-tests
0 → 100755
View file @
374595bb
#! /bin/sh
failed
=
0
all
=
0
if
[
-z
"
$srcdir
"
]
;
then
srcdir
=
`
pwd
`
fi
export
srcdir
find_program
()
{
if
[
-x
"
$1
"
]
;
then
echo
"./
$1
"
else
echo
"
$srcdir
/
$1
"
fi
}
env_program
()
{
if
[
-x
"
$1
"
]
;
then
if
"
$1
"
;
then
:
;
else
echo
FAIL:
$1
exit
1
fi
fi
}
test_program
()
{
testname
=
`
echo
"
$1
"
|
sed
-e
's,-test$,,'
-e
's,^\./,,'
`
"
$1
"
case
"
$?
"
in
0
)
echo
PASS:
$testname
all
=
`
expr
$all
+ 1
`
;;
77
)
echo
SKIP:
$testname
;;
*
)
echo
FAIL:
$testname
failed
=
`
expr
$failed
+ 1
`
all
=
`
expr
$all
+ 1
`
;;
esac
}
env_program
`
find_program setup-env
`
if
[
$#
-eq
0
]
;
then
for
f
in
*
-test
;
do
test_program
"./
$f
"
;
done
else
for
f
in
"
$@
"
;
do
test_program
`
find_program
"
$f
"
`
;
done
fi
if
[
$failed
-eq
0
]
;
then
banner
=
"All
$all
tests passed"
else
banner
=
"
$failed
of
$all
tests failed"
fi
dashes
=
`
echo
"
$banner
"
|
sed
s/./
=
/g
`
echo
"
$dashes
"
echo
"
$banner
"
echo
"
$dashes
"
env_program
`
find_program teardown-env
`
[
"
$failed
"
-eq
0
]
Write
Preview
Markdown
is supported
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