-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdmztest.sh
More file actions
executable file
·63 lines (55 loc) · 1.57 KB
/
dmztest.sh
File metadata and controls
executable file
·63 lines (55 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
# I would rather use pushd/popd but I can't tell if they are always available.
STARTDIR=`pwd`
for arg in $* ; do
if [ "$arg" = "-m" ] ; then
if [ "$DMZBINMODE" != "" ] ; then
echo "Only one binary mode may be specified during a unit test run"
exit -1
fi
MODEFOUND=true
elif [ "$MODEFOUND" = "true" -a "$DMZBINMODE" = "" ] ; then
DMZBINMODE=$arg
MODEFOUND=false
fi
done
if [ "$DMZBINMODE" = "" ] ; then
DMZBINMODE="debug"
fi
if [ `uname` = "Darwin" ] ; then
DMZPLATFORM="macos"
elif [ `uname` = "Linux" ] ; then
DMZPLATFORM="linux"
elif [ `uname -o` = "Cygwin" ] ; then
DMZPLATFORM="win32"
else
echo "Unsupported platform: " `uname`
exit -1 ;
fi
while [ "`pwd`" != "/" -a "$DMZBINPATH" = "" ] ; do
if [ -d ./lmkproject ] ; then
if [ ! -d ./bin/$DMZPLATFORM-$DMZBINMODE ] ; then
echo "Path: ./bin/$DMZPLATFORM-$DMZBINMODE does not exist, attempting to create."
# this should create the bin directory if it doesn't exist.
lmk -m $DMZBINMODE -b .
fi
DEPPATH=`pwd`/depend
PREVDIR=`pwd`
cd ./bin/$DMZPLATFORM-$DMZBINMODE
DMZBINPATH=`pwd`
cd $PREVDIR
fi
cd ..
done
if [ "$DMZPLATFORM" = "macos" ] ; then
export DYLD_LIBRARY_PATH=$DMZBINPATH:$DEPPATH/v8/lib:$DEPPATH/osg/lib:$DYLD_LIBRARY_PATH
elif [ "$DMZPLATFORM" = "linux" ] ; then
export LD_LIBRARY_PATH=$DMZBINPATH:$LD_LIBRARY_PATH
elif [ "$DMZPLATFORM" = "win32" ] ; then
echo "win32"
else
echo "Unknown platform type: $DMZPLATFORM"
exit -1 ;
fi
cd $STARTDIR
lmk -v -f test $*