test/runner now accepts list of tests, defaulting to all
parent
db95ae12ff
commit
061d4b7e09
20
test/runner
20
test/runner
|
@ -14,8 +14,11 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# FIXME: This guy needs some cleanup.
|
||||
# #
|
||||
|
||||
declare -r oldwd="$( pwd )"
|
||||
cd "$( dirname "$0" )"
|
||||
|
||||
outdir=xspec
|
||||
|
@ -26,6 +29,20 @@ htmlindex()
|
|||
cat >> "$index"
|
||||
}
|
||||
|
||||
get-test-list()
|
||||
{
|
||||
if [ $# -eq 0 ]; then
|
||||
find . -name '*.xspec'
|
||||
else
|
||||
(
|
||||
cd "$oldwd" \
|
||||
&& for spec in "$@"; do
|
||||
echo "$( readlink -f "$spec" )"
|
||||
done
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
# xspec's output dir
|
||||
mkdir -p "$outdir"
|
||||
rm -f "$index"
|
||||
|
@ -40,6 +57,7 @@ htmlindex <<EOH
|
|||
<ul>
|
||||
EOH
|
||||
|
||||
|
||||
declare -i status=0
|
||||
while read spec; do
|
||||
echo "$spec"
|
||||
|
@ -51,7 +69,7 @@ while read spec; do
|
|||
|
||||
printf ' <li><a href="%s">%s</a></li>' "$result" "$spec" \
|
||||
| htmlindex
|
||||
done < <( find . -name '*.xspec' )
|
||||
done < <( get-test-list "$@" )
|
||||
|
||||
htmlindex <<EOF
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue