Skip to content

Commit

Permalink
tests: Fold test-basic.sh into test-run.sh
Browse files Browse the repository at this point in the history
It was never that useful, just a quick stub to get Travis going, which we don't
use right now.  Let's just move it into the `test-run.sh`.

Closes: #163
Approved by: alexlarsson
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Jan 26, 2017
1 parent e605e2d commit e3a3f15
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test_bwrap_SOURCES=

include Makefile-docs.am

TESTS = tests/test-basic.sh tests/test-run.sh
TESTS = tests/test-run.sh
TESTS_ENVIRONMENT = BWRAP=$(abs_top_builddir)/test-bwrap

EXTRA_DIST += $(TESTS)
Expand Down
35 changes: 0 additions & 35 deletions tests/test-basic.sh

This file was deleted.

8 changes: 7 additions & 1 deletion tests/test-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function cleanup () {
trap cleanup EXIT
cd ${tempdir}

: "${BWRAP:=bwrap}"

skip () {
echo $@ 1>&2; exit 77
}
Expand Down Expand Up @@ -47,12 +49,16 @@ if test -x `dirname $UNREADABLE`; then
fi

# Default arg, bind whole host fs to /, tmpfs on /tmp
RUN="${BWRAP:-bwrap} --bind / / --tmpfs /tmp"
RUN="${BWRAP} --bind / / --tmpfs /tmp"

if ! $RUN true; then
skip Seems like bwrap is not working at all. Maybe setuid is not working
fi

# Test help
${BWRAP} --help > help.txt
assert_file_has_content help.txt "usage: bwrap"

for ALT in "" "--unshare-user-try" "--unshare-pid" "--unshare-user-try --unshare-pid"; do
# Test fuse fs as bind source
if [ x$FUSE_DIR != x ]; then
Expand Down

0 comments on commit e3a3f15

Please sign in to comment.