]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
make: build/run tests, only with --enable-tests
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 30 Sep 2022 15:54:38 +0000 (09:54 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 30 Sep 2022 15:54:43 +0000 (09:54 -0600)
Control the building and testing (make check) of the tests using the
if/endif WITH_TESTS guard based on the configuration options passed.
If the --enable-tests (default on) is passed during ./configure step,
the SUBDIRS directories (ftests/gunit) are recused into build and
make check are run.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit ce2717610acff6384b161787591533591fb42228)

tests/Makefile.am

index c1e6a1b60da2fbac0200dfb476089605d7092eaa..8dcd138c1b1493619586698dbf71ffd5a6e5fd28 100644 (file)
@@ -1,4 +1,7 @@
 DIST_SUBDIRS = ftests gunit tools
+if WITH_TESTS
+SUBDIRS = $(DIST_SUBDIRS)
+endif
 
 INCLUDES = -I$(top_srcdir)/include
 LDADD = $(top_builddir)/src/.libs/libcgroup.la