build: Describe how to set up check-valgrind rules correctly.

Since we enabled parallel tests, you can no longer run tests
under valgrind merely by doing:

  TESTS_ENVIRONMENT = $(top_builddir)/run --test $(VG)
  check-valgrind:
      $(MAKE) check VG="@VG@"

The reason is that the parallel tests framework doesn't run
``$(TESTS_ENVIRONMENT) <test>''.  It inserts some other processes in
between the environment and the test, so you end up valgrinding some
unrelated process (currently the 'env' program).

In run.in, remove out of date documentation for using $(VG).
In guestfs-hacking(1), document how to do it properly.
This commit is contained in:
Richard W.M. Jones
2016-02-22 12:30:37 +00:00
parent 789d256645
commit 085815ce10
2 changed files with 31 additions and 6 deletions

5
run.in
View File

@@ -33,13 +33,10 @@
#
# The script should also be used for tests like this:
#
# TESTS_ENVIRONMENT = ... $(top_builddir)/run --test [$(VG)]
# TESTS_ENVIRONMENT = ... $(top_builddir)/run --test
#
# The --test parameter introduces a timeout, stopping tests from
# running forever.
#
# Use the optional $(VG) when the tests must also be run under
# valgrind.
#----------------------------------------------------------------------