File tree Expand file tree Collapse file tree 3 files changed +40
-10
lines changed Expand file tree Collapse file tree 3 files changed +40
-10
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ jobs:
100100 if : ${{ always() }}
101101
102102 test-integration :
103- name : Integration Tests
103+ name : Emulator Tests
104104 runs-on : ubuntu-20.04
105105 needs :
106106 - msrv
Original file line number Diff line number Diff line change @@ -13,11 +13,5 @@ sample/
1313* .swp
1414* .swo
1515* .vim
16- __azurite * .json
17- __blobstorage__
18- __queuestorage__
1916.idea /
20- * .iml
21- * .bat
22- * .ps1
2317.env
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33set -eux -o pipefail
4- cd $( dirname ${BASH_SOURCE[0]} ) /../../
4+ BUILD= ${1 :- stable}
55
6+ cd $( dirname ${BASH_SOURCE[0]} ) /../../
67./eng/scripts/github-disk-cleanup.sh
78
8- BUILD=${1:- stable}
9+ # get the nested list of sub-processes for a given set of pids
10+ function subprocesses {
11+ for P in $@ ; do
12+ echo ${P}
13+ for C in $( pgrep -P ${P} ) ; do
14+ subprocesses ${C}
15+ done
16+ done
17+ }
918
10- 19+ # stop all of the subprocesses for a given set of pids
20+ function stop_subprocesses {
21+ # sort pids numerically, and in reverse
22+ PIDS=$( subprocesses $$ | sort -nr)
23+ for P in ${PIDS} ; do
24+ if [ ${P} == $$ ]; then
25+ continue
26+ fi
27+ kill -9 ${P} || echo " stopping ${P} failed"
28+ done
29+ }
30+
31+ # at termination, we want to cleanup the temp directory and stop all
32+ # subprocesses (azurite)
33+ TMP=$( mktemp -d)
34+ function cleanup {
35+ stop_subprocesses || true
36+ rm -rf ${TMP} || true
37+ }
38+ trap cleanup EXIT
39+
40+ BASE_DIR=$( pwd)
41+ cd ${TMP}
42+ 1143npx azurite &
1244
45+ # wait for azurite to start
46+ sleep 5
47+
48+ cd ${BASE_DIR}
1349rustup update --no-self-update ${BUILD}
1450cargo +${BUILD} test --features test_integration
You can’t perform that action at this time.
0 commit comments