From 8df895a8ac457676a7e8e232fe21a0eb3e17a49f Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 7 Nov 2018 00:40:37 +0000 Subject: [PATCH] issue #426: make ansible_tests dump inventory. --- .ci/ansible_tests.py | 4 ++-- .ci/ci_lib.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.ci/ansible_tests.py b/.ci/ansible_tests.py index bae95902..3161196d 100755 --- a/.ci/ansible_tests.py +++ b/.ci/ansible_tests.py @@ -45,8 +45,8 @@ with ci_lib.Fold('job_setup'): for container in containers ) - # Build the binaries. - # run("make -C %s", TESTS_DIR) + ci_lib.dump_file(inventory_path) + if not ci_lib.exists_in_path('sshpass'): run("sudo apt-get update") run("sudo apt-get install -y sshpass") diff --git a/.ci/ci_lib.py b/.ci/ci_lib.py index 7126887b..f52e4cd4 100644 --- a/.ci/ci_lib.py +++ b/.ci/ci_lib.py @@ -177,6 +177,16 @@ def start_containers(containers): return containers +def dump_file(path): + print() + print('--- %s ---' % (path,)) + print() + with open(path, 'r') as fp: + print(fp.read().rstrip()) + print('---') + print() + + # SSH passes these through to the container when run interactively, causing # stdout to get messed up with libc warnings. os.environ.pop('LANG', None)