forked from AToMPM/atompm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_tests.sh
executable file
·56 lines (42 loc) · 937 Bytes
/
run_tests.sh
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
#!/bin/bash
#exit on errors
set -e
#run server
echo "Starting server..."
node httpwsd.js &
serverpid=$!
sleep 3
#check if server is dead
if ! kill -0 "$serverpid"; then
wait $serverpid
server_status=$?
exit $server_status
fi
#run mt script
echo "Starting model transformation script..."
python3 mt/main.py &
mtpid=$!
sleep 3
#check if model transformer is dead
if ! kill -0 "$mtpid"; then
wait $mtpid
mt_status=$?
exit $mt_status
fi
#echo "Starting Selenium server."
#java -jar "./node_modules/selenium-server/lib/runner/selenium-server-standalone-3.141.59.jar" &
#seleniumpid=$!
#sleep 3
#check if selenium server is dead
#if ! kill -0 "$seleniumpid"; then
# wait seleniumpid
# se_status=$?
# exit $se_status
#fi
echo "Starting tests..."
./node_modules/nightwatch/bin/nightwatch
echo "Stopping server and mt script..."
kill "$serverpid"
kill "$mtpid"
#kill "$seleniumpid"
echo "Finished!"