Commit Graph

86 Commits

Author SHA1 Message Date
Alp Toker ee77934c17 Update lit.cfg to support the clang-interpreter test from r207950
Performs behind-the-scenes RUN line substitution similarly to what's done with
clang-check and clang-format to ensure the executable is found.

llvm-svn: 207951
2014-05-05 06:42:07 +00:00
Justin Bogner 534f14abe7 test: Use llvm-profdata merge in Profile tests
In preparation for using a binary format for instrumentation based
profiling, explicitly treat the test inputs as text and transform them
before running. This will allow us to leave the checked in files in
human readable format once the instrumentation format is binary.

No functional change.

llvm-svn: 206509
2014-04-17 22:49:06 +00:00
NAKAMURA Takumi c28a9a2c33 [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff.

llvm-svn: 199597
2014-01-19 13:00:01 +00:00
NAKAMURA Takumi 718d3b63f6 [CMake] Prune LLVM_TOOLS_DIR and LLVM_LIBS_DIR in clang/test/CMakeLists.txt. They are overridden in configure_lit_site_cfg().
llvm-svn: 199591
2014-01-19 12:45:35 +00:00
NAKAMURA Takumi 2e3166af59 [CMake] check-clang requires clang-tblgen. It is not required by anyone when external CLANG_TABLEGEN is specified.
llvm-svn: 199579
2014-01-19 08:54:48 +00:00
NAKAMURA Takumi af4480a121 check-clang: Add dependencies to PrintFunctionNames and SampleAnalyzerPlugin, for r198747 and r198820.
llvm-svn: 198867
2014-01-09 13:26:02 +00:00
NAKAMURA Takumi ef4657e6f1 check-clang: Suppress LLVM_LIT in add_lit_testsuite, for now.
llvm-svn: 197702
2013-12-19 17:10:30 +00:00
NAKAMURA Takumi e6d79ec0eb [CMake][Standalone] Rewrite standalone build based on llvm-config. CLANG_PATH_TO_LLVM_*(s) are deprecated.
Checked on VS10(multiconfig) and some singleconfig builders.

* Assumptions

  - You should specify llvm-config as LLVM_CONFIG.
    CMake could find one in $PATH by default.

  - ENABLE_ASSERTIONS obeys LLVM's.

* Use cases

  a) With LLVM build tree

    Assume llvm-config is in your build tree.
    Everything should work as ever.

  b) With *installed* LLVM

    Assume distributions. The source tree can be optional.

    b1) The source tree is provided on the location `llvm-config --src-root`

      - Test utils, FileCheck &c., are imported and built in the new tree.
      - Gtest is built in the tree if gtest library is not found.
      - Lit is used in $(SRCROOT)/utils/lit/lit.py.

    b2) The source tree is not provided

      - clang and utilities can be built.
      - All tests, unittests and check-clang are invalidated and not built.

