Commit Graph

19 Commits

Author SHA1 Message Date
apb 386a389aab Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.
2011-09-10 16:57:35 +00:00
jmmv 21bb82bc2e Remove any stale .fifo files when doing 'test'. These may be leaked if
the user aborts the execution of atf-run with Ctrl+C, which will prevent
a subsequent 'make test' from working at all.
2011-05-14 17:47:28 +00:00
plunky bbe1bca01a if not including <bsd.prog.mk> then we need to clean up our own mess 2011-03-27 14:22:02 +00:00
jmmv 07be9009b6 Define LIBATF_C and LIBATF_CXX to point to their corresponding .a files and
use these to properly set DPADD for test programs.
2011-02-20 20:16:01 +00:00
jmmv 814b005f0c Miscellaneous improvements from Garrett Cooper:
- Add to variables only once, instead of from within a loop.
- Use :tl instead of :M to match against strings for readability.
- Use CLEANFILES instead of a custom clean target.

Full release built successfully after this change.
2011-02-16 10:13:00 +00:00
jmmv 3b500cc2c3 Fix the 'test' target to force atf to use its own files from DESTDIR instead
of the installed ones.  This is achieved by overriding all ATF_* environment
variables and making them point inside DESTDIR.
2011-02-06 19:38:48 +00:00
joerg 09dba18788 Simplify. 2010-08-23 16:03:03 +00:00
jmmv eed27dd4f1 Move the TESTSBASE definition from bsd.test.mk to bsd.own.mk. Per joerg@'s
suggestion.
2010-08-02 07:08:26 +00:00
jmmv dad604ce0c Implement Atffile automatic generation.
This change adds the ATFFILE variable, which can take the following values:
- yes: The source directory contains a static Atffile to be installed.
- auto: The Atffile is automatically generated.
- no: Do not install any Atffile (replaces the previous NOATFFILE variable).

The ugly bit of this is that I have to add a TESTS_SUBDIRS variable that
lists the subdirectories that contain test cases (so that they can be listed
in the Atffiles, without including auxiliary directories without tests).
This is a subset of SUBDIR.

Addresses a minor part of PR bin/43394.
2010-07-13 21:11:41 +00:00
jmmv 6fd7d9f8b8 Prevent build breakage if TESTSDIR is not defined (as in tests/modules/k_helper). 2010-06-18 13:14:21 +00:00
jmmv 92a7fda174 Add a experimental "make test" target
make test may yield misleading results but should work in many cases.  This
target is supposed to simplify the execution of tests but does not preclude
developers from running the installed versions.

Addresses PR misc/38326.
2010-06-18 10:10:57 +00:00
jmmv 727dd8cd9e Simplify build of shell-based test cases: atf-compile is gone. 2010-06-04 08:35:09 +00:00
jmmv 01ab96ad80 Add support for a TESTS_C variable to make use of the new C-only binding
that comes with atf-0.5.  Also fix linkage of C++ tests.
2008-05-01 15:36:36 +00:00
jmmv f51186f572 Fix build of tests when USETOOLS=no. Reported by veego@ in current-users
and notified to me by martin@.
2008-03-02 11:31:42 +00:00
jmmv 1abe396003 Allow Makefiles to skip the installation of an Atffile by defining NOATFFILE.
This is to be able to get the definition of TESTSBASE, which maybe should be
part of bsd.own.mk...
2008-02-10 12:28:54 +00:00
drochner 992ef89b0e include bsd.init.mk so that eg USETOOLS is available to
client Makefiles, approved by jmmv
2008-02-05 17:50:47 +00:00
jmmv 1561f4867f Rebuild shell-based tests if the atf-compile host tool has changed. The
contents of the generated scripts may change (as will happen with ATF 0.4),
so this dependency is important to have.  Dunno how to deal with the
non-tools case other than adding an entry in UPDATING, but if you are not
using tools, you can expect all kinds of breakage.
2008-02-04 14:15:57 +00:00
jmmv 1a8b914c59 No need to set a value for TESTSDIR any more as this is explicitly set
wherever it is needed.
2007-11-21 15:40:09 +00:00
jmmv dd2f8250cc Add the bsd.test.mk file
This file simplifies the build of test programs, either written in C++
or in sh.  It hides the internals of atf, e.g. by silently linking
against -latf or calling atf-compile.

It also takes care of installing an Atffile for each new test directory.
2007-11-12 15:05:15 +00:00