tests: integrate the "embedded" test

This commit is contained in:
Pierre Pronchery 2024-10-07 00:25:02 +02:00
parent 24feb664f3
commit 43ac137e66
3 changed files with 56 additions and 3 deletions

View File

@ -23,7 +23,7 @@ title=Release
#targets
[tests]
type=command
command=cd tests && (if [ -n "$(OBJDIR)" ]; then $(MAKE) OBJDIR="$(OBJDIR)tests/" "$(OBJDIR)tests/clint.log" "$(OBJDIR)tests/fixme.log" "$(OBJDIR)tests/tests.log" "$(OBJDIR)tests/xmllint.log"; else $(MAKE) clint.log fixme.log tests.log xmllint.log; fi)
command=cd tests && (if [ -n "$(OBJDIR)" ]; then $(MAKE) OBJDIR="$(OBJDIR)tests/" "$(OBJDIR)tests/clint.log" "$(OBJDIR)tests/embedded.log" "$(OBJDIR)tests/fixme.log" "$(OBJDIR)tests/tests.log" "$(OBJDIR)tests/xmllint.log"; else $(MAKE) clint.log embedded.log fixme.log tests.log xmllint.log; fi)
depends=all
enabled=0
phony=1

View File

@ -51,5 +51,52 @@ _embedded()
}
#usage
_usage()
{
echo "Usage: $PROGNAME [-c] target..." 1>&2
return 1
}
#main
_embedded || exit 2
clean=0
while getopts "cO:P:" name; do
case "$name" in
c)
clean=1
;;
O)
export "${OPTARG%%=*}"="${OPTARG#*=}"
;;
P)
#XXX ignored for compatibility
;;
?)
_usage
exit $?
;;
esac
done
shift $((OPTIND - 1))
if [ $# -lt 1 ]; then
_usage
exit $?
fi
#clean
[ $clean -ne 0 ] && exit 0
exec 3>&1
ret=0
while [ $# -gt 0 ]; do
target="$1"
dirname="${target%/*}"
shift
if [ -n "$dirname" -a "$dirname" != "$target" ]; then
$MKDIR -- "$dirname" || ret=$?
fi
_embedded > "$target" || ret=$?
done
exit $ret

View File

@ -1,4 +1,4 @@
targets=clint.log,fixme.log,htmllint.log,plugins,tests.log,vfs,xmllint.log
targets=clint.log,embedded.log,fixme.log,htmllint.log,plugins,tests.log,vfs,xmllint.log
cppflags_force=-I ../include
cflags_force=`pkg-config --cflags libDesktop`
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
@ -25,6 +25,12 @@ script=./clint.sh
enabled=0
depends=clint.sh
[embedded.log]
type=script
script=./embedded.sh
enabled=0
depends=embedded.sh
[fixme.log]
type=script
script=./fixme.sh