forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into popzxc-920-refine-project-structure
- Loading branch information
Showing
51 changed files
with
4,108 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
trap cat_logs EXIT | ||
TIMEOUT_PID="" | ||
SERVER_PID="" | ||
|
||
function timeout() { | ||
sleep 300 | ||
echo Timeout is reached | ||
kill -s TERM "$1" | ||
} | ||
|
||
function cat_logs() { | ||
exitcode=$? | ||
echo Termination started | ||
|
||
# Wait for server to finish any ongoing jobs | ||
sleep 30 | ||
|
||
set +e | ||
pkill -P $TIMEOUT_PID,$SERVER_PID | ||
echo Server logs: | ||
cat zcli-test-server.log | ||
|
||
# Wait for server to be surely killed | ||
sleep 10 | ||
|
||
exit $exitcode | ||
} | ||
|
||
timeout "$$" & | ||
TIMEOUT_PID=$! | ||
|
||
zksync server &> zcli-test-server.log & | ||
SERVER_PID=$! | ||
|
||
sleep 10 | ||
echo Performing zcli tests... | ||
yarn --cwd infrastructure/zcli test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.