diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-13 18:43:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-13 18:43:46 +0000 |
commit | db0ce7d90f8737a8153fcaa17fcfc86dea8d5952 (patch) | |
tree | 0f4bf07ca74f2541150fe20ce0205bffd45bbc3f | |
parent | 09abd1ccfc1541f5deb23e3e88a2fa49ea058dfa (diff) | |
download | llvm-db0ce7d90f8737a8153fcaa17fcfc86dea8d5952.tar.gz llvm-db0ce7d90f8737a8153fcaa17fcfc86dea8d5952.tar.bz2 llvm-db0ce7d90f8737a8153fcaa17fcfc86dea8d5952.tar.xz |
Build (not test) the unittests as part of a normal build.
- 'make unittests' still builds and tests.
- 'make unitcheck' inside a unittest directory runs the tests in that directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81687 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.rules | 8 | ||||
-rw-r--r-- | unittests/Makefile.unittest | 2 |
3 files changed, 8 insertions, 4 deletions
@@ -24,7 +24,7 @@ ifeq ($(BUILD_DIRS_ONLY),1) OPTIONAL_DIRS := else DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \ - tools runtime docs + tools runtime docs unittests OPTIONAL_DIRS := examples projects bindings endif diff --git a/Makefile.rules b/Makefile.rules index 8d1e621845..7999c7a3ca 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -19,10 +19,11 @@ #-------------------------------------------------------------------- # Define the various target sets #-------------------------------------------------------------------- -RecursiveTargets := all clean clean-all install uninstall install-bytecode +RecursiveTargets := all clean clean-all install uninstall install-bytecode \ + unitcheck LocalTargets := all-local clean-local clean-all-local check-local \ install-local printvars uninstall-local \ - install-bytecode-local unittests + install-bytecode-local TopLevelTargets := check dist dist-check dist-clean dist-gzip dist-bzip2 \ dist-zip unittests UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) @@ -800,6 +801,7 @@ clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS)) install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS)) uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS)) +unitcheck:: $(addsuffix /.makeunitcheck,$(PARALLEL_DIRS)) ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) @@ -1619,7 +1621,7 @@ unittests:: $(Verb) if test -d "$(PROJ_OBJ_ROOT)/unittests" ; then \ if test -f "$(PROJ_OBJ_ROOT)/unittests/Makefile" ; then \ $(EchoCmd) Running unittests test suite ; \ - $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests unitcheck; \ else \ $(EchoCmd) No Makefile in unittests directory ; \ fi ; \ diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 1c75e44d07..355e6a34f5 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -30,6 +30,8 @@ $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(StripWarnMsg) all:: $(LLVMUnitTestExe) + +unitcheck:: $(LLVMUnitTestExe) $(LLVMUnitTestExe) endif |