summaryrefslogtreecommitdiff
path: root/test/solver.sh
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-07-30 20:59:47 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-08-01 16:21:47 +0300
commita5146f1b6cb5bb0cf56c6aa8293e26302e5d0ee2 (patch)
treec82d99f1c8e3c2da26c1554d9ae27ae451e40554 /test/solver.sh
parent1a04425fad2fbf88eb0cbb9648e7556a00dd2916 (diff)
downloadapk-tools-a5146f1b6cb5bb0cf56c6aa8293e26302e5d0ee2.tar.gz
apk-tools-a5146f1b6cb5bb0cf56c6aa8293e26302e5d0ee2.tar.bz2
apk-tools-a5146f1b6cb5bb0cf56c6aa8293e26302e5d0ee2.tar.xz
apk-tools-a5146f1b6cb5bb0cf56c6aa8293e26302e5d0ee2.zip
solver: generate proper error messages
* the solver no longer does look-ahead locking of names (could be possibly optimized later); instead names are now always ordered strictly to properly detect the package names which are unsolveable * basic error tests added, so we can see the most likely problem in dependencies easily
Diffstat (limited to 'test/solver.sh')
-rwxr-xr-xtest/solver.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/solver.sh b/test/solver.sh
index d819c70..20dc232 100755
--- a/test/solver.sh
+++ b/test/solver.sh
@@ -5,8 +5,12 @@ APK_TEST=../src/apk_test
fail=0
for test in *.test; do
bn=$(basename $test .test)
- $APK_TEST $(cat $test) &> $bn.got
- if ! cmp $bn.expect $bn.got 2> /dev/null; then
+ (
+ read options
+ read world
+ $APK_TEST $options "$world" &> $bn.got
+ ) < $bn.test
+ if ! cmp $bn.expect $bn.got &> /dev/null; then
fail=$((fail+1))
echo "FAIL: $test"
diff -ru $bn.expect $bn.got