13de33a5dc
This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
52 lines
869 B
Plaintext
52 lines
869 B
Plaintext
# $FreeBSD$
|
|
|
|
a1=$(alias)
|
|
: $(alias testalias=abcd)
|
|
a2=$(alias)
|
|
[ "$a1" = "$a2" ] || echo Error at line $LINENO
|
|
|
|
alias testalias2=abcd
|
|
a1=$(alias)
|
|
: $(unalias testalias2)
|
|
a2=$(alias)
|
|
[ "$a1" = "$a2" ] || echo Error at line $LINENO
|
|
|
|
[ "$(command -V pwd)" = "$(command -V pwd; exit $?)" ] || echo Error at line $LINENO
|
|
|
|
v=1
|
|
: $(export v=2)
|
|
[ "$v" = 1 ] || echo Error at line $LINENO
|
|
|
|
rotest=1
|
|
: $(readonly rotest=2)
|
|
[ "$rotest" = 1 ] || echo Error at line $LINENO
|
|
|
|
set +u
|
|
: $(set -u)
|
|
case $- in
|
|
*u*) echo Error at line $LINENO ;;
|
|
esac
|
|
set +u
|
|
|
|
set +u
|
|
: $(set -o nounset)
|
|
case $- in
|
|
*u*) echo Error at line $LINENO ;;
|
|
esac
|
|
set +u
|
|
|
|
set +u
|
|
: $(command set -u)
|
|
case $- in
|
|
*u*) echo Error at line $LINENO ;;
|
|
esac
|
|
set +u
|
|
|
|
umask 77
|
|
u1=$(umask)
|
|
: $(umask 022)
|
|
u2=$(umask)
|
|
[ "$u1" = "$u2" ] || echo Error at line $LINENO
|
|
|
|
dummy=$(exit 3); [ $? -eq 3 ] || echo Error at line $LINENO
|