unify the output of all the modules test

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-05-20 16:42:59 +02:00
parent 7a68b819d4
commit f93b85c9f5
5 changed files with 22 additions and 7 deletions

View File

@ -85,10 +85,15 @@ Changes in version 1.12.0
The option '--ignore-test' works again. Remove the corresponding line.
+ update
* New test file 'test00_specsyntax'.
* test/test00_specsyntax - Davide Madrisan:
New test file 'test00_specsyntax'.
Move code to check specfiles from 'pck-update' (action 4) to the test file
'test00_specsyntax'.
+ improvement
* test/test00_specsyntax, pck-update, lib/libtest.lib - Davide Madrisan:
Unify the output of all the modules' test.
-------------------------------------------------------------------------------
Changes in version 1.10.0

View File

@ -78,7 +78,9 @@ function test.rpms_extract() {
local i=0
for pck in ${rpmpkg_name[@]}; do
[[ -e "$pck" ]] || notify.error $"package not found"": \`$pck'"
[[ -e "$pck" ]] &&
notify.note " * $pck" ||
notify.error $"package not found"": \`$pck'"
mkdir -p $tmpextractdir/$i 2>/dev/null
[ $? -eq 0 ] || notify.error $"\

View File

@ -2343,7 +2343,6 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.noarch.rpm"
notify.error $"package not found"": \`$pcknew_name'"
echo "rpmpkg_name[$i]=\"$rpms_dir/noarch/$pcknew_name\"" \
>> $tmpextractdir/rpmpkg.info
notify.note " * $pcknew_name"
else
pcknew_name="\
$pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
@ -2351,7 +2350,6 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
notify.error $"package not found"": \`$pcknew_name'"
echo "rpmpkg_name[$i]=\"$rpms_dir/$target_cpu/$pcknew_name\"" \
>> $tmpextractdir/rpmpkg.info
notify.note " $pcknew_name"
fi
notify.debug "$FUNCNAME: pcknew_name[$i] = $pcknew_name"
let "i += 1"
@ -2362,11 +2360,17 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
exit 1; }
. @libdir@/libtest.lib
# execute all the available tests...
notify.note " ${NOTE}"\
$"checking the specfile for common mistakes""${NORM}""..."
test.runall --specfile="$SRPM_SPECFILE_WITH_PATH"
notify.note " ${NOTE}"\
$"checking packages for common mistakes""${NORM}""..."
test.rpms_extract \
--infofile "$tmpextractdir/rpmpkg.info" \
--tmpdir "$tmpextractdir" || exit 1
# execute all the available tests...
test.runall --packages
# temporary files cleanup

View File

@ -531,3 +531,8 @@ msgstr "specfile con fine linea CR"
msgid "specfile with an unsupported format"
msgstr "specfile in formato non supportato"
msgid "checking the specfile for common mistakes"
msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "checking packages for common mistakes"
msgstr "controllo dei pacchetti alla ricerca di comuni errori"

View File

@ -25,7 +25,6 @@ for tool in cat chmod cpio date file find fold ftp getopt grep \
done
function alltests() {
# FIXME: add to 'po' file
notify.note " ${NOTE}"$"performing quality checks""${NORM}""..."
TEMP=`LC_ALL=C getopt \