Enable ATF testing.

Submitted by:	Garrett Cooper
Approved by:	marcel (mentor)
Add ATF and reformat to ease reviews

Approved by:	marcel (mentor)
Install bsd.progs.mk, needed by bsd.test.mk and thus by atf.test.mk.
Reintroduce the ATF diffs for share/mk

The key difference between this and what I had previously is that I
removed all bits that need reexamining after some discussion with sjg@.

So basically, the subdir autodetection when MK_TESTS=yes bits are being
carried forward and some of the other bits are being left behind for
now.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Make Atffile build and install properly again

Somehow this got lost in the patch shuffle before..

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Add make regress support and pass through cleandepend via bsd.progs.mk

make regress is effectively a shortcut for make
test on target machines using binaries in ${.OBJDIR}.

Also, invoke test call via env TESTS_ENV, not TESTS_ENV bareword

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Make `make check` an alias for `make regress`

This will help simplify the transition for EMC Isilon

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Be more succinct when ${TESTDIR} is undefined

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Don't barf if MACHINE{_ARCH}/TARGET{_ARCH} are undefined

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
s/LD_LIBRARY_PATH/ATF_LD_LIBRARY_PATH/

These variables are better separated from one another.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
s/TESTS_ENV/ATF_TESTS_ENV/

This variable is also better separated out

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Allow the user to add to ATF_TESTS before .include'ing atf.test.mk

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Don't automatically append PROGS_CXX to PROGS in bsd.test.mk

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Remove bsd.progs.mk tweaking from this mk snippet

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
This should not be required, but bsd.progs.mk needs it

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Push the auto-SRCS determination logic down into bsd.test.mk

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Make test the non-default target

This will allow buildworld to pass again with
bin/test integrated into the build as the test
target is redefined in bsd.test.mk

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Add logic for integrating in prove tests

This is a simple cutover/for other tests that won't be
easy to integrate into ATF, like pjdfstest.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>

Conflicts:
	share/mk/Makefile
Remove setting an empty default value

Does not freaking make sense..

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Make ${PROVE_BIN} default to the host copy of prove

Pointing prove.test.mk at a ${DESTDIR} binary
probably isn't the smartest idea in the world..

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>