* debian/patches/behave_failure_logging.patch: New patch, copy over output

directory of a failed feature with `_failed' at the end.
  * debian/tests/acceptance: Dump logs for failed features.
This commit is contained in:
Michael Banck 2018-09-25 15:44:49 +02:00
parent 53b04dc0a0
commit df088977ed
4 changed files with 14 additions and 1 deletions

3
debian/changelog vendored
View file

@ -2,6 +2,9 @@ patroni (1.5.0-3) UNRELEASED; urgency=medium
[ Michael Banck ]
* debian/gitlab-ci.yml: New file.
* debian/patches/behave_failure_logging.patch: New patch, copy over output
directory of a failed feature with `_failed' at the end.
* debian/tests/acceptance: Dump logs for failed features.
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Sun, 23 Sep 2018 13:03:07 +0200

View file

@ -0,0 +1,8 @@
--- ./features/environment.py_ 2018-09-25 13:20:02.659994338 +0200
+++ ./features/environment.py 2018-09-25 13:32:35.455221988 +0200
@@ -813,3 +813,5 @@
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")

View file

@ -3,3 +3,4 @@ startup_scripts.patch
coverage_binary.patch
consul_import.patch
patroni_service.patch
behave_failure_logging.patch

View file

@ -28,5 +28,6 @@ trap 'rm -f /tmp/pgpass?; if [ $(id -u) -eq 0 ] && [ -x /etc/init.d/zookeeper ];
set -x
for PG_VERSION in /usr/lib/postgresql/*; do
$SU "DCS=$DCS PATH=/usr/lib/postgresql/$(basename ${PG_VERSION})/bin:$PATH behave"
$SU "DCS=$DCS PATH=/usr/lib/postgresql/$(basename ${PG_VERSION})/bin:$PATH behave" || \
(for file in $(ls features/output/*_failed/*); do echo "$file:"; cat $file; done && exit 1)
done