tests: Check error messages instead of "expected-fail", handle old parallel

This commit is contained in:
Colin Walters committed 2015-06-29 13:35:07 -04:00
1 parent c8c239f94c
commit 530631376e
3 files changed
+13 -6

No files matched your search

+4 -3
View File
@@ -204,9 +204,10 @@ ${CMD_PREFIX} ostree --repo=shadow-repo checkout "${parent_rev_test2}" test2-che
echo "ok checkout from shadow repo"
cd ${test_tmpdir}
rm -f expected-fail
$OSTREE checkout test2 --subpath /enoent 2>/dev/null || touch expected-fail
assert_has_file expected-fail
if $OSTREE checkout test2 --subpath /enoent 2>err.txt; then
assert_not_reached "checking outnonexistent file unexpectedly succeeded!"
fi
assert_file_has_content err.txt 'No such file or directory'
echo "ok subdir enoent"
cd ${test_tmpdir}
+6 -1
View File
@@ -39,8 +39,13 @@ echo "rev=${rev}"
${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
parallel_cmd=parallel
if parallel --help | grep -q -e --no-notice; then
parallel_cmd="${parallel_cmd} --no-notice"
fi
count=$(($(getconf _NPROCESSORS_ONLN) * 2))
seq "${count}" | parallel --no-notice -n0 ${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
seq "${count}" | ${parallel_cmd} -n0 ${CMD_PREFIX} ostree admin --sysroot=sysroot deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
${CMD_PREFIX} ostree admin --sysroot=sysroot status > status.txt
grep "testos ${rev}" status.txt | wc -l > status-matches.txt
+3 -2
View File
@@ -70,8 +70,9 @@ rm -rf repo
mkdir repo
${OSTREE} --repo=repo init --mode=archive-z2
${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo
${OSTREE} --repo=repo pull --mirror origin 2>/dev/null || touch expected-fail
assert_has_file expected-fail
if ${OSTREE} --repo=repo pull --mirror origin 2>err.txt; then
assert_not_reached "Mirroring unexpectedly succeeded"
fi
echo "ok pull mirror without signed summary"
${OSTREE} --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u ${COMMIT_SIGN}