Debian Codegraph @

test/integration/targets/ansible-test-unsupported-directory/runme.sh

raw
1 #!/usr/bin/env bash
2
3 source ../collection/setup.sh
4
5 set -eux
6
7 cd "${WORK_DIR}"
8
9 # some options should succeed even in an unsupported directory
10 ansible-test --help
11 ansible-test --version
12
13 # the --help option should show the current working directory when it is unsupported
14 ansible-test --help 2>&1 | grep '^Current working directory: '
15
16 # some shell commands also work without a supported directory
17 ansible-test shell pwd
18
19 if ansible-test sanity 1>stdout 2>stderr; then
20 echo "ansible-test did not fail"
21 exit 1
22 fi
23
24 grep '^Current working directory: ' stderr
25
26 if grep raise stderr; then
27 echo "ansible-test failed with a traceback instead of an error message"
28 exit 2
29 fi