How to test modification to a userland program (e.g., sed)?

Mateusz Piotrowski 0mp at FreeBSD.org
Mon Jun 8 15:12:00 UTC 2020


Hello hackers@,

What is your preferred way to test local modifications to userland
programs such as sed(1)?

It feels like the correct way would be to create a jail, enter that
jail, get the modified version of the src tree inside the jail and then
run "make install check" in an appropriate subdirectory within that src
tree (e.g., usr.sbin/sed).

There must be a simpler way, not involving a jail, right?

I've tried to experiment with the something along the following sequence
of commands as well but it feels hacky and makes some of the tests fail:

  export DESTDIR=/test
  SRCTREE=/src
  make -C $SRCTREE hierarchy
  make -C $SRCTREE/usr.bin/sed install
  export PATH="$DESTDIR/usr/bin:$PATH"
  make -C $SRCTREE/usr.bin/sed check

Cheers,
Mateusz


More information about the freebsd-hackers mailing list