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
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# 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" )"
|
cd "$( dirname "$0" )"
|
||||||
|
|
||||||
outdir=xspec
|
outdir=xspec
|
||||||
|
@ -26,6 +29,20 @@ htmlindex()
|
||||||
cat >> "$index"
|
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
|
# xspec's output dir
|
||||||
mkdir -p "$outdir"
|
mkdir -p "$outdir"
|
||||||
rm -f "$index"
|
rm -f "$index"
|
||||||
|
@ -40,6 +57,7 @@ htmlindex <<EOH
|
||||||
<ul>
|
<ul>
|
||||||
EOH
|
EOH
|
||||||
|
|
||||||
|
|
||||||
declare -i status=0
|
declare -i status=0
|
||||||
while read spec; do
|
while read spec; do
|
||||||
echo "$spec"
|
echo "$spec"
|
||||||
|
@ -51,7 +69,7 @@ while read spec; do
|
||||||
|
|
||||||
printf ' <li><a href="%s">%s</a></li>' "$result" "$spec" \
|
printf ' <li><a href="%s">%s</a></li>' "$result" "$spec" \
|
||||||
| htmlindex
|
| htmlindex
|
||||||
done < <( find . -name '*.xspec' )
|
done < <( get-test-list "$@" )
|
||||||
|
|
||||||
htmlindex <<EOF
|
htmlindex <<EOF
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue