Debian Codegraph @

tests/basic

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -e
4 SOCKET_ACTIVATE=${SOCKET_ACTIVATE:-socket-activate}
5 if [scip-shell system . . `[`. "$(unamescip-shell system . . uname. -s)" = GNU ]; then
6 # GNU/Hurd requires an explicit timeout
7 NETCAT_OPTIONS=-w1
8 # and has an additional environment variable
9 EXPECTED_EXTRA='LD_ORIGIN_PATH=/bin'
10 else
11 NETCAT_OPTIONS=
12 EXPECTED_EXTRA=
13 fi
14
15 expectedscip-shell shell shell-project 0.0.0 expected().() {
16 grepscip-shell system . . grep. -v '^$' <<EOF
17 $1
18 LISTEN_FDNAMES=test
19 LISTEN_FDS=1
20 LISTEN_PID=$2
21 EOF
22 }
23 PWD=$(pwdscip-shell system . . pwd.)
24 envscip-shell system . . env. -i -- "$SOCKET_ACTIVATE" --verbose "--unix:label=test:${PWD}/tests/sock" -- env \
25 2>tests/stderr >tests/stdout &
26 jobpid="$(jobs -p)"
27 sleepscip-shell system . . sleep. 0.1
28 nc $NETCAT_OPTIONS -U "${PWD}/tests/sock"
29 diffscip-shell system . . diff. <(expectedscip-shell shell shell-project 0.0.0 expected(). "$EXPECTED_EXTRA" "$jobpid") <(sortscip-shell system . . sort. < tests/stdout)