mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Restore full 'bin/package test' functionality
package now uses mamake to run all available regression tests (currently iffe, mamake and ksh93) instead of just the ksh tests. However, as a consequence, passing options or other arguments to the shtests script via bin/package is no longer possible -- run bin/shtests directly for that. src/Mamfile, src/*/Mamfile: - Make the 'test' virtual target execute subdirectories by including the 'install' and 'all' virtual targets within it. src/cmd/ksh93/Mamfile: - Simplify and update the script in the 'test' virtual target. src/cmd/builtin/Mamfile: - Add dummy 'test' target to avoid an error. bin/package, src/cmd/INIT/package.sh: - Run 'mamake test' from the arch/*/src directory. This is the one that must be the initial working directory for mamake, though the Mamfiles aren't here; mamake finds them via the VPATH variable. - Update self-doc.
This commit is contained in:
parent
dccf6b5ea8
commit
7b99b7cf04
8 changed files with 78 additions and 47 deletions
|
@ -108,6 +108,11 @@ Many other commands in this repo self-document via the `--help`, `--man` and
|
|||
### Test
|
||||
|
||||
After compiling, you can run the regression tests.
|
||||
To run the default test sets for ksh and the build system, use:
|
||||
```sh
|
||||
bin/package test
|
||||
```
|
||||
For ksh, use the `shtests` command direclty to control the regression test runs.
|
||||
Start by reading the information printed by:
|
||||
```sh
|
||||
bin/shtests --man
|
||||
|
|
38
bin/package
38
bin/package
|
@ -109,7 +109,7 @@ command=${0##*/}
|
|||
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
||||
0123) USAGE=$'
|
||||
[-?
|
||||
@(#)$Id: '$command$' (ksh 93u+m) 2022-01-02 $
|
||||
@(#)$Id: '$command$' (ksh 93u+m) 2022-02-24 $
|
||||
]
|
||||
[-author?Glenn Fowler <gsf@research.att.com>]
|
||||
[-author?Contributors to https://github.com/ksh93/ksh]
|
||||
|
@ -215,11 +215,14 @@ case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
|||
must contain an \begrep\b(1) expression of result lines to be
|
||||
ignored. \bfailed\b lists failures only and \bpath\b lists the
|
||||
results file path name only.]
|
||||
[+test\b [ \aargument\a ... ]]?Run the regression tests for
|
||||
\bksh\b. If the standard output is a terminal then the
|
||||
[+test\b [ \b\adir\a\b ]]\b?Run all available default regression tests.
|
||||
If the optional \adir\a argument (such as \bsrc/cmd/ksh93\b) is given,
|
||||
only the tests in that directory are run.
|
||||
If the standard output is a terminal then the
|
||||
output is also captured in \b$INSTALLROOT/lib/package/gen/test.out\b.
|
||||
\bksh\b must be made before it can be tested.
|
||||
All \aargument\as following \atest\a are passed to \bbin/shtests\b.
|
||||
Programs must be made before they can be tested.
|
||||
For \bksh\b, a separate \bshtests\b command is available that allows
|
||||
passing arguments to select and tune the regression tests.
|
||||
See \bbin/shtests --man\b for more information.]
|
||||
[+use\b [ \auid\a | \apackage\a | . [ 32 | 64 ]] | 32 | 64 | - ]] [ command ...]]?Run
|
||||
\acommand\a, or an interactive shell if \acommand\a is omitted,
|
||||
|
@ -471,12 +474,15 @@ DESCRIPTION
|
|||
$HOME/.pkgresults, if it exists, must contain an egrep(1) expression
|
||||
of result lines to be ignored. failed lists failures only and path
|
||||
lists the results file path name only.
|
||||
test [ argument ... ]
|
||||
Run the regression tests for ksh. If the standard output is a
|
||||
terminal then the output is also captured in
|
||||
$INSTALLROOT/lib/package/gen/test.out. ksh must be made before it can
|
||||
be tested. All arguments following test are passed to bin/shtests.
|
||||
See bin/shtests --man for more information.
|
||||
test [ dir ]
|
||||
Run all available default regression tests. If the optional dir
|
||||
argument (such as src/cmd/ksh93) is given, only the tests in that
|
||||
directory are run. If the standard output is a terminal then the
|
||||
output is also captured in $INSTALLROOT/lib/package/gen/test.out.
|
||||
Programs must be made before they can be tested. For ksh, a separate
|
||||
shtests command is available that allows passing arguments to select
|
||||
and tune the regression tests. See bin/shtests --man for more
|
||||
information.
|
||||
use [ uid | package | . [ 32 | 64 ] | 32 | 64 | - ] [ command ...]
|
||||
Run command, or an interactive shell if command is omitted, with the
|
||||
environment initialized for using the package (can you say shared
|
||||
|
@ -532,7 +538,7 @@ SEE ALSO
|
|||
mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
|
||||
|
||||
IMPLEMENTATION
|
||||
version package (ksh 93u+m) 2022-01-02
|
||||
version package (ksh 93u+m) 2022-02-24
|
||||
author Glenn Fowler <gsf@research.att.com>
|
||||
author Contributors to https://github.com/ksh93/ksh
|
||||
copyright (c) 1994-2012 AT&T Intellectual Property
|
||||
|
@ -3522,8 +3528,12 @@ results)set '' $target
|
|||
esac
|
||||
;;
|
||||
|
||||
test) # pass control to ksh 93u+m test script
|
||||
capture "$SHELL" "$PACKAGEROOT/bin/shtests" $args
|
||||
test) # run all available default regression tests
|
||||
cd "$INSTALLROOT" || err_out "run '$0 make' first"
|
||||
set -f
|
||||
set -- ${args:-src}
|
||||
cd "$1" || exit
|
||||
capture mamake test
|
||||
;;
|
||||
|
||||
use) # finalize the environment
|
||||
|
|
12
src/Mamfile
12
src/Mamfile
|
@ -9,8 +9,10 @@ note * documented in Glenn Fowler's paper "A Make Abstract Machine":
|
|||
note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html
|
||||
note *
|
||||
note source level :MAKE: equivalent
|
||||
make install
|
||||
make all
|
||||
exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
|
||||
done all virtual
|
||||
done install virtual
|
||||
make test
|
||||
make install
|
||||
make all
|
||||
exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
|
||||
done all virtual
|
||||
done install virtual
|
||||
done test virtual
|
||||
|
|
|
@ -109,7 +109,7 @@ command=${0##*/}
|
|||
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
||||
0123) USAGE=$'
|
||||
[-?
|
||||
@(#)$Id: '$command$' (ksh 93u+m) 2022-01-02 $
|
||||
@(#)$Id: '$command$' (ksh 93u+m) 2022-02-24 $
|
||||
]
|
||||
[-author?Glenn Fowler <gsf@research.att.com>]
|
||||
[-author?Contributors to https://github.com/ksh93/ksh]
|
||||
|
@ -215,11 +215,14 @@ case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
|
|||
must contain an \begrep\b(1) expression of result lines to be
|
||||
ignored. \bfailed\b lists failures only and \bpath\b lists the
|
||||
results file path name only.]
|
||||
[+test\b [ \aargument\a ... ]]?Run the regression tests for
|
||||
\bksh\b. If the standard output is a terminal then the
|
||||
[+test\b [ \b\adir\a\b ]]\b?Run all available default regression tests.
|
||||
If the optional \adir\a argument (such as \bsrc/cmd/ksh93\b) is given,
|
||||
only the tests in that directory are run.
|
||||
If the standard output is a terminal then the
|
||||
output is also captured in \b$INSTALLROOT/lib/package/gen/test.out\b.
|
||||
\bksh\b must be made before it can be tested.
|
||||
All \aargument\as following \atest\a are passed to \bbin/shtests\b.
|
||||
Programs must be made before they can be tested.
|
||||
For \bksh\b, a separate \bshtests\b command is available that allows
|
||||
passing arguments to select and tune the regression tests.
|
||||
See \bbin/shtests --man\b for more information.]
|
||||
[+use\b [ \auid\a | \apackage\a | . [ 32 | 64 ]] | 32 | 64 | - ]] [ command ...]]?Run
|
||||
\acommand\a, or an interactive shell if \acommand\a is omitted,
|
||||
|
@ -471,12 +474,15 @@ DESCRIPTION
|
|||
$HOME/.pkgresults, if it exists, must contain an egrep(1) expression
|
||||
of result lines to be ignored. failed lists failures only and path
|
||||
lists the results file path name only.
|
||||
test [ argument ... ]
|
||||
Run the regression tests for ksh. If the standard output is a
|
||||
terminal then the output is also captured in
|
||||
$INSTALLROOT/lib/package/gen/test.out. ksh must be made before it can
|
||||
be tested. All arguments following test are passed to bin/shtests.
|
||||
See bin/shtests --man for more information.
|
||||
test [ dir ]
|
||||
Run all available default regression tests. If the optional dir
|
||||
argument (such as src/cmd/ksh93) is given, only the tests in that
|
||||
directory are run. If the standard output is a terminal then the
|
||||
output is also captured in $INSTALLROOT/lib/package/gen/test.out.
|
||||
Programs must be made before they can be tested. For ksh, a separate
|
||||
shtests command is available that allows passing arguments to select
|
||||
and tune the regression tests. See bin/shtests --man for more
|
||||
information.
|
||||
use [ uid | package | . [ 32 | 64 ] | 32 | 64 | - ] [ command ...]
|
||||
Run command, or an interactive shell if command is omitted, with the
|
||||
environment initialized for using the package (can you say shared
|
||||
|
@ -532,7 +538,7 @@ SEE ALSO
|
|||
mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
|
||||
|
||||
IMPLEMENTATION
|
||||
version package (ksh 93u+m) 2022-01-02
|
||||
version package (ksh 93u+m) 2022-02-24
|
||||
author Glenn Fowler <gsf@research.att.com>
|
||||
author Contributors to https://github.com/ksh93/ksh
|
||||
copyright (c) 1994-2012 AT&T Intellectual Property
|
||||
|
@ -3522,8 +3528,12 @@ results)set '' $target
|
|||
esac
|
||||
;;
|
||||
|
||||
test) # pass control to ksh 93u+m test script
|
||||
capture "$SHELL" "$PACKAGEROOT/bin/shtests" $args
|
||||
test) # run all available default regression tests
|
||||
cd "$INSTALLROOT" || err_out "run '$0 make' first"
|
||||
set -f
|
||||
set -- ${args:-src}
|
||||
cd "$1" || exit
|
||||
capture mamake test
|
||||
;;
|
||||
|
||||
use) # finalize the environment
|
||||
|
|
|
@ -9,8 +9,10 @@ note * documented in Glenn Fowler's paper "A Make Abstract Machine":
|
|||
note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html
|
||||
note *
|
||||
note component level :MAKE: equivalent
|
||||
make install
|
||||
make all
|
||||
exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
|
||||
done all virtual
|
||||
done install virtual
|
||||
make test
|
||||
make install
|
||||
make all
|
||||
exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
|
||||
done all virtual
|
||||
done install virtual
|
||||
done test virtual
|
||||
|
|
|
@ -67,3 +67,5 @@ make install
|
|||
exec - fi
|
||||
done ${INSTALLROOT}/bin virtual
|
||||
done install virtual
|
||||
make test
|
||||
done test dontcare virtual
|
||||
|
|
|
@ -1556,9 +1556,7 @@ make test
|
|||
prev ksh
|
||||
make tests/shtests
|
||||
done tests/shtests
|
||||
exec - silent cmp 2>/dev/null -s ${INSTALLROOT}/bin/ksh ksh 2>/dev/null ||
|
||||
exec - echo "make install to run the tests on the latest ksh" >&2
|
||||
exec - cd
|
||||
exec - SHELL=${INSTALLROOT}/bin/ksh ${INSTALLROOT}/bin/ksh shtests
|
||||
exec - cd "$PACKAGEROOT/src/cmd/ksh93/tests"
|
||||
exec - SHELL=$INSTALLROOT/bin/ksh "$INSTALLROOT/bin/ksh" ./shtests
|
||||
done test.ksh virtual
|
||||
done test dontcare virtual
|
||||
|
|
|
@ -9,8 +9,10 @@ note * documented in Glenn Fowler's paper "A Make Abstract Machine":
|
|||
note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html
|
||||
note *
|
||||
note component level :MAKE: equivalent
|
||||
make install
|
||||
make all
|
||||
exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
|
||||
done all virtual
|
||||
done install virtual
|
||||
make test
|
||||
make install
|
||||
make all
|
||||
exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
|
||||
done all virtual
|
||||
done install virtual
|
||||
done test virtual
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue