]> git.saurik.com Git - apt.git/blobdiff - test/libapt/run-tests
merged from http://bzr.debian.org/bzr/apt/apt/debian-sid
[apt.git] / test / libapt / run-tests
index f5fc0344642b00b2159d953ce00503431d6817a3..0eea6d4f825efaf355272a408a0e75ba90e10797 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
 #!/bin/sh
 set -e
 
-local DIR=$(readlink -f $(dirname $0))
+DIR=$(readlink -f $(dirname $0))
 echo "Compiling the tests …"
 test -d "$DIR/../../build/obj/test/libapt/" || mkdir -p "$DIR/../../build/obj/test/libapt/"
 (cd $DIR && make)
 echo "Compiling the tests …"
 test -d "$DIR/../../build/obj/test/libapt/" || mkdir -p "$DIR/../../build/obj/test/libapt/"
 (cd $DIR && make)
@@ -39,6 +39,11 @@ do
                        "${tmppath}/invälid.conf" \
                        "${tmppath}/invalíd" \
                        "${tmppath}/01invalíd"
                        "${tmppath}/invälid.conf" \
                        "${tmppath}/invalíd" \
                        "${tmppath}/01invalíd"
+               mkdir "${tmppath}/invaliddir" \
+                       "${tmppath}/directory.conf" \
+                       "${tmppath}/directory.list" \
+                       "${tmppath}/directory.wron" \
+                       "${tmppath}/directory.list.disabled"
                ln -s "${tmppath}/anormalfile" "${tmppath}/linkedfile.list"
                ln -s "${tmppath}/non-existing-file" "${tmppath}/brokenlink.list"
        elif [ $name = "getLanguages${EXT}" ]; then
                ln -s "${tmppath}/anormalfile" "${tmppath}/linkedfile.list"
                ln -s "${tmppath}/non-existing-file" "${tmppath}/brokenlink.list"
        elif [ $name = "getLanguages${EXT}" ]; then
@@ -48,6 +53,13 @@ do
                        "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-pt" \
                        "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-se~" \
                        "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak"
                        "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-pt" \
                        "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-se~" \
                        "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak"
+       elif [ $name = "HashSums${EXT}" ]; then
+               TMP="$(mktemp)"
+               dmesg > $TMP
+               echo -n "Testing with \033[1;35m${name}\033[0m ... "
+               LD_LIBRARY_PATH=${LDPATH} ${testapp} $TMP $(md5sum $TMP | cut -d' ' -f 1) $(sha1sum $TMP | cut -d' ' -f 1) $(sha256sum $TMP | cut -d' ' -f 1) $(sha512sum $TMP | cut -d' ' -f 1) && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m"
+               rm $TMP
+               continue
        fi
 
        echo -n "Testing with \033[1;35m${name}\033[0m ... "
        fi
 
        echo -n "Testing with \033[1;35m${name}\033[0m ... "