tests: Tweak staged-deploy test to be faster
Work around https://github.com/ostreedev/ostree/issues/1569 Closes: #1573 Approved by: jlebon
This commit is contained in:
parent
490cfbe226
commit
956618a188
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
- name: Write staged-deploy commit
|
- name: Write staged-deploy commit
|
||||||
shell: |
|
shell: |
|
||||||
ostree --repo=/ostree/repo commit --parent="${commit}" -b staged-deploy --tree=ref="${commit}" --no-bindings
|
cd /ostree/repo/tmp
|
||||||
|
# https://github.com/ostreedev/ostree/issues/1569
|
||||||
|
ostree checkout -H ${commit} t
|
||||||
|
ostree commit --no-bindings --parent="${commit}" -b staged-deploy -I --consume t
|
||||||
newcommit=$(ostree rev-parse staged-deploy)
|
newcommit=$(ostree rev-parse staged-deploy)
|
||||||
orig_mtime=$(stat -c '%.Y' /sysroot/ostree/deploy)
|
orig_mtime=$(stat -c '%.Y' /sysroot/ostree/deploy)
|
||||||
ostree admin deploy --stage staged-deploy
|
ostree admin deploy --stage staged-deploy
|
||||||
|
|
@ -51,7 +54,7 @@
|
||||||
shell: |
|
shell: |
|
||||||
ostree admin deploy --stage staged-deploy
|
ostree admin deploy --stage staged-deploy
|
||||||
test -f /run/ostree/staged-deployment
|
test -f /run/ostree/staged-deployment
|
||||||
ostree --repo=/ostree/repo commit --parent="${commit}" -b nonstaged-deploy --tree=ref="${commit}" --no-bindings
|
ostree --repo=/ostree/repo refs --create nonstaged-deploy "${commit}"
|
||||||
ostree admin deploy nonstaged-deploy
|
ostree admin deploy nonstaged-deploy
|
||||||
ostree admin status > status.txt
|
ostree admin status > status.txt
|
||||||
grep -vqFe '(staged)' status.txt
|
grep -vqFe '(staged)' status.txt
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue