File: datasource_pid.sh

package info (click to toggle)
snoopy 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,988 kB
  • sloc: ansic: 7,167; sh: 4,514; makefile: 1,095
file content (35 lines) | stat: -rwxr-xr-x 480 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash



### Configure shell and bootstrap
#
set -e
set -u
. `dirname $BASH_SOURCE`/_bootstrap.sh



### Get data
#

# Run this command first, in background
$SNOOPY_TEST_CLI run datasource pid > datasource_pid.out.tmp &

# Capture its pid from BASH
VAL_REAL=$!

# Wait for it to finish
wait $VAL_REAL

# Get its output
VAL_SNOOPY=`cat datasource_pid.out.tmp`

# Do a cleanup
rm -f datasource_pid.out.tmp



### Evaluate
#
snoopy_test_compareValues "$VAL_SNOOPY" "$VAL_REAL"