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')