aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-13 18:20:39 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-13 18:22:00 +0300
commite51232e710dfd32764e2c2d0599df83ab85a9c74 (patch)
tree5eac93c05cf2fe77d2857a48a9fc55c7bf7e33d0 /test
parent25ff68a87e3264b6dfdc846823d4912b4dd870b2 (diff)
downloadaports-e51232e710dfd32764e2c2d0599df83ab85a9c74.tar.bz2
aports-e51232e710dfd32764e2c2d0599df83ab85a9c74.tar.xz
errors: rewrite the logic how errors are reported
Instead of the dependency oriented logic, switch to print them for each package or name needed. Might give a bit more readable errors now. There's still few corner cases that proper error is not output, which are cought by the test cases.
Diffstat (limited to 'test')
-rw-r--r--test/conflict2.test6
-rw-r--r--test/error1.test6
-rw-r--r--test/error2.test6
-rw-r--r--test/error3.test9
-rw-r--r--test/error4.test5
-rw-r--r--test/error5.test2
-rw-r--r--test/pinning11.test6
-rw-r--r--test/provides.repo21
-rw-r--r--test/provides2.test9
-rw-r--r--test/provides5.test9
-rw-r--r--test/provides6.test11
-rw-r--r--test/provides7.test4
12 files changed, 74 insertions, 20 deletions
diff --git a/test/conflict2.test b/test/conflict2.test
index c9f59ec18c..38566b6c87 100644
--- a/test/conflict2.test
+++ b/test/conflict2.test
@@ -2,5 +2,7 @@
--test-repo conflict.repo
add a b>1
@EXPECT
-ERROR: unsatisfiable dependencies:
- world: b>1
+ERROR: unsatisfiable constraints:
+ b-2:
+ breaks: a-1[!b>1]
+ satisfies: world[b>1]
diff --git a/test/error1.test b/test/error1.test
index 4b1662e7c5..c99c7df3cd 100644
--- a/test/error1.test
+++ b/test/error1.test
@@ -2,5 +2,7 @@
--test-repo complicated1.repo
add a d>1.5
@EXPECT
-ERROR: unsatisfiable dependencies:
- b-1: d<2.0
+ERROR: unsatisfiable constraints:
+ d-2.0:
+ breaks: b-1[d<2.0]
+ satisfies: world[d>1.5] c-1[d>1.0]
diff --git a/test/error2.test b/test/error2.test
index 7f10fb1212..db5f9c1026 100644
--- a/test/error2.test
+++ b/test/error2.test
@@ -2,5 +2,7 @@
--test-repo complicated1.repo
add a d<1.5
@EXPECT
-ERROR: unsatisfiable dependencies:
- world: d<1.5
+ERROR: unsatisfiable constraints:
+ d-1.0:
+ breaks: c-1[d>1.0]
+ satisfies: world[d<1.5] b-1[d<2.0]
diff --git a/test/error3.test b/test/error3.test
index 26653742e7..9bd294db0b 100644
--- a/test/error3.test
+++ b/test/error3.test
@@ -2,5 +2,10 @@
--test-repo complicated1.repo
add a !b
@EXPECT
-ERROR: unsatisfiable dependencies:
- a-3: b
+ERROR: unsatisfiable constraints:
+ d-2.0:
+ breaks: b-1[d<2.0]
+ satisfies: c-1[d>1.0]
+ b-1:
+ breaks: world[!b]
+ satisfies: a-3[b]
diff --git a/test/error4.test b/test/error4.test
index 5b22921cba..050f42b874 100644
--- a/test/error4.test
+++ b/test/error4.test
@@ -2,5 +2,6 @@
--test-repo complicated1.repo
add a nonexistant
@EXPECT
-ERROR: unsatisfiable dependencies:
- world: nonexistant
+ERROR: unsatisfiable constraints:
+ nonexistant (missing):
+ required by: world[nonexistant]
diff --git a/test/error5.test b/test/error5.test
index b42445484a..9aa18180d5 100644
--- a/test/error5.test
+++ b/test/error5.test
@@ -2,5 +2,5 @@
--test-repo complicated1.repo
add a>2
@EXPECT
-ERROR: unsatisfiable dependencies:
+ERROR: unsatisfiable constraints:
b-1: d<2.0
diff --git a/test/pinning11.test b/test/pinning11.test
index a3dd85695c..794eed5de1 100644
--- a/test/pinning11.test
+++ b/test/pinning11.test
@@ -4,5 +4,7 @@
--test-world "a@testing"
add c>=3
@EXPECT
-ERROR: unsatisfiable dependencies:
- c-3: not pinned: @testing
+ERROR: unsatisfiable constraints:
+ c-3:
+ masked in: testing
+ satisfies: world[c>=3]
diff --git a/test/provides.repo b/test/provides.repo
index 2e4c9797e3..a3dfec4e6d 100644
--- a/test/provides.repo
+++ b/test/provides.repo
@@ -5,6 +5,13 @@ S:1
I:1
p:so:foo.so.1=1.0
+C:Q1EyN5AdpAOBJWKMR89pp/C66o+FE=
+P:libfoo
+V:2
+S:1
+I:1
+p:so:foo.so.2=1.0
+
C:Q1eVpkasfqZAukAXFYbgwt4xAMZWU=
P:app
V:2
@@ -12,6 +19,13 @@ S:1
I:1
D:so:foo.so.1
+C:Q1eVpsasfqZAukAXFYbgwt4xAMZWX=
+P:app2
+V:2
+S:1
+I:1
+D:so:foo.so.2
+
C:Q1EyN5AdpAOBJWKMR89pp/C66FFFF=
P:mymailreader
V:1
@@ -40,3 +54,10 @@ S:1
I:1
p:theservice=2
+C:Q1eVpkasfqZAukAXFYbgwt444Edde=
+P:selfconflicting
+V:1
+S:1
+I:1
+p:selfprovided=2
+p:selfprovided=3
diff --git a/test/provides2.test b/test/provides2.test
index ff509f8a26..9d3a2e4eb1 100644
--- a/test/provides2.test
+++ b/test/provides2.test
@@ -2,8 +2,7 @@
--test-repo provides.repo
add mail-reader
@EXPECT
-ERROR: unsatisfiable dependencies:
- world: mail-reader
-
- mail-reader is a virtual package provided by:
- mymailreader-1 mailreadplus-1
+ERROR: unsatisfiable constraints:
+ mail-reader (virtual):
+ provided by: mymailreader-1 mailreadplus-1
+ required by: world[mail-reader]
diff --git a/test/provides5.test b/test/provides5.test
index 906eb76671..fc21ae283c 100644
--- a/test/provides5.test
+++ b/test/provides5.test
@@ -2,5 +2,10 @@
--test-repo provides.repo
add server-a server-b
@EXPECT
-ERROR: unsatisfiable dependencies:
- world: server-a
+ERROR: unsatisfiable constraints:
+ server-a-1:
+ conflicts: server-b-1[theservice]
+ satisfies: world[server-a]
+ server-b-1:
+ conflicts: server-a-1[theservice]
+ satisfies: world[server-b]
diff --git a/test/provides6.test b/test/provides6.test
new file mode 100644
index 0000000000..649ae2065b
--- /dev/null
+++ b/test/provides6.test
@@ -0,0 +1,11 @@
+@ARGS
+--test-repo provides.repo
+add app app2
+@EXPECT
+ERROR: unsatisfiable constraints:
+ libfoo-1:
+ conflicts: libfoo-2
+ satisfies: app-2[so:foo.so.1]
+ libfoo-2:
+ conflicts: libfoo-1
+ satisfies: app2-2[so:foo.so.2]
diff --git a/test/provides7.test b/test/provides7.test
new file mode 100644
index 0000000000..a7ac5ed473
--- /dev/null
+++ b/test/provides7.test
@@ -0,0 +1,4 @@
+@ARGS
+--test-repo provides.repo
+add selfconflicting
+@EXPECT