File: nwtestjs.sh

package info (click to toggle)
node-nwmatcher 1.3.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 1,676 kB
  • ctags: 777
  • sloc: sh: 98; makefile: 27
file content (45 lines) | stat: -rwxr-xr-x 747 bytes parent folder | download
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
#!/bin/bash

echo -ne "NW: VM loading test, building test units..."

# retrieve build infos
VERSION=`cat ${SOURCES}build/VERSION`
REVISION=1

# set used variables
BASEDIR=`pwd`
PKGNAME="nwmatcher"
RELEASE=`date +%Y%m%d%H%M%S`

# set source
SOURCES=${1}
if [ "${SOURCES}x" == 'x' ]; then
  pushd . &> /dev/null
  cd ..; SOURCES=`pwd`
  popd &> /dev/null
fi

# check platform
PLATFORM=`uname -s`

if [ $PLATFORM == 'Darwin' ]; then
  JS=bin/js_macos
elif [ $PLATFORM == 'Linux' ]; then
  JS=bin/js_linux
elif [ $PLATFORM == 'Windows' ]; then
  JS=bin/js.exe
fi

pusdh . &> /dev/null

$JS test/jsvm/load_test.js < test/jsvm/load_test.html

if [ $? == '0' ]; then
  echo 'PASSED'
elif [ $? != '0' ]; then
  echo 'FAILED'
fi

popd &> /dev/null

exit 0