Compare commits

..
3 Commits
Author SHA1 Message Date
Patrick McCarty 8ac1869adf Call checkrenamed() with correct arguments
Some of the renames tests omitted the leading forward slash for the two
function arguments, so add them here.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-19 11:15:26 -07:00
Patrick McCarty fde00265e2 test: fix some typos in checkrenamed()
Due to these typos being present, several tests were passing that should
not have been.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-19 11:15:26 -07:00
Matthew Johnson 25d3ef658d Add deprecation message to README
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-04-19 11:04:08 -07:00
2 changed files with 22 additions and 13 deletions
+9
View File
@@ -1,3 +1,12 @@
With the release of mixer-tools v4.3.0 [1] the swupd-server project is
deprecated. All functionality has been re-written into the mixer tool under
the `mixer build update` command. All development done around creating update
content consumed by swupd-client is now done in that project.
[1] https://github.com/clearlinux/mixer-tools
---
The swupd-server package provides a reference implementation of a software
update server-side component that generates update content consumable by a
software update client (swupd-client). Such content includes manifests that
+13 -13
View File
@@ -47,7 +47,7 @@ gendataCs() {
}
checkrenamed(){
local flags sh1 ver name fromsha1="bad" tosha1
local flags sha1 ver name fromsha1="bad" tosha1
# Check that $1 is renamed to $2
exec 9< $DIR/www/20/Manifest.test-bundle
# skip the header
@@ -58,11 +58,11 @@ checkrenamed(){
while read -r -u9 flags sha1 ver name
do
case "$flags" in
(?"dr"?) [ "$name" = "$1" ] && fromsha1=$sha1 ;;
(?".r"?) [ "$name" = "$2" ] && tosha1=$sha1 ;;
(?"d.r") [ "$name" = "$1" ] && fromsha1=$sha1 ;;
(?"..r") [ "$name" = "$2" ] && tosha1=$sha1 ;;
esac
done
if [ "$fromsh1" = "$tosha1" ] ; then return 0 ; else return 1 ; fi
if [ "$fromsha1" = "$tosha1" ] ; then return 0 ; else return 1 ; fi
}
# Guts of doing an update
@@ -87,7 +87,7 @@ do_an_update() {
gendataA 10 foo
gendataA 20 bar
do_an_update
checkrenamed foo bar
checkrenamed /foo /bar
}
@test "ignore rename detection for small files" {
@@ -142,8 +142,8 @@ do_an_update() {
gendataA 20 bar
gendataA 20 baz
do_an_update
checkrenamed foo bar
checkrenamed foz baz
checkrenamed /foo /bar
checkrenamed /foz /baz
}
@test "rename two files to two, one slightly different" {
@@ -153,8 +153,8 @@ do_an_update() {
gendataB 20 baz
do_an_update
# we don't actually know how the client we do this rename, but don't care
checkrenamed foo bar
checkrenamed foz baz
checkrenamed /foo /bar
checkrenamed /foz /baz
}
@test "rename two files to two, each pair slightly different" {
@@ -163,8 +163,8 @@ do_an_update() {
gendataA 20 bar
gendataB 20 baz
do_an_update
checkrenamed foo bar
checkrenamed foz baz
checkrenamed /foo /bar
checkrenamed /foz /baz
}
@test "rename two files to two, one very different" {
@@ -183,9 +183,9 @@ do_an_update() {
gendataA 20 bar
gendataCs 20 baz
do_an_update
run checkrenamed foo bar
run checkrenamed /foo /bar
if [ $status -eq 1 ] ; then
checkrenamed foz bar
checkrenamed /foz /bar
fi
}