summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-11-06 13:20:06 +0000
committerDaniel P. Berrange <berrange@redhat.com>2015-11-09 15:50:39 +0000
commit8afd34f2d890749fe3036d2d804a3c18d647bafd (patch)
tree450ea04443f0dca7698017caccae70534ffbc055 /cfg.mk
parentedc88e2084ec94c5757b880d5fe7775e7533b5aa (diff)
downloadlibvirt-8afd34f2d890749fe3036d2d804a3c18d647bafd.tar.gz
tests: redo test argv file line wrapping
Back in commit bd6c46fa0cfe275c24debc1152cfc5206c04b59b Author: Juerg Haefliger <juerg.haefliger@hp.com> Date: Mon Jan 31 06:42:57 2011 -0500 tests: handle backspace-newline pairs in test input files all the test argv files were line wrapped so that the args were less than 80 characters. The way the line wrapping was done turns out to be quite undesirable, because it often leaves multiple parameters on the same line. If we later need to add or remove individual parameters, then it leaves us having to redo line wrapping. This commit changes the line wrapping so that every single "-param value" is one its own new line. If the "value" is still too long, then we break on ',' or ':' or ' ' as needed. This means that when we come to add / remove parameters from the test files line, the patch diffs will only ever show a single line added/removed which will greatly simplify review work. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/cfg.mk b/cfg.mk
index a9bba382d7..db513be730 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1068,7 +1068,7 @@ _autogen:
# regenerate HACKING as part of the syntax-check
ifneq ($(_gl-Makefile),)
-syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
+syntax-check: $(top_srcdir)/HACKING bracket-spacing-check test-wrap-argv
endif
bracket-spacing-check:
@@ -1077,6 +1077,20 @@ bracket-spacing-check:
{ echo '$(ME): incorrect formatting, see HACKING for rules' 1>&2; \
exit 1; }
+test-wrap-argv:
+ $(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
+ for file in $$files ; \
+ do \
+ $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl $$file > $${file}-t ; \
+ diff $$file $${file}-t; \
+ res=$$? ; \
+ rm $${file}-t ; \
+ test $$res == 0 || { \
+ echo "$(ME): Incorrect line wrapping in $$file." 1>&2; \
+ echo "$(ME): Use test-wrap-argv.pl to wrap test data files" 1>&2; \
+ exit 1; } \
+ done
+
# sc_po_check can fail if generated files are not built first
sc_po_check: \
$(srcdir)/daemon/remote_dispatch.h \