summaryrefslogtreecommitdiff
path: root/tests/make-test-app.sh
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2019-03-26 17:02:36 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2019-03-30 13:02:10 +0000
commit3d74d4b37fee1e381bcf8ef6abc25a495cbc4ea2 (patch)
tree22838a25eef30924ee268fa0bea2fada99053a9d /tests/make-test-app.sh
parent1ce532dad79ae9f4dd7ca907cd8d11a0f26a46e4 (diff)
downloadflatpak-3d74d4b37fee1e381bcf8ef6abc25a495cbc4ea2.tar.gz
tests: Add ability to test a branch other than master
This commit makes it so that a unit test can create the test app and runtime using a branch other than master, and changes test-run.sh to use the branch "stable". This will allow the run command to be tested better in the following commit. Closes: #2788 Approved by: matthiasclasen
Diffstat (limited to 'tests/make-test-app.sh')
-rwxr-xr-xtests/make-test-app.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh
index 86afd48d..5d42c7f7 100755
--- a/tests/make-test-app.sh
+++ b/tests/make-test-app.sh
@@ -8,6 +8,8 @@ REPO=$1
shift
APP_ID=$1
shift
+BRANCH=$1
+shift
COLLECTION_ID=$1
shift
@@ -23,8 +25,8 @@ ARCH=`flatpak --default-arch`
cat > ${DIR}/metadata <<EOF
[Application]
name=$APP_ID
-runtime=org.test.Platform/$ARCH/master
-sdk=org.test.Platform/$ARCH/master
+runtime=org.test.Platform/$ARCH/$BRANCH
+sdk=org.test.Platform/$ARCH/$BRANCH
[Extension org.test.Hello.Locale]
directory=share/runtime/locale
@@ -96,7 +98,7 @@ ln -s -t ${DIR}/files/share/locale ../../share/runtime/locale/fr/share/fr
flatpak build-finish --command=hello.sh ${DIR}
mkdir -p repos
-flatpak build-export --disable-sandbox ${collection_args} ${GPGARGS-} ${EXPORT_ARGS-} ${REPO} ${DIR}
+flatpak build-export --disable-sandbox ${collection_args} ${GPGARGS-} ${EXPORT_ARGS-} ${REPO} ${DIR} ${BRANCH}
rm -rf ${DIR}
# build a locale extension
@@ -109,7 +111,7 @@ cat > ${DIR}/metadata <<EOF
name=${APP_ID}.Locale
[ExtensionOf]
-ref=app/$APP_ID/$ARCH/master
+ref=app/$APP_ID/$ARCH/$BRANCH
EOF
cat > de.po <<EOF
@@ -127,7 +129,7 @@ msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po
flatpak build-finish ${DIR}
mkdir -p repos
-flatpak build-export --runtime ${collection_args} ${GPGARGS-} ${EXPORT_ARGS-} ${REPO} ${DIR}
+flatpak build-export --runtime ${collection_args} ${GPGARGS-} ${EXPORT_ARGS-} ${REPO} ${DIR} ${BRANCH}
rm -rf ${DIR}