llvm-svn: 197697
2013-12-19 16:44:32 +00:00
NAKAMURA Takumi ed79c96f89 [CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.
llvm-svn: 197688
2013-12-19 16:05:44 +00:00
NAKAMURA Takumi 5de6b43898 [CMake] check-clang: Append items to CLANG_TEST_DEPS rather than set. CLANG_TEST_DEPS can be set in parent scope.
llvm-svn: 197687
2013-12-19 16:05:39 +00:00
NAKAMURA Takumi 5db0c689b2 [CMake] check-clang: Deprecate --path, according to r197576.
llvm-svn: 197686
2013-12-19 16:05:34 +00:00
NAKAMURA Takumi 462ba80fda check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.
llvm-svn: 197576
2013-12-18 15:08:56 +00:00
NAKAMURA Takumi 96357e6af7 clang/test/CMakeLists.txt: Prune CLANG_SOURCE_DIR and CLANG_BINARY_DIR. They are set at top.
llvm-svn: 197575
2013-12-18 15:08:49 +00:00
NAKAMURA Takumi 17645a4772 [CMake][Standalone] Fixup r197395 for standalone build.
Standalone scripts shall be rewritten.

llvm-svn: 197459
2013-12-17 04:14:17 +00:00
NAKAMURA Takumi 67eade63fd check-clang: Introduce get_llvm_config_props in clang/test/lit.cfg.
In trunk, we can use features as below:

  aarch64-registered-target
  hexagon-registered-target
  msp430-registered-target
  r600-registered-target
  systemz-registered-target
  xcore-registered-target

Each of them, as below, implies corresponding subtargets:

  arm-registered-target   -- arm, thumb
  mips-registered-target  -- mips, mips64, mips64el, mipsel
  nvptx-registered-target -- nvptx, nvptx64
  sparc-registered-target -- sparc, sparcv9
  x86-registered-target   -- x86, x86-64

They will be renamed:

  cppbackend-registered-target -- was "cpp". Unused in trunk.
  powerpc-registered-target -- was "ppc32", "ppc64" and "ppc64le".

The feature "asserts" is also taken from llvm-config.

llvm-svn: 196347
2013-12-04 03:40:56 +00:00
Daniel Jasper b7fb5e6f4b Re-add clang-format tests to clang/test.
Also now use -strict-whitespace as the tests are confusing otherwise.

llvm-svn: 177853
2013-03-25 09:14:25 +00:00
Evgeniy Stepanov eeabe82762 Add llvm-symbolizer as test dependency.
It is required when building tests with ASan or MSan.

llvm-svn: 176942
2013-03-13 09:36:02 +00:00
Jordan Rose 08bf4fd345 CMake: Include Clang unit tests in check-clang target in standalone builds.
Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior
between standalone and non-standalone builds, so I'm not going to bother
hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to
control unit test inclusion in the "all" target in non-standalone builds.

Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set
to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually
reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier
commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies!

Part two of r174691 (allow the unit tests to be built in standalone mode).

llvm-svn: 174698
2013-02-08 07:28:25 +00:00
NAKAMURA Takumi 61a8f974a7 [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

llvm-svn: 173616
2013-01-27 12:20:50 +00:00
NAKAMURA Takumi df0b43d1f9 clang/test: [CMake] check-clang doesn't require llvm-dis any more.
llvm-svn: 173116
2013-01-22 01:52:04 +00:00
Alexander Kornienko cdc3987ca8 Removed standalone clang-ast-dump tool.
llvm-svn: 160772
2012-07-26 01:44:18 +00:00
Alexander Kornienko f2f82550fd The new clang-ast-dump tool for selective AST dumping. Moved common command-line tool stuff to CommandLineClangTool
llvm-svn: 160265
2012-07-16 12:46:48 +00:00
Chandler Carruth dc2e4bcad3 Extend a workaround for a CMake bug in LLVM's r159593 to apply to
a Clang target which hits the same bug directly.

llvm-svn: 159598
2012-07-02 21:46:03 +00:00
Chandler Carruth 3bf1d5d1de We support a mode where the Clang regression tests are run but not the
Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

llvm-svn: 159594
2012-07-02 21:37:04 +00:00
Chandler Carruth 6b963db39a Switch from using a lit.cfg-generator variable to the real variable in
the standalone mode. We've changed scoping and sequencing of variables
being defined and that cause this to start to be unset breaking some
cmake users. Thanks to Jordan Rose for the report.

The fix also makes the condition on the preceding line much more
sensible. =D

llvm-svn: 159576
2012-07-02 20:14:59 +00:00
Chandler Carruth 8a6290721e Switch Clang to use the new common LLVM CMake infrastructure for adding
lit testsuites. This sinks all management of the aggregate lit runs into
the LLVM CMake files, making Clang only responsible for declaring its
own testsuite. In the process we fix numerous "bugs" where the proper
method of invoking lit has changed over time, and the old system
encoded several broken artifacts of this in ABIs and compatibility
tests.

It also switches to 'check-clang' for the canonical name of the test
suite, although 'clang-test' remains as an alias.

The situation when Clang is being built in standalone mode is little
changed. It replicates just enough of the lit setup to cope with the
oddities of being run outside of an LLVM build.

llvm-svn: 159483
2012-06-30 10:14:27 +00:00
Chandler Carruth 8279aa7825 Switch Clang's CMake lit.site.cfg generation over to use the common
helpers rather than its own special-rolled code.

llvm-svn: 159398
2012-06-29 00:39:23 +00:00
Chandler Carruth 9d76f27786 Remove a completely unused and remarkably inaccurate list of test
directories from the cmake file. Dunno what the history is here, but
we're not using it.

More refactorings to come here.

llvm-svn: 159261
2012-06-27 10:06:26 +00:00
Chandler Carruth c0674c1fda Update the Clang CMake build to reflect the name change in LLVM r159258.
llvm-svn: 159260
2012-06-27 09:49:07 +00:00
Manuel Klimek 750caacbb2 Add the dependency on clang-check to clang-test, so clang-check
can be integration tested.

llvm-svn: 154009
2012-04-04 12:18:22 +00:00
NAKAMURA Takumi 185de44959 CMake: Promote the testing targets out of folders on IDE.
llvm-svn: 149220
2012-01-30 03:15:47 +00:00
Peter Collingbourne 5bad4afa2f CUDA: set proper calling conventions for PTX
llvm-svn: 141296
2011-10-06 16:49:54 +00:00
NAKAMURA Takumi f665ce60c2 CMake: "clang-test" may not depend on check.deps.
...I believe it would not break anything...

FIXME: "check-all" may not be generated w/o LLVM_INCLUDE_TESTS.
llvm-svn: 137709
2011-08-16 03:45:31 +00:00
Ted Kremenek 228b5fefbb Add diagtool-based test where we enforce that no additional warnings can be added to Clang without a -W flag.
llvm-svn: 137369
2011-08-11 22:06:55 +00:00
NAKAMURA Takumi 6657e979f5 test/CMakeLists.txt: Re-indent.
llvm-svn: 135591
2011-07-20 16:35:49 +00:00
Douglas Gregor 653b51a938 Don't refer to check.deps unless LLVM_INCLUDE_TESTS is enabled
llvm-svn: 135300
2011-07-15 21:03:20 +00:00
NAKAMURA Takumi 43ab08340b test/CMakeLists.txt: clang-test may depend on llc when LLVM is built together.
llvm-svn: 134874
2011-07-10 17:45:28 +00:00
NAKAMURA Takumi 797bac56ad test/CMakeLists.txt: Fix ClangUnitTests to be built with clang-test and check-all.
llvm-svn: 134873
2011-07-10 17:45:23 +00:00
NAKAMURA Takumi ad43b8fe58 test/CMakeLists.txt: Add missing c-arcmt-test to clang-test.deps.
llvm-svn: 134851
2011-07-09 23:36:37 +00:00
Andrew Trick 72d91dd6e4 cmake+lit: final cleanup related to the recent churn
llvm-svn: 133730
2011-06-23 18:00:48 +00:00
Andrew Trick fc0bb5855b Only do config-time substitution of LLVM_BUILD_MODE in
test/lit.site.cfg, not Unit/test/lit.site.cfg.

llvm-svn: 133609
2011-06-22 05:44:01 +00:00
Chandler Carruth 55b42d5ad4 Add another dependency to the clang-test CMake target, this time to support lit.
llvm-svn: 133138
2011-06-16 02:21:11 +00:00
Chandler Carruth d8bc97c644 Add the new arcmt-test tool to the clang-test dependencies with
c-index-test and friends. This brings the failures on CMake clang tests
from 23 to 2 on Linux.

llvm-svn: 133137
2011-06-16 02:01:48 +00:00
Douglas Gregor 7b0dfb3ac5 Remove the clang-test-XXX targets from the CMake builds; they really aren't useful
llvm-svn: 131728
2011-05-20 15:01:17 +00:00
Douglas Gregor 4d0779a754 Nth time's a charm?
llvm-svn: 126461
2011-02-25 00:46:48 +00:00
Douglas Gregor 61e58aecbc CMake target check.deps only exists when LLVM_INCLUDE_TESTS
llvm-svn: 126460
2011-02-25 00:43:05 +00:00
NAKAMURA Takumi ff75d8d502 CMake: Don't use ${CMAKE_CFG_INTDIR} for installed llvm-lit on Visual Studio.
llvm-svn: 126310
2011-02-23 12:07:49 +00:00
Oscar Fuentes 15fe190027 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Daniel Dunbar 5423b497ab More correct fix for CMake breakage I was seeing, my buildbots use
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know.

llvm-svn: 125985
2011-02-18 22:55:32 +00:00
Daniel Dunbar 7ba92d716a Unbreak CMake build on MSVC9, chapuni please check.
Without this I get:
--
-- Generating done
CMake Error: Unknown Target referenced : check.deps
CMake Error: Target: check-all depends on unknown target: check.deps
--

llvm-svn: 125976
2011-02-18 22:24:23 +00:00