]>
git.saurik.com Git - apt.git/blob - test/libapt/run-tests
c2aeccca7d496d648718e905858898ed8c6cfcb9
4 DIR
=$(readlink -f $(dirname $0))
5 echo "Compiling the tests …"
7 echo "Running all testcases …"
8 LDPATH
="$DIR/../../build/bin"
10 for testapp
in $(ls ${LDPATH}/*$EXT)
12 name
=$(basename ${testapp})
15 if [ $name = "GetListOfFilesInDir${EXT}" ]; then
16 # TODO: very-low: move env creation to the actual test-app
17 echo "Prepare Testarea for \033[1;35m$name\033[0m ..."
19 touch "${tmppath}/anormalfile" \
20 "${tmppath}/01yet-anothernormalfile" \
21 "${tmppath}/anormalapt.conf" \
22 "${tmppath}/01yet-anotherapt.conf" \
23 "${tmppath}/anormalapt.list" \
24 "${tmppath}/01yet-anotherapt.list" \
25 "${tmppath}/wrongextension.wron" \
26 "${tmppath}/wrong-extension.wron" \
27 "${tmppath}/strangefile." \
28 "${tmppath}/s.t.r.a.n.g.e.f.i.l.e" \
29 "${tmppath}/.hiddenfile" \
30 "${tmppath}/.hiddenfile.conf" \
31 "${tmppath}/.hiddenfile.list" \
32 "${tmppath}/multi..dot" \
33 "${tmppath}/multi.dot.conf" \
34 "${tmppath}/multi.dot.list" \
35 "${tmppath}/disabledfile.disabled" \
36 "${tmppath}/disabledfile.conf.disabled" \
37 "${tmppath}/disabledfile.list.disabled" \
38 "${tmppath}/invälid.conf" \
39 "${tmppath}/invalíd" \
40 "${tmppath}/01invalíd"
41 mkdir "${tmppath}/invaliddir" \
42 "${tmppath}/directory.conf" \
43 "${tmppath}/directory.list" \
44 "${tmppath}/directory.wron" \
45 "${tmppath}/directory.list.disabled"
46 ln -s "${tmppath}/anormalfile" "${tmppath}/linkedfile.list"
47 ln -s "${tmppath}/non-existing-file" "${tmppath}/brokenlink.list"
48 elif [ $name = "getLanguages${EXT}" ]; then
49 echo "Prepare Testarea for \033[1;35m$name\033[0m ..."
51 touch "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-tr" \
52 "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-pt" \
53 "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-se~" \
54 "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak"
55 elif [ $name = "CompareVersion${EXT}" ]; then
56 tmppath
="${DIR}/versions.lst"
59 echo -n "Testing with \033[1;35m${name}\033[0m ... "
60 LD_LIBRARY_PATH
=${LDPATH} ${testapp} ${tmppath} && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m"
62 if [ -n "$tmppath" -a -d "$tmppath" ]; then
63 echo "Cleanup Testarea after \033[1;35m$name\033[0m ..."