summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-05-02 16:16:06 +0200
committerAlexander Larsson <alexl@redhat.com>2016-05-02 16:26:47 +0200
commitb3d854f507782249592e2c36fce6e9ebf24cd3f2 (patch)
tree503f2bf10f167fb579796ed862b87bf437b729c9 /tests
parentd680da8d5906de1bfd8f4ed047e6d8a29660a656 (diff)
downloadxdg-app-b3d854f507782249592e2c36fce6e9ebf24cd3f2.tar.gz
tests: Fix installed tests
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am.inc3
-rwxr-xr-xtests/test-basic.sh2
-rwxr-xr-xtests/test-builder.sh8
-rwxr-xr-xtests/test-run.sh22
-rw-r--r--tests/test.json2
5 files changed, 21 insertions, 16 deletions
diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc
index 7692bea..9b18e4b 100644
--- a/tests/Makefile.am.inc
+++ b/tests/Makefile.am.inc
@@ -50,6 +50,7 @@ tests/test-basic.sh: tests/package_version.txt
installed_test_SCRIPTS += \
buildutil/tap-driver.sh \
+ tests/configure.test \
tests/package_version.txt \
tests/make-test-app.sh \
tests/make-test-runtime.sh \
@@ -59,7 +60,7 @@ installed_test_SCRIPTS += \
installed_test_data = \
tests/org.test.Hello.png \
- tests/configure.test \
+ tests/test.json \
tests/session.conf.in \
$(NULL)
diff --git a/tests/test-basic.sh b/tests/test-basic.sh
index 9b359d3..89466ba 100755
--- a/tests/test-basic.sh
+++ b/tests/test-basic.sh
@@ -36,6 +36,6 @@ assert_file_has_content help_out "^Usage:$"
echo "ok help"
-${XDG_APP} --default-arch
+${XDG_APP} --default-arch > /dev/null
echo "ok default arch"
diff --git a/tests/test-builder.sh b/tests/test-builder.sh
index a7d9d02..e076ab5 100755
--- a/tests/test-builder.sh
+++ b/tests/test-builder.sh
@@ -28,9 +28,13 @@ install_repo
setup_sdk_repo
install_sdk_repo
+# Need /var/tmp cwd for xattrs
+REPO=`pwd`/repo
+cd $TEST_DATA_DIR/
+
cp -a $(dirname $0)/configure.test .
echo "version1" > app-data
-xdg-app-builder --repo=repo --force-clean appdir $(dirname $0)/test.json
+xdg-app-builder --repo=$REPO --force-clean appdir $(dirname $0)/test.json > /dev/null
assert_file_has_content appdir/files/share/app-data version1
assert_file_has_content appdir/metadata shared=network;
@@ -56,7 +60,7 @@ assert_file_has_content app_data_1 version1
echo "ok install+run"
echo "version2" > app-data
-xdg-app-builder --repo=repo --force-clean appdir $(dirname $0)/test.json
+xdg-app-builder --repo=$REPO --force-clean appdir $(dirname $0)/test.json > /dev/null
assert_file_has_content appdir/files/share/app-data version2
${XDG_APP} --user update org.test.Hello2 master
diff --git a/tests/test-run.sh b/tests/test-run.sh
index 6c758b3..493b844 100755
--- a/tests/test-run.sh
+++ b/tests/test-run.sh
@@ -49,14 +49,14 @@ assert_file_has_content $USERDIR/exports/share/applications/mimeinfo.cache x-tes
assert_has_file $USERDIR/exports/share/icons/hicolor/icon-theme.cache
assert_has_file $USERDIR/exports/share/icons/hicolor/index.theme
-$XDG_APP list --user | grep org.test.Hello
-$XDG_APP list --user -d | grep org.test.Hello | grep test-repo
-$XDG_APP list --user -d | grep org.test.Hello | grep current
-$XDG_APP list --user -d | grep org.test.Hello | grep ${ID:0:12}
+$XDG_APP list --user | grep org.test.Hello > /dev/null
+$XDG_APP list --user -d | grep org.test.Hello | grep test-repo > /dev/null
+$XDG_APP list --user -d | grep org.test.Hello | grep current > /dev/null
+$XDG_APP list --user -d | grep org.test.Hello | grep ${ID:0:12} > /dev/null
-$XDG_APP info --user org.test.Hello
-$XDG_APP info --user org.test.Hello | grep test-repo
-$XDG_APP info --user org.test.Hello | grep $ID
+$XDG_APP info --user org.test.Hello > /dev/null
+$XDG_APP info --user org.test.Hello | grep test-repo > /dev/null
+$XDG_APP info --user org.test.Hello | grep $ID > /dev/null
echo "ok install"
@@ -80,7 +80,7 @@ ARGS="--share=ipc" run_sh readlink /proc/self/ns/ipc > shared_ipc_ns
assert_not_streq `cat unshared_ipc_ns` `readlink /proc/self/ns/ipc`
assert_streq `cat shared_ipc_ns` `readlink /proc/self/ns/ipc`
-if run_sh cat $(dirname $0)/package_version.txt; then
+if run_sh cat $(dirname $0)/package_version.txt &> /dev/null; then
assert_not_reached "Unexpectedly allowed to access file"
fi
@@ -90,13 +90,13 @@ ARGS="--filesystem=host" run_sh cat $(dirname $0)/package_version.txt > /dev/nul
echo "ok namespaces"
$XDG_APP override --user --filesystem=host org.test.Hello
-run_sh cat $(dirname $0)/package_version.txt > /dev/null
-if ARGS="--nofilesystem=host" run_sh cat $(dirname $0)/package_version.txt > /dev/null; then
+run_sh cat $(dirname $0)/package_version.txt &> /dev/null
+if ARGS="--nofilesystem=host" run_sh cat $(dirname $0)/package_version.txt &> /dev/null; then
assert_not_reached "Unexpectedly allowed to access --nofilesystem=host file"
fi
$XDG_APP override --user --nofilesystem=host org.test.Hello
-if run_sh cat $(dirname $0)/package_version.txt > /dev/null; then
+if run_sh cat $(dirname $0)/package_version.txt &> /dev/null; then
assert_not_reached "Unexpectedly allowed to access file"
fi
diff --git a/tests/test.json b/tests/test.json
index fdab276..7f12149 100644
--- a/tests/test.json
+++ b/tests/test.json
@@ -29,7 +29,7 @@
"type": "file",
"path": "configure.test",
"dest-filename": "configure",
- "sha256": "fb62c2826dbd2fda27e878490e3f1f9081b1b69a2211e125ae79cf552a7a2254"
+ "sha256": "ce0a7014057cc45ac6cfa4b84fe848d46b1225f4ce03f1b52d5ab73521816cbf"
},
{
"type": "file",