From 345e6d3131d3cd25c17bb29df0ad836c12578f86 Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Wed, 13 Feb 2019 16:00:15 +0100 Subject: [PATCH] Copy away output directories of failed acceptance tests. (#967) And dump logs on travis from only failed features --- .travis.yml | 2 +- features/environment.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6faa782f..16d73145 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,7 +137,7 @@ script: echo Running acceptance tests using python${pv} if ! PATH=.:/usr/lib/postgresql/9.6/bin:$PATH $TEST_SUITE; then # output all log files when tests are failing - grep . features/output/*/*postgres?.* + grep . features/output/*_failed/*postgres?.* exit 1 fi fi diff --git a/features/environment.py b/features/environment.py index dc74dd8a..dc62f83c 100644 --- a/features/environment.py +++ b/features/environment.py @@ -823,3 +823,5 @@ def after_feature(context, feature): context.pctl.stop_all() shutil.rmtree(os.path.join(context.pctl.patroni_path, 'data')) context.dcs_ctl.cleanup_service_tree() + if feature.status == 'failed': + shutil.copytree(context.pctl.output_dir, context.pctl.output_dir + '_failed')