~panda-roux/MoonGem

ref: fee4c7c3300f74d8444be03923034bd4973258aa MoonGem/test/run-tests.sh -rwxr-xr-x 524 bytes
fee4c7c3 — panda-roux adding a testing framework 7 months ago
                                                                                
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
#!/bin/sh

if [ -d "./env" ]; then

  # build moongem if it's not built already
  mkdir -p ../build
  pushd ../build
  cmake -DCMAKE_BUILD_TYPE=Release ..
  make -j moongem
  popd

  # run the server and fork
  ../build/moongem -p 1966 -c cert.pem -k key.pem -r root/ >/dev/null &
  mgpid=$!

  echo "Server PID: $mgpid"

  # run test script
  source env/bin/activate
  python test.py
  deactivate

  # kill the server
  kill -s TERM $mgpid
else
  echo "Run setup.sh first in order to configure the testing environment."
fi