summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/testsuite/umlwrapper.sh
blob: e55e4dbd3ec44fcffeccabd787a356d1d3acd78f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Wrapper for User Mode Linux emulation environment

RUNFILE="$(pwd)/${1}.testroot"
if [ -z "$RUNFILE" ] || [ ! -x "$RUNFILE" ]
then
  echo "Can't run '$RUNFILE'"
  exit 1
fi

shift

if [ -z $(which linux) ]
then
  echo "No User Mode Linux."
  exit 1;
fi

linux rootfstype=hostfs rw init="$RUNFILE" TESTDIR=`pwd` PATH="$PATH" $* quiet