mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 06:54:04 +02:00
qpkg: regression test for version preference
- test/verpref: test version preference (higher wins if there's a choice) - TODO: updated for above change
This commit is contained in:
parent
c05e6d5dbb
commit
b181db5b9e
@ -7,8 +7,6 @@ Still left to do
|
||||
|
||||
- handle Provides:
|
||||
|
||||
- if there are multiple choices, try to prefer more recent versions
|
||||
|
||||
- sort prerequisites such that they can be installed in the specified order
|
||||
|
||||
- consider Architecture:
|
||||
@ -50,3 +48,5 @@ Done
|
||||
|
||||
Update: after merging the two lookups per new node into one, we're at
|
||||
1172642 calls to comp_id, or 102% of the predicted "good case".
|
||||
|
||||
- if there are multiple choices, try to prefer more recent versions
|
||||
|
96
qpkg/test/verpref
Executable file
96
qpkg/test/verpref
Executable file
@ -0,0 +1,96 @@
|
||||
#!/bin/sh
|
||||
. ./Common
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg "prefer later version (1)" prereq foo <<EOF
|
||||
Package: bar
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Filename: bar_0
|
||||
|
||||
Package: bar
|
||||
Version: 1
|
||||
Architecture: test
|
||||
Filename: bar_1
|
||||
|
||||
Package: foo
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Depends: bar
|
||||
Filename: foo
|
||||
EOF
|
||||
expect <<EOF
|
||||
bar_1
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg "prefer later version (2)" prereq foo <<EOF
|
||||
Package: bar
|
||||
Version: 1
|
||||
Architecture: test
|
||||
Filename: bar_1
|
||||
|
||||
Package: bar
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Filename: bar_0
|
||||
|
||||
Package: foo
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Depends: bar
|
||||
Filename: foo
|
||||
EOF
|
||||
expect <<EOF
|
||||
bar_1
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg "dependency trumps preference (1)" prereq foo <<EOF
|
||||
Package: bar
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Filename: bar_0
|
||||
|
||||
Package: bar
|
||||
Version: 1
|
||||
Architecture: test
|
||||
Depends: bad
|
||||
Filename: bar_1
|
||||
|
||||
Package: foo
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Depends: bar
|
||||
Filename: foo
|
||||
EOF
|
||||
expect <<EOF
|
||||
bar_0
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg "dependency trumps preference (2)" prereq foo <<EOF
|
||||
Package: bar
|
||||
Version: 1
|
||||
Architecture: test
|
||||
Depends: bad
|
||||
Filename: bar_1
|
||||
|
||||
Package: bar
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Filename: bar_0
|
||||
|
||||
Package: foo
|
||||
Version: 0
|
||||
Architecture: test
|
||||
Depends: bar
|
||||
Filename: foo
|
||||
EOF
|
||||
expect <<EOF
|
||||
bar_0
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user