test-local-pull: Sort find output to make test robust

There is no guarantee that find will produce output in the same
order, so we need to sort the output to ensure we always
get the same output.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
This commit is contained in:
Alexander Larsson 2014-12-08 20:26:58 +01:00
parent ac882f2128
commit e908ebd9b3
1 changed files with 3 additions and 3 deletions

View File

@ -44,13 +44,13 @@ echo "ok pull-local bare-user to z2"
# Verify the name + size + mode + type + symlink target + owner/group are the same # Verify the name + size + mode + type + symlink target + owner/group are the same
# for all checkouts # for all checkouts
${CMD_PREFIX} ostree checkout --repo repo test2 checkout1 ${CMD_PREFIX} ostree checkout --repo repo test2 checkout1
find checkout1 -printf '%P %s %#m %u/%g %y %l\n' > checkout1.files find checkout1 -printf '%P %s %#m %u/%g %y %l\n' | sort > checkout1.files
${CMD_PREFIX} ostree checkout --repo repo2 test2 checkout2 ${CMD_PREFIX} ostree checkout --repo repo2 test2 checkout2
find checkout2 -printf '%P %s %#m %u/%g %y %l\n' > checkout2.files find checkout2 -printf '%P %s %#m %u/%g %y %l\n' | sort > checkout2.files
${CMD_PREFIX} ostree checkout --repo repo3 test2 checkout3 ${CMD_PREFIX} ostree checkout --repo repo3 test2 checkout3
find checkout3 -printf '%P %s %#m %u/%g %y %l\n' > checkout3.files find checkout3 -printf '%P %s %#m %u/%g %y %l\n' | sort > checkout3.files
cmp checkout1.files checkout2.files cmp checkout1.files checkout2.files
cmp checkout1.files checkout3.files cmp checkout1.files checkout3.files