From: Peter A. Bigot Date: Sat, 17 May 2014 20:05:53 +0000 (-0500) Subject: automake: full support for make check X-Git-Tag: v1.5.0-rc1~95^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64e74e758cd1d384987b1980d111d83311c02e9e;p=thirdparty%2Frrdtool-1.x.git automake: full support for make check Presence of the TESTS variable adds check as a target, but for this to work completely all the test infrastructure needs to be part of the distribution package, which is easiest if there's a Makefile.am in that directory. Signed-off-by: Peter A. Bigot --- diff --git a/.gitignore b/.gitignore index 08238062..b2e07aa4 100644 --- a/.gitignore +++ b/.gitignore @@ -57,9 +57,6 @@ Makefile # cscope /cscope.* -# tests MUST create their own RRDs -/tests/*.rrd - #vim swp file *.swp diff --git a/Makefile.am b/Makefile.am index 846760d8..74115b13 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ RSYNC = rsync --rsh=ssh # build the following subdirectories -SUBDIRS = po src examples doc bindings +SUBDIRS = po src examples doc bindings tests # the following files are not mentioned in any other Makefile EXTRA_DIST = COPYRIGHT CHANGES TODO CONTRIBUTORS THREADS \ @@ -26,14 +26,6 @@ ACLOCAL_M4= $(top_srcdir)/aclocal.m4 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config #AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config -TESTS = tests/modify1 \ - tests/modify2 \ - tests/modify3 \ - tests/modify4 \ - tests/modify5 \ - tests/tune1 \ - tests/tune2 - # $(RSYNC) CHANGES archive/$(PACKAGE)-$(VERSION).tar.gz tobi@ipn.caida.org:/ipn/web/Tools/RRDtool/pub/ if HAVE_SYSTEMD diff --git a/configure.ac b/configure.ac index fd740e98..a414ead5 100644 --- a/configure.ac +++ b/configure.ac @@ -931,6 +931,7 @@ AC_CONFIG_FILES([examples/4charts.pl]) AC_CONFIG_FILES([examples/perftest.pl]) AC_CONFIG_FILES([examples/Makefile]) AC_CONFIG_FILES([examples/rrdcached/Makefile]) +AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) AC_CONFIG_FILES([src/Makefile]) @@ -939,8 +940,8 @@ AC_CONFIG_FILES([src/librrd.pc]) AC_CONFIG_FILES([bindings/Makefile]) AC_CONFIG_FILES([bindings/tcl/Makefile]) AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl]) -AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([bindings/lua/Makefile]) +AC_CONFIG_FILES([Makefile]) AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]]) diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 00000000..f8801fac --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,4 @@ +# tests MUST create their own RRDs +/*.rrd +/*.out +/modify5-testa*-mod.dump diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 00000000..e46708ba --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,15 @@ +TESTS = modify1 modify2 modify3 modify4 modify5 \ + tune1 tune2 \ + rrdcreate +EXTRA_DIST = Makefile.am \ + alltests functions \ + modify1 modify-test1.create.dump modify-test1.mod1.dump \ + modify2 modify2-testa-create.dump modify2-testb-mod1.dump modify2-testc-mod1.dump \ + modify3 modify-test3.create.dump modify-test3.mod1.dump \ + modify4 modify4-testa-create.dump modify4-testa1-create.dump modify4-testa2-create.dump \ + modify5 modify5-testa1-create.dump modify5-testa2-create.dump \ + rrdcreate \ + tune1 tune1-testa-mod1.dump tune1-testa-mod2.dump tune1-testorg.dump \ + tune2 tune2-testa-mod1.dump tune2-testorg.dump \ + valgrind-supressions +CLEANFILES = ct.out dur.out modify5-testa1-mod.dump modify5-testa2-mod.dump