]> git.saurik.com Git - apt.git/commitdiff
tests: expect no output while compiling noopchroot
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 16 Feb 2016 15:02:46 +0000 (16:02 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Sun, 6 Mar 2016 08:39:30 +0000 (09:39 +0100)
This way we hopefully notice (new) warnings in this little helper.

Git-Dch: Ignore

test/integration/framework
test/integration/test-external-dependency-solver-protocol

index a1523467d80415eab60c2ab1aac5e12220393fb2..a0eeb6d45e0faa457930b5e2f3a183bd4dc2981b 100644 (file)
@@ -517,7 +517,7 @@ int execvp(const char *file, char *const argv[]) {
        return func_execvp(newfile, argv);
 }
 EOF
        return func_execvp(newfile, argv);
 }
 EOF
-       testsuccess --nomsg gcc -Wall -fPIC -shared -o noopchroot.so noopchroot.c -ldl
+       testempty --nomsg gcc -Wall -Wextra -fPIC -shared -o noopchroot.so noopchroot.c -ldl
 }
 configcompression() {
        local CMD='apthelper cat-file -C'
 }
 configcompression() {
        local CMD='apthelper cat-file -C'
@@ -1313,9 +1313,13 @@ testfileequal() {
 
 testempty() {
        msggroup 'testempty'
 
 testempty() {
        msggroup 'testempty'
-       msgtest "Test for no output of" "$*"
+       if [ "$1" = '--nomsg' ]; then
+               shift
+       else
+               msgtest "Test for no output of" "$*"
+       fi
        local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testempty.comparefile"
        local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testempty.comparefile"
-       if ("$@" >"$COMPAREFILE" 2>&1 || true) && test ! -s "$COMPAREFILE"; then
+       if "$@" >"$COMPAREFILE" 2>&1 && test ! -s "$COMPAREFILE"; then
                msgpass
        else
                msgfailoutput '' "$COMPAREFILE" "$@"
                msgpass
        else
                msgfailoutput '' "$COMPAREFILE" "$@"
index 54b58301f2045990777fc6107e54db04c45565aa..32c5fc3540fe7ca3e612d2b0a56a32d8450c12e8 100755 (executable)
@@ -124,7 +124,7 @@ rm -f "$APT_EDSP_DUMP_FILENAME"
 testfailure aptget install --solver dump awesomecoolstuff:i386 -s
 testsuccess test -s "$APT_EDSP_DUMP_FILENAME"
 testequal 'Install: awesomecoolstuff:i386' grep :i386 "$APT_EDSP_DUMP_FILENAME"
 testfailure aptget install --solver dump awesomecoolstuff:i386 -s
 testsuccess test -s "$APT_EDSP_DUMP_FILENAME"
 testequal 'Install: awesomecoolstuff:i386' grep :i386 "$APT_EDSP_DUMP_FILENAME"
-testempty grep -e ':amd64' -e 'Architecture: any' "$APT_EDSP_DUMP_FILENAME"
+testfailure grep -e ':amd64' -e 'Architecture: any' "$APT_EDSP_DUMP_FILENAME"
 
 testsuccess aptget dist-upgrade -s
 testsuccess aptget dist-upgrade -s --solver apt
 
 testsuccess aptget dist-upgrade -s
 testsuccess aptget dist-upgrade -s --solver apt