[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#935907: lintian: Build only needed test packages on partial tests



Package: lintian
Version: 2.19.0
Severity: wishlist

Hi all,

an idea to build only needed test packages (and rebuild only needed
ones): use a Makefile to detect changes in t/tags/checks. Here is a
template that seems to work:

  #!/usr/bin/make -f
  
  TAGS:=$(shell find t/tags/checks/ -name desc ! -type d)
  TESTS:=$(patsubst t/tags/%,debian/test-out/tags/%,$(TAGS))
  
  debian/test-out/tags/checks/%/desc: t/tags/checks/%/*
          ./t/bin/build-test-package $*
  
  test-packages: $(TESTS)

  checks/%:
        $(_) $(patsubst t/tags/%,debian/test-out/tags/%,$(shell find t/tags/checks/$* -name desc ! -type d))

Then it can be called like this to build all changed tests:

  $ ./t/bin/make-test-packages test-packages

Or to build only those related to "nodejs" check:

  $ ./t/bin/make-test-packages checks/nodejs

"Just" to write t/bin/build-test-package ;-)

Cheers,
Xavier


Reply to: