diff options
author | Simon McVittie <smcv@debian.org> | 2016-05-17 09:39:38 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-17 18:01:46 +0200 |
commit | d6b1c9ff3c325552f6b4154f3c3cccc0a5d4ad37 (patch) | |
tree | 1720d20bdf03e7e2a4bd853ba3a63a039076eac6 | |
parent | 70e70d2f6a23fadc192d9f97067fe48a28b4e6f2 (diff) | |
download | xdg-app-d6b1c9ff3c325552f6b4154f3c3cccc0a5d4ad37.tar.gz |
tests: package_version.txt is in the $builddir
Signed-off-by: Simon McVittie <smcv@debian.org>
-rwxr-xr-x | tests/test-basic.sh | 2 | ||||
-rwxr-xr-x | tests/test-run.sh | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-basic.sh b/tests/test-basic.sh index e074828..d8f770a 100755 --- a/tests/test-basic.sh +++ b/tests/test-basic.sh @@ -25,7 +25,7 @@ echo "1..3" ${FLATPAK} --version > version_out -VERSION=`cat $(dirname $0)/package_version.txt` +VERSION=`cat "$test_builddir/package_version.txt"` assert_file_has_content version_out "^flatpak $VERSION$" echo "ok version" diff --git a/tests/test-run.sh b/tests/test-run.sh index e59f278..09b3ec5 100755 --- a/tests/test-run.sh +++ b/tests/test-run.sh @@ -80,23 +80,23 @@ 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 &> /dev/null; then +if run_sh cat "${test_builddir}/package_version.txt" &> /dev/null; then assert_not_reached "Unexpectedly allowed to access file" fi -ARGS="--filesystem=$(dirname $0)" run_sh cat $(dirname $0)/package_version.txt > /dev/null -ARGS="--filesystem=host" run_sh cat $(dirname $0)/package_version.txt > /dev/null +ARGS="--filesystem=${test_builddir}" run_sh cat "${test_builddir}/package_version.txt" > /dev/null +ARGS="--filesystem=host" run_sh cat "${test_builddir}/package_version.txt" > /dev/null echo "ok namespaces" $FLATPAK override ${U} --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 "${test_builddir}/package_version.txt" &> /dev/null +if ARGS="--nofilesystem=host" run_sh cat "${test_builddir}/package_version.txt" &> /dev/null; then assert_not_reached "Unexpectedly allowed to access --nofilesystem=host file" fi $FLATPAK override ${U} --nofilesystem=host org.test.Hello -if run_sh cat $(dirname $0)/package_version.txt &> /dev/null; then +if run_sh cat "${test_builddir}/package_version.txt" &> /dev/null; then assert_not_reached "Unexpectedly allowed to access file" fi |