tests: package_version.txt is in the $builddir

Signed-off-by: Simon McVittie <smcv@debian.org>
tingping/wmclass
Simon McVittie 2016-05-17 09:39:38 +01:00 committed by Alexander Larsson
parent 70e70d2f6a
commit d6b1c9ff3c
2 changed files with 7 additions and 7 deletions

View File

@ -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"

View File

@ -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