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 11#! /bin/bash
2-
32echo " [INFO] Building mojo binaries.."
43
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+
510test_server () {
611 (magic run mojo build -D LB_LOG_LEVEL=DEBUG -I . --debug-level full tests/integration/integration_test_server.mojo) || exit 1
712
@@ -13,16 +18,8 @@ test_server() {
1318 echo " [INFO] Testing server with Python client"
1419 magic run python3 tests/integration/integration_client.py
1520
16- kill $!
17- wait $! 2> /dev/null
18-
1921 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"
2623}
2724
2825test_client () {
@@ -35,7 +32,7 @@ test_client() {
3532
3633 ./integration_test_client
3734 rm ./integration_test_client
38- kill_fastapi
35+ kill_server " fastapi dev "
3936}
4037
4138test_server
You can’t perform that action at this time.
0 commit comments