[ostree] tests: enforce ${CMD_PREFIX} on all ostree processes
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: enforce ${CMD_PREFIX} on all ostree processes
- Date: Tue, 3 Mar 2015 23:47:15 +0000 (UTC)
commit aea173b3f8845948006e3ac4a157f8f31d9ef5fb
Author: Giuseppe Scrivano <gscrivan redhat com>
Date: Tue Mar 3 13:13:54 2015 +0100
tests: enforce ${CMD_PREFIX} on all ostree processes
Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
tests/admin-test.sh | 74 +++++++++++-----------
tests/basic-test.sh | 20 +++---
tests/libtest.sh | 24 ++++----
tests/test-admin-deploy-2.sh | 4 +-
tests/test-admin-deploy-etcmerge-cornercases.sh | 36 ++++++------
tests/test-admin-deploy-karg.sh | 2 +-
tests/test-admin-deploy-switch.sh | 22 ++++----
tests/test-admin-upgrade-not-backwards.sh | 16 +++---
tests/test-admin-upgrade-unconfigured.sh | 14 ++--
tests/test-commit-sign.sh | 6 +-
tests/test-delta.sh | 4 +-
tests/test-gpg-signed-commit.sh | 2 +-
tests/test-libarchive.sh | 2 +-
tests/test-pull-large-metadata.sh | 4 +-
tests/test-pull-subpath.sh | 2 +-
15 files changed, 116 insertions(+), 116 deletions(-)
---
diff --git a/tests/admin-test.sh b/tests/admin-test.sh
index 49596ba..4278e01 100755
--- a/tests/admin-test.sh
+++ b/tests/admin-test.sh
@@ -20,12 +20,12 @@ set -e
echo "1..10"
-ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo
testos/buildmaster/x86_64-runtime
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
# This initial deployment gets kicked off with some kernel arguments
-ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot status | tee status.txt
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot status | tee status.txt
assert_file_has_content status.txt 'Version: 1.0.10'
if test -f sysroot/boot/loader/syslinux.cfg; then
@@ -34,7 +34,7 @@ fi
echo "ok deploy command"
-ostree admin --sysroot=sysroot --print-current-dir > curdir
+${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir > curdir
assert_file_has_content curdir ^`pwd`/sysroot/ostree/deploy/testos/deploy/${rev}.0$
echo "ok --print-current-dir"
@@ -48,12 +48,12 @@ assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'option
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel'
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/os-release 'NAME=TestOS'
assert_file_has_content sysroot/ostree/boot.1/testos/${bootcsum}/0/etc/os-release 'NAME=TestOS'
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok layout"
-ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
# Need a new bootversion, sine we now have two deployments
assert_has_dir sysroot/boot/loader.0
assert_not_has_dir sysroot/boot/loader.1
@@ -65,42 +65,42 @@ assert_not_has_dir sysroot/ostree/boot.1.1
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'options.* root=LABEL=MOO'
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.1/etc/os-release 'NAME=TestOS'
assert_file_has_content sysroot/ostree/boot.0/testos/${bootcsum}/0/etc/os-release 'NAME=TestOS'
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok second deploy"
-ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
# Keep the same bootversion
assert_has_dir sysroot/boot/loader.0
assert_not_has_dir sysroot/boot/loader.1
# But swap subbootversion
assert_has_dir sysroot/ostree/boot.0.0
assert_not_has_dir sysroot/ostree/boot.0.1
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok third deploy (swap)"
-ostree admin --sysroot=sysroot os-init otheros
+${CMD_PREFIX} ostree admin --sysroot=sysroot os-init otheros
-ostree admin --sysroot=sysroot deploy --os=otheros testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=otheros testos/buildmaster/x86_64-runtime
assert_not_has_dir sysroot/boot/loader.0
assert_has_dir sysroot/boot/loader.1
assert_has_file sysroot/boot/loader/entries/ostree-testos-1.conf
assert_has_file sysroot/boot/loader/entries/ostree-otheros-0.conf
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.1/etc/os-release 'NAME=TestOS'
assert_file_has_content sysroot/ostree/deploy/otheros/deploy/${rev}.0/etc/os-release 'NAME=TestOS'
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok independent deploy"
-ostree admin --sysroot=sysroot deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --retain --os=testos
testos:testos/buildmaster/x86_64-runtime
assert_has_dir sysroot/boot/loader.0
assert_not_has_dir sysroot/boot/loader.1
assert_has_file sysroot/boot/loader/entries/ostree-testos-0.conf
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.2/etc/os-release 'NAME=TestOS'
assert_has_file sysroot/boot/loader/entries/ostree-testos-2.conf
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/os-release 'NAME=TestOS'
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok fourth deploy (retain)"
@@ -108,51 +108,51 @@ echo "a new local config file" > sysroot/ostree/deploy/testos/deploy/${rev}.3/et
rm -r sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/testdirectory
rm sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/aconfigfile
ln -s /ENOENT sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/a-new-broken-symlink
-ostree admin --sysroot=sysroot deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --retain --os=testos
testos:testos/buildmaster/x86_64-runtime
linktarget=$(readlink sysroot/ostree/deploy/testos/deploy/${rev}.4/etc/a-new-broken-symlink)
test "${linktarget}" = /ENOENT
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/os-release 'NAME=TestOS'
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.4/etc/os-release 'NAME=TestOS'
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.4/etc/a-new-config-file 'a new local
config file'
assert_not_has_file sysroot/ostree/deploy/testos/deploy/${rev}.4/etc/aconfigfile
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok deploy with modified /etc"
os_repository_new_commit
-ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo
testos/buildmaster/x86_64-runtime
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
export newrev
assert_not_streq ${rev} ${newrev}
-ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'
# New files in /usr/etc
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/a-new-default-config-file "a new
default config file"
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/new-default-dir/moo "a new
default dir and file"
# And persist /etc changes from before
assert_not_has_file sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/aconfigfile
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok upgrade bare"
os_repository_new_commit
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo
testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot upgrade --os=testos
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos
file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
origrev=${rev}
rev=${newrev}
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_not_streq ${rev} ${newrev}
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok upgrade"
-originfile=$(ostree admin --sysroot=sysroot --print-current-dir).origin
+originfile=$(${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir).origin
cp ${originfile} saved-origin
-ostree admin --sysroot=sysroot set-origin --index=0 bacon --set=gpg-verify=false http://tasty.com
+${CMD_PREFIX} ostree admin --sysroot=sysroot set-origin --index=0 bacon --set=gpg-verify=false
http://tasty.com
assert_file_has_content "${originfile}" "bacon:testos/buildmaster/x86_64-runtime"
-ostree --repo=sysroot/ostree/repo remote list -u > remotes.txt
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote list -u > remotes.txt
assert_file_has_content remotes.txt 'bacon.*http://tasty.com'
cp saved-origin ${originfile}
@@ -160,31 +160,31 @@ echo "ok set-origin"
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/os-release 'NAME=TestOS'
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'
-ostree admin --sysroot=sysroot undeploy 1
+${CMD_PREFIX} ostree admin --sysroot=sysroot undeploy 1
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'
assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
-ostree admin --sysroot=sysroot undeploy 0
+${CMD_PREFIX} ostree admin --sysroot=sysroot undeploy 0
assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${newrev}.0
-ostree admin --sysroot=sysroot status
+${CMD_PREFIX} ostree admin --sysroot=sysroot status
echo "ok undeploy"
-if ostree admin --sysroot=sysroot deploy --os=unknown testos:testos/buildmaster/x86_64-runtime; then
+if ${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=unknown
testos:testos/buildmaster/x86_64-runtime; then
assert_not_reached "Unexpected successful deploy of unknown OS"
fi
echo "ok deploy with unknown OS"
-ostree admin --sysroot=sysroot deploy --os=testos --karg-append=console=/dev/foo
--karg-append=console=/dev/bar testos:testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=testos --karg-append=console=/dev/foo
--karg-append=console=/dev/bar testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --os=testos testos:testos/buildmaster/x86_64-runtime
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'console=/dev/foo.*console=/dev/bar'
echo "ok deploy with multiple kernel args"
-origrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+origrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
os_repository_new_commit 0 "test upgrade multiple kernel args"
-ostree admin --sysroot=sysroot upgrade --os=testos
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_not_streq ${origrev} ${newrev}
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'console=/dev/foo.*console=/dev/bar'
diff --git a/tests/basic-test.sh b/tests/basic-test.sh
index 007d7ce..da62c0d 100755
--- a/tests/basic-test.sh
+++ b/tests/basic-test.sh
@@ -38,7 +38,7 @@ $OSTREE rev-parse $partial > partial-results
assert_file_has_content checksum $(cat partial-results)
echo "ok shortened checksum"
-(cd repo && ostree rev-parse test2)
+(cd repo && ${CMD_PREFIX} ostree rev-parse test2)
echo "ok repo-in-cwd"
$OSTREE refs > reflist
@@ -199,7 +199,7 @@ mkdir shadow-repo
${CMD_PREFIX} ostree --repo=shadow-repo init
${CMD_PREFIX} ostree --repo=shadow-repo config set core.parent $(pwd)/repo
rm -rf test2-checkout
-parent_rev_test2=$(ostree --repo=repo rev-parse test2)
+parent_rev_test2=$(${CMD_PREFIX} ostree --repo=repo rev-parse test2)
${CMD_PREFIX} ostree --repo=shadow-repo checkout "${parent_rev_test2}" test2-checkout
echo "ok checkout from shadow repo"
@@ -217,14 +217,14 @@ cd ${test_tmpdir}
mkdir repo3
${CMD_PREFIX} ostree --repo=repo3 init
${CMD_PREFIX} ostree --repo=repo3 pull-local --remote=aremote repo test2
-ostree --repo=repo3 rev-parse aremote/test2
+${CMD_PREFIX} ostree --repo=repo3 rev-parse aremote/test2
echo "ok pull-local with --remote arg"
cd ${test_tmpdir}
-ostree --repo=repo3 prune
+${CMD_PREFIX} ostree --repo=repo3 prune
find repo3/objects -name '*.commit' > objlist-before-prune
rm repo3/refs/heads/* repo3/refs/remotes/* -rf
-ostree --repo=repo3 prune --refs-only
+${CMD_PREFIX} ostree --repo=repo3 prune --refs-only
find repo3/objects -name '*.commit' > objlist-after-prune
if cmp -s objlist-before-prune objlist-after-prune; then
echo "Prune didn't delete anything!"; exit 1
@@ -238,7 +238,7 @@ ${CMD_PREFIX} ostree --repo=repo3 init --mode=archive-z2
${CMD_PREFIX} ostree --repo=repo3 pull-local --remote=aremote repo test2
rm repo3/refs/remotes -rf
mkdir repo3/refs/remotes
-ostree --repo=repo3 prune --refs-only
+${CMD_PREFIX} ostree --repo=repo3 prune --refs-only
find repo3/objects -name '*.filez' > file-objects
if test -s file-objects; then
assert_not_reached "prune didn't delete all objects"
@@ -247,10 +247,10 @@ echo "ok prune in archive-z2 deleted everything"
cd ${test_tmpdir}
$OSTREE commit -b test3 -s "Another commit" --tree=ref=test2
-ostree --repo=repo refs > reflist
+${CMD_PREFIX} ostree --repo=repo refs > reflist
assert_file_has_content reflist '^test3$'
-ostree --repo=repo refs --delete test3
-ostree --repo=repo refs > reflist
+${CMD_PREFIX} ostree --repo=repo refs --delete test3
+${CMD_PREFIX} ostree --repo=repo refs > reflist
assert_not_file_has_content reflist '^test3$'
echo "ok reflist --delete"
@@ -323,7 +323,7 @@ rm repo2 -rf
mkdir repo2
${CMD_PREFIX} ostree --repo=repo2 init
${CMD_PREFIX} ostree --repo=repo2 pull-local repo
-ostree --repo=repo2 show --print-detached-metadata-key=SIGNATURE test2 > test2-meta
+${CMD_PREFIX} ostree --repo=repo2 show --print-detached-metadata-key=SIGNATURE test2 > test2-meta
assert_file_has_content test2-meta "HANCOCK"
echo "ok pull-local after commit metadata"
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 905c8cb..5879ac8 100644
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -162,12 +162,12 @@ setup_fake_remote_repo1() {
mkdir ${test_tmpdir}/httpd
cd httpd
ln -s ${test_tmpdir}/ostree-srv ostree
- ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port $args
+ ${CMD_PREFIX} ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port $args
port=$(cat ${test_tmpdir}/httpd-port)
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
cd ${oldpwd}
- export OSTREE="ostree --repo=repo"
+ export OSTREE="${CMD_PREFIX} ostree --repo=repo"
}
setup_os_boot_syslinux() {
@@ -199,9 +199,9 @@ setup_os_repository () {
cd ${test_tmpdir}
mkdir testos-repo
if test -n "$mode"; then
- ostree --repo=testos-repo init --mode=${mode}
+ ${CMD_PREFIX} ostree --repo=testos-repo init --mode=${mode}
else
- ostree --repo=testos-repo init
+ ${CMD_PREFIX} ostree --repo=testos-repo init
fi
cd ${test_tmpdir}
@@ -232,26 +232,26 @@ EOF
mkdir -p usr/etc/testdirectory
echo "a default daemon file" > usr/etc/testdirectory/test
- ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b
testos/buildmaster/x86_64-runtime -s "Build"
+ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b
testos/buildmaster/x86_64-runtime -s "Build"
# Ensure these commits have distinct second timestamps
sleep 2
echo "a new executable" > usr/bin/sh
- ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b
testos/buildmaster/x86_64-runtime -s "Build"
+ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b
testos/buildmaster/x86_64-runtime -s "Build"
cd ${test_tmpdir}
cp -a osdata osdata-devel
cd osdata-devel
mkdir -p usr/include
echo "a development header" > usr/include/foo.h
- ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b
testos/buildmaster/x86_64-devel -s "Build"
+ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b
testos/buildmaster/x86_64-devel -s "Build"
- ostree --repo=${test_tmpdir}/testos-repo fsck -q
+ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo fsck -q
cd ${test_tmpdir}
mkdir sysroot
- ostree admin --sysroot=sysroot init-fs sysroot
- ostree admin --sysroot=sysroot os-init testos
+ ${CMD_PREFIX} ostree admin --sysroot=sysroot init-fs sysroot
+ ${CMD_PREFIX} ostree admin --sysroot=sysroot os-init testos
case $bootmode in
"syslinux")
@@ -266,7 +266,7 @@ EOF
mkdir ${test_tmpdir}/httpd
cd httpd
ln -s ${test_tmpdir} ostree
- ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port $args
+ ${CMD_PREFIX} ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port $args
port=$(cat ${test_tmpdir}/httpd-port)
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
cd ${oldpwd}
@@ -300,6 +300,6 @@ os_repository_new_commit ()
version=$(date "+%Y%m%d.${content_iteration}")
- ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string "version=${version}" -b
testos/buildmaster/x86_64-runtime -s "Build"
+ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string
"version=${version}" -b testos/buildmaster/x86_64-runtime -s "Build"
cd ${test_tmpdir}
}
diff --git a/tests/test-admin-deploy-2.sh b/tests/test-admin-deploy-2.sh
index 0d7ccf0..baefc6e 100755
--- a/tests/test-admin-deploy-2.sh
+++ b/tests/test-admin-deploy-2.sh
@@ -30,7 +30,7 @@ echo "ok setup"
echo "1..2"
ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
# This initial deployment gets kicked off with some kernel arguments
ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
@@ -49,7 +49,7 @@ bootcsum3=${bootcsum}
ostree admin --sysroot=sysroot upgrade --os=testos
rev=${newrev}
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_not_streq ${rev} ${newrev}
assert_not_streq ${bootcsum1} ${bootcsum2}
assert_not_streq ${bootcsum2} ${bootcsum3}
diff --git a/tests/test-admin-deploy-etcmerge-cornercases.sh b/tests/test-admin-deploy-etcmerge-cornercases.sh
index 1464fb6..2480ee9 100644
--- a/tests/test-admin-deploy-etcmerge-cornercases.sh
+++ b/tests/test-admin-deploy-etcmerge-cornercases.sh
@@ -29,12 +29,12 @@ echo "ok setup"
echo "1..2"
-ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo
testos/buildmaster/x86_64-runtime
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
echo "rev=${rev}"
# This initial deployment gets kicked off with some kernel arguments
-ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
etc=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc
@@ -59,9 +59,9 @@ rm ${etc}/testdirectory -rf
# Now deploy a new commit
os_repository_new_commit
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo
testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot upgrade --os=testos
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos
file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
echo "newrev=${newrev}"
newroot=sysroot/ostree/deploy/testos/deploy/${newrev}.0
newetc=${newroot}/etc
@@ -95,35 +95,35 @@ echo "ok"
# Add /etc/initially-empty
cd "${test_tmpdir}/osdata"
mkdir -p usr/etc/initially-empty
-ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory"
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add
empty directory"
cd ${test_tmpdir}
# Upgrade, check that we have it
-ostree admin --sysroot=sysroot upgrade --os=testos
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_has_dir sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty
# Now add a two files in initially-empty
cd "${test_tmpdir}/osdata"
touch usr/etc/initially-empty/{afile,bfile}
-ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory"
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add
empty directory"
# Upgrade, check that we have the two new files
cd ${test_tmpdir}
-ostree admin --sysroot=sysroot upgrade --os=testos
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/afile
assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/bfile
# Replace config file with default directory
cd "${test_tmpdir}/osdata"
mkdir usr/etc/somenewdir
-ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add default dir"
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add
default dir"
cd ${test_tmpdir}
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
newconfpath=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/somenewdir
echo "some content blah" > ${newconfpath}
-if ostree admin --sysroot=sysroot upgrade --os=testos 2>err.txt; then
+if ${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos 2>err.txt; then
assert_not_reached "upgrade should have failed"
fi
assert_file_has_content err.txt "Modified config file newly defaults to directory"
@@ -132,12 +132,12 @@ rm ${newconfpath}
# Remove parent directory of modified config file
cd "${test_tmpdir}/osdata"
rm -rf usr/etc/initially-empty
-ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Remove default dir"
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s
"Remove default dir"
cd ${test_tmpdir}
newconfpath=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/initially-empty/mynewfile
touch ${newconfpath}
-ostree admin --sysroot=sysroot upgrade --os=testos
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_not_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/usr/etc/initially-empty
assert_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/initially-empty/mynewfile
rm ${newconfpath}
diff --git a/tests/test-admin-deploy-karg.sh b/tests/test-admin-deploy-karg.sh
index 2a75081..ec48198 100644
--- a/tests/test-admin-deploy-karg.sh
+++ b/tests/test-admin-deploy-karg.sh
@@ -30,7 +30,7 @@ echo "ok setup"
echo "1..1"
ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
# This initial deployment gets kicked off with some kernel arguments
ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
diff --git a/tests/test-admin-deploy-switch.sh b/tests/test-admin-deploy-switch.sh
index 03ec9dd..db4b921 100755
--- a/tests/test-admin-deploy-switch.sh
+++ b/tests/test-admin-deploy-switch.sh
@@ -29,30 +29,30 @@ echo "ok setup"
echo "1..3"
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo
-ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos
file://$(pwd)/testos-repo
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
assert_not_has_file sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h
-if ostree admin --sysroot=sysroot switch --os=testos testos/buildmaster/x86_64-runtime; then
+if ${CMD_PREFIX} ostree admin --sysroot=sysroot switch --os=testos testos/buildmaster/x86_64-runtime; then
assert_not_reached "Switch to same ref unexpectedly succeeded"
fi
echo "ok switch expected error"
-ostree admin --sysroot=sysroot switch --os=testos testos/buildmaster/x86_64-devel
-newrev=$(ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-devel)
+${CMD_PREFIX} ostree admin --sysroot=sysroot switch --os=testos testos/buildmaster/x86_64-devel
+newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-devel)
assert_file_has_content sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h 'header'
echo "ok switch"
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false anothertestos file://$(pwd)/testos-repo
-ostree admin --sysroot=sysroot switch --os=testos anothertestos:testos/buildmaster/x86_64-devel
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false anothertestos
file://$(pwd)/testos-repo
+${CMD_PREFIX} ostree admin --sysroot=sysroot switch --os=testos anothertestos:testos/buildmaster/x86_64-devel
# Ok this is lame, need a better shell command to extract config, or switch to gjs
-ostree admin --sysroot=sysroot status > status.txt
+${CMD_PREFIX} ostree admin --sysroot=sysroot status > status.txt
assert_file_has_content status.txt anothertestos
echo "ok switch remotes"
-ostree admin --sysroot=sysroot switch --os=testos testos:
+${CMD_PREFIX} ostree admin --sysroot=sysroot switch --os=testos testos:
echo "ok switch remote only"
diff --git a/tests/test-admin-upgrade-not-backwards.sh b/tests/test-admin-upgrade-not-backwards.sh
index 6ea988b..0114e78 100644
--- a/tests/test-admin-upgrade-not-backwards.sh
+++ b/tests/test-admin-upgrade-not-backwards.sh
@@ -30,28 +30,28 @@ echo "ok setup"
echo "1..2"
cd ${test_tmpdir}
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat
httpd-address)/ostree/testos-repo
-ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat
httpd-address)/ostree/testos-repo
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
echo "rev=${rev}"
# This initial deployment gets kicked off with some kernel arguments
-ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
# This should be a no-op
-ostree admin --sysroot=sysroot upgrade --os=testos
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos
# Now reset to an older revision
-ostree --repo=${test_tmpdir}/testos-repo reset testos/buildmaster/x86_64-runtime{,^}
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo reset testos/buildmaster/x86_64-runtime{,^}
-if ostree admin --sysroot=sysroot upgrade --os=testos 2>upgrade-err.txt; then
+if ${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos 2>upgrade-err.txt; then
assert_not_reached 'upgrade unexpectedly succeeded'
fi
assert_file_has_content upgrade-err.txt 'chronologically older'
echo 'ok upgrade will not go backwards'
-ostree admin --sysroot=sysroot upgrade --os=testos --allow-downgrade
+${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos --allow-downgrade
echo 'ok upgrade backwards'
diff --git a/tests/test-admin-upgrade-unconfigured.sh b/tests/test-admin-upgrade-unconfigured.sh
index 821fa10..b7f6b6c 100644
--- a/tests/test-admin-upgrade-unconfigured.sh
+++ b/tests/test-admin-upgrade-unconfigured.sh
@@ -29,23 +29,23 @@ echo "ok setup"
echo "1..2"
-ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
-rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo
testos/buildmaster/x86_64-runtime
+rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
echo "rev=${rev}"
# This initial deployment gets kicked off with some kernel arguments
-ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos
testos:testos/buildmaster/x86_64-runtime
echo "unconfigured-state=Use \"subscription-manager\" to enable online updates for example.com OS" >>
sysroot/ostree/deploy/testos/deploy/${rev}.0.origin
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo
testos/buildmaster/x86_64-runtime
-if ostree admin --sysroot=sysroot upgrade --os=testos 2>err.txt; then
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos
file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
+if ${CMD_PREFIX} ostree admin --sysroot=sysroot upgrade --os=testos 2>err.txt; then
assert_not_reached "upgrade unexpectedly succeeded"
fi
assert_file_has_content err.txt "Use.*subscription.*online"
echo "ok error"
-ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false otheros file://$(pwd)/testos-repo
testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot switch --os=testos otheros:testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false otheros
file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
+${CMD_PREFIX} ostree admin --sysroot=sysroot switch --os=testos otheros:testos/buildmaster/x86_64-runtime
echo "ok switch"
diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh
index 5e4baff..7848324 100755
--- a/tests/test-commit-sign.sh
+++ b/tests/test-commit-sign.sh
@@ -19,7 +19,7 @@
set -e
-if ! ostree --version | grep -q -e '\+gpgme'; then
+if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
exit 77
fi
@@ -51,12 +51,12 @@ cd ${test_tmpdir}
mkdir ${test_tmpdir}/httpd
cd httpd
ln -s ${test_tmpdir}/ostree-srv ostree
-ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port
+${CMD_PREFIX} ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port
port=$(cat ${test_tmpdir}/httpd-port)
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
cd ${oldpwd}
-export OSTREE="ostree --repo=repo"
+export OSTREE="${CMD_PREFIX} ostree --repo=repo"
repopath=${test_tmpdir}/ostree-srv/gnomerepo
cp -a ${repopath} ${repopath}.orig
diff --git a/tests/test-delta.sh b/tests/test-delta.sh
index f5bb802..3414dfe 100755
--- a/tests/test-delta.sh
+++ b/tests/test-delta.sh
@@ -55,7 +55,7 @@ function permuteDirectory() {
done
}
-origrev=$(ostree --repo=repo rev-parse test)
+origrev=$(${CMD_PREFIX} ostree --repo=repo rev-parse test)
ostree --repo=repo static-delta generate --empty --to=${origrev}
ostree --repo=repo static-delta list | grep ${origrev} || exit 1
@@ -65,7 +65,7 @@ ostree --repo=repo static-delta list | grep ${origrev} || exit 1
permuteDirectory 1 files
ostree --repo=repo commit -b test -s test --tree=dir=files
-newrev=$(ostree --repo=repo rev-parse test)
+newrev=$(${CMD_PREFIX} ostree --repo=repo rev-parse test)
ostree --repo=repo static-delta generate --from=${origrev} --to=${newrev}
ostree --repo=repo static-delta list | grep ${origrev}-${newrev} || exit 1
diff --git a/tests/test-gpg-signed-commit.sh b/tests/test-gpg-signed-commit.sh
index a3d1ad3..dc39d09 100644
--- a/tests/test-gpg-signed-commit.sh
+++ b/tests/test-gpg-signed-commit.sh
@@ -19,7 +19,7 @@
set -e
-if ! ostree --version | grep -q -e '\+gpgme'; then
+if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
exit 77
fi
diff --git a/tests/test-libarchive.sh b/tests/test-libarchive.sh
index 38c9aff..c875f6b 100755
--- a/tests/test-libarchive.sh
+++ b/tests/test-libarchive.sh
@@ -19,7 +19,7 @@
set -e
-if ! ostree --version | grep -q -e '\+libarchive'; then
+if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+libarchive'; then
exit 77
fi
diff --git a/tests/test-pull-large-metadata.sh b/tests/test-pull-large-metadata.sh
index 9b97b82..f86ce4b 100644
--- a/tests/test-pull-large-metadata.sh
+++ b/tests/test-pull-large-metadata.sh
@@ -27,7 +27,7 @@ echo '1..1'
# Overwrite the commit object with 20 M of
cd ${test_tmpdir}
-rev=$(cd ostree-srv && ostree --repo=gnomerepo rev-parse main)
+rev=$(cd ostree-srv && ${CMD_PREFIX} ostree --repo=gnomerepo rev-parse main)
dd if=/dev/zero bs=1M count=20 of=ostree-srv/gnomerepo/objects/$(echo $rev | cut -b 1-2)/$(echo $rev | cut
-b 3-).commit
cd ${test_tmpdir}
@@ -35,7 +35,7 @@ mkdir repo
${CMD_PREFIX} ostree --repo=repo init
${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat
httpd-address)/ostree/gnomerepo
-if ostree --repo=repo pull origin main 2>pulllog.txt 1>&2; then
+if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>pulllog.txt 1>&2; then
assert_not_reached "pull unexpectedly succeeded!"
fi
assert_file_has_content pulllog.txt "exceeded maximum"
diff --git a/tests/test-pull-subpath.sh b/tests/test-pull-subpath.sh
index 7e1bca5..f2abbb3 100644
--- a/tests/test-pull-subpath.sh
+++ b/tests/test-pull-subpath.sh
@@ -43,7 +43,7 @@ if ${CMD_PREFIX} ostree --repo=repo ls origin:main /firstfile 2>err.txt; then
assert_not_reached
fi
assert_file_has_content err.txt "Couldn't find file object"
-rev=$(ostree --repo=repo rev-parse origin:main)
+rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse origin:main)
assert_has_file repo/state/${rev}.commitpartial
${CMD_PREFIX} ostree --repo=repo pull origin main
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]