File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ addopts = --bitcoind-version v22.0.0 --elementsd-version v0.21.0.2
55markers =
66 slow: mark test as slow.
77 elm: mark test as elementsd dependent
8- # log_cli = 1
8+ # If you need live logging to debug, uncomment the next line
9+ # log_cli = True
10+ # Then set the desired logging level on the command line, for example:
11+ # pytest --log-cli-level INFO
912
1013filterwarnings =
1114 ignore::DeprecationWarning:bitbox02[.*]
Original file line number Diff line number Diff line change 2020
2121function check_consistency {
2222 if ! npm version 2> /dev/null 1>&2 ; then
23- echo " npm is not on the PATH. Please install node and bring on the PATH"
23+ echo " npm is not on the PATH. Please install node and bring it on the PATH. "
2424 exit 1
2525 fi
26- if ps | grep python | grep -v grep ; then # the second grep might be necessary because MacOs has a non POSIX ps
27- echo " there is still a python-process running which is suspicious. Maybe wait a few more seconds"
28- sleep 5
29- ps | grep python && (echo " please investigate or kill " && exit 1)
26+ if ! ps | grep python | grep -q -v grep; then
27+ echo " There are no other Python processes running, good to go!"
28+ else
29+ GREP_OUTPUT=$( ps | grep python | grep -v grep)
30+ SPECTER_STR=" cryptoadvance.specter server"
31+ while read -r line; do # https://unix.stackexchange.com/questions/9784/how-can-i-read-line-by-line-from-a-variable-in-bash
32+ if [[ " $line " == * " $SPECTER_STR " * ]]; then
33+ echo " There is another Specter process running, this is fine."
34+ else
35+ echo " There is a suspicious Python process running. Maybe wait a few more seconds."
36+ sleep 5
37+ echo " Please investigate the following process and perhaps kill: $line "
38+ exit 1
39+ fi
40+ done <<< " $GREP_OUTPUT"
3041 fi
3142 $( npm bin) /cypress verify
3243}
You can’t perform that action at this time.
0 commit comments