File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
-
3
2
echo " [INFO] Building mojo binaries.."
4
3
4
+ kill_server () {
5
+ pid=$( ps aux | grep " $1 " | grep -v grep | awk ' {print $2}' | head -n 1)
6
+ kill $pid
7
+ wait $pid 2> /dev/null
8
+ }
9
+
5
10
test_server () {
6
11
(magic run mojo build -D LB_LOG_LEVEL=DEBUG -I . --debug-level full tests/integration/integration_test_server.mojo) || exit 1
7
12
@@ -13,16 +18,8 @@ test_server() {
13
18
echo " [INFO] Testing server with Python client"
14
19
magic run python3 tests/integration/integration_client.py
15
20
16
- kill $!
17
- wait $! 2> /dev/null
18
-
19
21
rm ./integration_test_server
20
- }
21
-
22
- kill_fastapi () {
23
- pids=$( ps aux | grep " fastapi dev" | grep -v grep | awk ' {print $2}' )
24
- kill $( echo $pids | head -n 1)
25
- kill $( echo $pids | head -n 2)
22
+ kill_server " integration_test_server"
26
23
}
27
24
28
25
test_client () {
@@ -35,7 +32,7 @@ test_client() {
35
32
36
33
./integration_test_client
37
34
rm ./integration_test_client
38
- kill_fastapi
35
+ kill_server " fastapi dev "
39
36
}
40
37
41
38
test_server
You can’t perform that action at this time.
0 commit comments