Skip to content

Commit

Permalink
Launch test under UML in order to be able to use fuse on Travis infra…
Browse files Browse the repository at this point in the history
…structure
  • Loading branch information
Mathieu Clabaut committed Oct 11, 2015
1 parent c2bab6d commit f446f94
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ python:
# command to install dependencies
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y strace
- sudo apt-get install -y strace fuse libfuse-dev user-mode-linux
- sudo mknod /dev/fuse c 10 229; sudo chmod 666 /dev/fuse

install: "pip install -r test-requirement.txt"
# command to run tests
script: py.test
script: test/test_travis.sh py.test
25 changes: 25 additions & 0 deletions test/test_travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

PROGNAME=$1

CURDIR="`pwd`"

cat > umltest.inner.sh <<EOF
#!/bin/sh
(
set -e
set -x
insmod /usr/lib/uml/modules/\`uname -r\`/kernel/fs/fuse/fuse.ko
cd "$CURDIR"
./$PROGNAME
echo Success
)
echo "\$?" > "$CURDIR"/umltest.status
halt -f
EOF

chmod +x umltest.inner.sh

/usr/bin/linux.uml mem=256M init=`pwd`/umltest.inner.sh rootfstype=hostfs rw

exit $(<umltest.status)

0 comments on commit f446f94

Please sign in to comment.