File: tc03.sh

package info (click to toggle)
python-dib-utils 0.0.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 140 kB
  • sloc: sh: 196; makefile: 12; python: 4
file content (33 lines) | stat: -rwxr-xr-x 605 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
#!/bin/bash
#
# Runs dib-run-parts on directory containing some scripts
# and using the environment directory.
#

set -ue
set -o pipefail
set -x

TESTS_BASE_DIR=$(dirname $0)

DRP_BIN=${TESTS_BASE_DIR}/../bin/dib-run-parts

TEST_EXEC_DIR=${TESTS_BASE_DIR}/tc03/td

rval=0

RES=$(${DRP_BIN} ${TEST_EXEC_DIR} 2>/dev/null)
if test $? -ne 0; then
    echo "*** FAILED: dib-run-parts failed"
    rval=1
fi

EXPECTED="call_me_1 called [Some thing]
call_me_2 called [Other thing]"

if test "${EXPECTED}" != "${RES}"; then
    echo "*** FAILED: dib-run-parts returns incorrect result"
    rval=1
fi

exit ${rval}