]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
travis: add ppa:ubuntu-toolschain-r/test as source for gcc-5
[apt.git] / test / integration / framework
index 2f08c5fdcb08e7f6f8c9c5280f200af1f6b748a6..b443f2a7b48432d03901fe37f7e1d991f8513b38 100644 (file)
@@ -1324,6 +1324,17 @@ testmarkedauto() {
        fi
        aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
 }
+testmarkedmanual() {
+       local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testmarkedmanual.comparefile"
+       if [ -n "$1" ]; then
+               msgtest 'Test for correctly marked as manually installed' "$*"
+               while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE
+       else
+               msgtest 'Test for correctly marked as manually installed' 'no package'
+               echo -n > $COMPAREFILE
+       fi
+       aptmark showmanual 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
+}
 
 msgfailoutput() {
        local MSG="$1"
@@ -1366,8 +1377,17 @@ testsuccess() {
                if expr match "$1" '^apt.*' >/dev/null; then
                        if grep -q -E ' runtime error: ' "$OUTPUT"; then
                                msgfailoutput 'compiler detected undefined behavior' "$OUTPUT" "$@"
-                       elif grep -q -E '^[WE]: ' "$OUTPUT"; then
-                               msgfailoutput 'successful run, but output contains warnings/errors' "$OUTPUT" "$@"
+                       elif grep -E '^[WE]: ' "$OUTPUT" > "${TMPWORKINGDIRECTORY}/rootdir/tmp/checkforwarnings.output" 2>&1; then
+                               if [ "$IGNORE_PTY_NOT_MOUNTED" = '1' ]; then
+                                       if echo 'E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)' \
+                                               | cmp - "${TMPWORKINGDIRECTORY}/rootdir/tmp/checkforwarnings.output" >/dev/null 2>&1; then
+                                               msgpass
+                                       else
+                                               msgfailoutput 'successful run, but output contains warnings/errors' "$OUTPUT" "$@"
+                                       fi
+                               else
+                                       msgfailoutput 'successful run, but output contains warnings/errors' "$OUTPUT" "$@"
+                               fi
                        else
                                msgpass
                        fi