tests: Test install/updates with static deltas

This commit is contained in:
Alexander Larsson committed 2016-06-28 17:36:54 +02:00
1 parent 3d534a864a
commit ab64f70c59
5 files changed
+61

No files matched your search

+2
View File
@@ -97,6 +97,8 @@ dist_test_scripts = \
tests/test-basic.sh \
tests/test-run.sh \
tests/test-run-system.sh \
tests/test-run-deltas.sh \
tests/test-run-system-deltas.sh \
tests/test-bundle.sh \
tests/test-bundle-system.sh \
tests/test-builder.sh \
+11
View File
@@ -90,6 +90,10 @@ else
export U="--user"
fi
if [ x${USE_DELTAS-} == xyes ] ; then
export UPDATE_REPO_ARGS="--generate-static-deltas"
fi
export FLATPAK="${CMD_PREFIX} flatpak"
assert_streq () {
@@ -169,17 +173,24 @@ export FL_GPGARGS="--gpg-homedir=${FL_GPG_HOMEDIR} --gpg-sign=${FL_GPG_ID}"
setup_repo () {
GPGARGS="$FL_GPGARGS" . $(dirname $0)/make-test-runtime.sh org.test.Platform bash ls cat echo readlink > /dev/null
GPGARGS="$FL_GPGARGS" . $(dirname $0)/make-test-app.sh > /dev/null
update_repo
ostree trivial-httpd --autoexit --daemonize -p httpd-port .
port=$(cat httpd-port)
flatpak remote-add ${U} --gpg-import=${FL_GPG_HOMEDIR}/pubring.gpg test-repo "http://127.0.0.1:${port}/repo"
}
update_repo () {
${FLATPAK} build-update-repo $FL_GPGARGS ${UPDATE_REPO_ARGS-} repo
}
make_updated_app () {
GPGARGS="$FL_GPGARGS" . $(dirname $0)/make-test-app.sh UPDATED > /dev/null
update_repo
}
setup_sdk_repo () {
GPGARGS="$FL_GPGARGS" . $(dirname $0)/make-test-runtime.sh org.test.Sdk bash ls cat echo readlink make mkdir cp touch > /dev/null
update_repo
}
install_repo () {
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
#
# Copyright (C) 2011 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
export USE_DELTAS=yes
. $(dirname $0)/test-run.sh
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
#
# Copyright (C) 2011 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
export USE_SYSTEMDIR=yes
export USE_DELTAS=yes
. $(dirname $0)/test-run.sh
+3
View File
@@ -219,6 +219,7 @@ echo "nope" > ${DIR}/files/nope
${FLATPAK} build-finish --command=hello.sh ${DIR}
${FLATPAK} build-export ${FL_GPGARGS} repo ${DIR}
update_repo
${FLATPAK} ${U} install test-repo org.test.Split --subpath=/a --subpath=/b --subpath=/nosuchdir master
@@ -244,6 +245,7 @@ echo "f" > ${DIR}/files/f/data
rm -rf ${DIR}/files/b
${FLATPAK} build-export ${FL_GPGARGS} repo ${DIR}
update_repo
${FLATPAK} ${U} update --subpath=/a --subpath=/b --subpath=/e --subpath=/nosuchdir org.test.Split
@@ -263,6 +265,7 @@ assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/master/active/files/f
assert_not_has_file $FL_DIR/app/org.test.Split/$ARCH/master/active/files/nope
${FLATPAK} build-export ${FL_GPGARGS} repo ${DIR}
update_repo
# Test reusing the old subpath list
${FLATPAK} ${U} update org.test.Split