summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework13
-rwxr-xr-xtest/integration/test-apt-cdrom2
-rwxr-xr-xtest/integration/test-apt-download-progress2
-rwxr-xr-xtest/integration/test-apt-update-filesize-mismatch2
-rwxr-xr-xtest/integration/test-apt-update-hashsum-mismatch2
5 files changed, 15 insertions, 6 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 2efe7439e..b443f2a7b 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -1377,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
diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom
index 108805daa..ce31b5934 100755
--- a/test/integration/test-apt-cdrom
+++ b/test/integration/test-apt-cdrom
@@ -38,7 +38,7 @@ aptautotest_aptcdromlog_add() { aptautotest_aptget_update "$@"; }
CDROM_PRE="Using CD-ROM mount point $(readlink -f ./rootdir/media)/cdrom/
Unmounting CD-ROM...
Waiting for disc...
-Please insert a Disc in the drive and press enter
+Please insert a Disc in the drive and press [Enter]
Mounting CD-ROM...
Scanning disc for index files..."
CDROM_POST="This disc is called:
diff --git a/test/integration/test-apt-download-progress b/test/integration/test-apt-download-progress
index 7caeca971..bf6a412ad 100755
--- a/test/integration/test-apt-download-progress
+++ b/test/integration/test-apt-download-progress
@@ -13,7 +13,7 @@ changetohttpswebserver
assertprogress() {
T="$1"
testsuccess grep "dlstatus:1:0:Retrieving file 1 of 1" "$T"
- if ! egrep -q "dlstatus:1:[1-9][0-9](\..*)?:Retrieving file 1 of 1" "$T"; then
+ if ! grep -E -q "dlstatus:1:[1-9][0-9](\..*)?:Retrieving file 1 of 1" "$T"; then
cat "$T"
msgfail "Failed to detect download progress"
fi
diff --git a/test/integration/test-apt-update-filesize-mismatch b/test/integration/test-apt-update-filesize-mismatch
index f78b83b5f..a23c03c3f 100755
--- a/test/integration/test-apt-update-filesize-mismatch
+++ b/test/integration/test-apt-update-filesize-mismatch
@@ -40,7 +40,7 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver.
testfailure aptget update -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testfailure.output rootdir/tmp/update.output
- testsuccess grep -E "$(basename -s '.gz' "$COMPRESSFILE").*Hash Sum mismatch" rootdir/tmp/update.output
+ testsuccess grep -E "$(basename "$COMPRESSFILE" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output
testfailure aptcache show foo
testfailure aptget install foo -s
diff --git a/test/integration/test-apt-update-hashsum-mismatch b/test/integration/test-apt-update-hashsum-mismatch
index c2c5b3887..4627f7afd 100755
--- a/test/integration/test-apt-update-hashsum-mismatch
+++ b/test/integration/test-apt-update-hashsum-mismatch
@@ -35,7 +35,7 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver.
testfailure aptget update
cp rootdir/tmp/testfailure.output rootdir/tmp/update.output
- testsuccess grep -E "$(basename -s '.gz' "$get").*Hash Sum mismatch" rootdir/tmp/update.output
+ testsuccess grep -E "$(basename "$get" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output
testfailure aptcache show foo
testfailure aptget install foo -s