Commit Graph

1681 Commits

Author SHA1 Message Date
Dan Albert
90ed14b6a2 Fix host tests.
The regex being overspecified meant that host tests were not properly
replacing the dummy.o when linking, meaning all of the tests that were
running were running nothing but `int main() {}`.

The good news is that there weren't any failing tests hiding behind
this on Linux.

Change-Id: I9bea82ff1fefdf156d68a58689e532807c8d999b
2015-05-12 10:26:58 -07:00
Dan Albert
15d0bc5725 Merge "Fix LD_LIBRARY_PATH for host tests after update." 2015-04-14 23:37:00 +00:00
Dan Albert
3a29e8f9d3 Merge "Fix output directory for host tests." 2015-04-14 23:36:55 +00:00
Dan Albert
a3287786b5 Use libgcc unwinder for non-ARM targets.
The change in how we link the unwinder/libgcc seems to have broken
exception handling for targets using libunwind, but it now works using
the libgcc unwinder.

Change-Id: Id7e92423eff1066933b3a4a15fab13bad81c4935
2015-04-14 14:56:46 -07:00
Dan Albert
447998cbb0 Fix LD_LIBRARY_PATH for host tests after update.
_run never gets called any more, so the LD_LIBRARY_PATH wasn't being
set any more. The tests were still passing locally for me because the
tests were happily using the libc++.so from my system rather than the
one we build.

Wasn't obvious from the buildbot because the display for the test
results is absolutely terrible and they got lost in the noise of the
known failures.

Change-Id: Ib2df196ec6748718930e70887b7d0099884d792c
2015-04-14 10:50:38 -07:00
Dan Albert
f8c938a5cf Fix output directory for host tests.
The host tests were being compiled into the target's out directory.
This wasn't causing any problems, but seeing it made me thing there
was something more sinister going on.

Change-Id: Ic2b9317512340e718f5c2648ecb23409dad7dcf9
2015-04-14 10:49:41 -07:00
Dan Albert
8d0c51fdca Drop compiler-rt from WHOLE_STATIC_LIBRARIES.
The build system handles the reasons we used to do this now, and doing
this commonly causes multiple symbol definition problems when it
collides with libgcc.

Bug: 18389856
Change-Id: Ife74d66c2327751ca47630216bea9a08b8270c89
2015-04-01 16:35:08 -07:00
Dan Albert
2cfc479c0b Manually link unwinder.
We want to make linking the unwinder the responsibility of the build
system rather than bundling it here (so we can link it with
--exclude-libs to prevent cross-talk between unwinders). Since these
unwinders will be linked if using libc++, we need to manually link it
in this case.

Bug: 18471342
Bug: 19958712
Change-Id: I351da9e7cd940887a60149b3e448d342833769d8
2015-03-31 18:27:38 -07:00
Dan Albert
2d714472e0 Remove libcxx.mk.
We've had proper build system support for this for a long time.

Change-Id: I0ff2309503d44aba4940973af374fc7becde4d9c
2015-03-27 11:33:05 -07:00
Dan Albert
5d8e4e3581 Update Android's test configuration for new APIs.
The upstream test runner has changed enough that the way Android was
shimmed into it was no longer compatible. This adapts our test runner
to the new APIs for cross-compiling and remote execution.

There's probably a fair amount of dead code in the Android test
runners now (or at least some code that should be made dead). I'll
clean it up in a later patch, but want to get us up and running for
now.

The NDK test runner will need to be updated as well. There aren't any
continuous runs for that, so that will be fixed in a follow up as
well.

Change-Id: I1756f538aa6c7136ebd26d1e81c8299b87f0c6b2
2015-03-12 11:00:36 -07:00
Dan Albert
490d4a2aa6 "Install" the new libc++abi header.
Change-Id: I1b67c01647aea14701779ee044bc79586803415a
2015-03-12 11:00:36 -07:00
Dan Albert
d4b75d9e1b Revert "Remove several unused forward declarations. Fixes PR22605."
GCC fails to compile the following pattern with this patch:

    #include <set>
    std::set<int> foo;
    #include <map>
    using namespace std;
    std::map<int, int> bar;

It looks like a GCC bug, but there is some external code that trips
this issue that I'd rather leave unmodified.

This reverts commit 59f573f670.

Bug: 19606303
Change-Id: I72ac5619b3572e03db83850cdaadc4ec618f312e
2015-03-12 11:00:36 -07:00
Dan Albert
fe851e1843 Move Android to the builtin rune table.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231897 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I6c3f8d123ee42c6f5093a88308e626c6a5d7dc18
2015-03-12 11:00:36 -07:00
Dan Albert
f62f39af02 Copy data files to the remote runner.
Summary:
The data files for any given test will be in the same directory as the
source with a file name that matches *.dat. To make these available to
tests running remotely (such as over adb or ssh), copy them into the
test's remote working directory.

Note that we will perform more copies than we actually need. The data
files in the directory may only be used by one of the tests, but will
be copied for all tests in the same directory.

This patch also moves the remote test binary into the working
directory (previously it was only invoked from the working directory
rather than existing in it).

Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8118

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231864 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I53d095bd26e2f38bc938745c205439b1ae715de1
2015-03-12 11:00:36 -07:00
Dan Albert
702e978e57 Factor out RemoteExecutor from SSHExecutor.
Summary:
A lot of the pieces of SSHExecutor can be shared with my AdbExecutor
(https://android-review.googlesource.com/#/c/138807/).

Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8117

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231815 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I38b5d3f16560a07fece15ab0a892c3060404384d
2015-03-12 11:00:36 -07:00
Dan Albert
95876420d9 Merge "Oops. This arg is passed, just ignored." 2015-03-12 17:59:46 +00:00
Dan Albert
e1e925350b Merge "Fix the PrefixExecutor." 2015-03-12 17:59:39 +00:00
Dan Albert
1fa3ac6f1f Merge "Merge to upstream r231255." 2015-03-12 17:59:32 +00:00
Dan Albert
90e862b946 Oops. This arg is passed, just ignored.
We should probably be using this argument to find the data files for
the tests, but that isn't implemented yet.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231498 91177308-0d34-0410-b5e6-96231b3b80d8
Change-Id: Idbf369eada1de93a21180edc6abeeebf89e6cdff
2015-03-06 11:45:15 -08:00
Dan Albert
b0617a9302 Fix the PrefixExecutor.
The PrefixExecutor wasn't passing the exe_path down the chain, so the
command was overriding that, the work_dir was being passed as the
command, and so on.

I've cleaned up a few pylint issues while I was here.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231496 91177308-0d34-0410-b5e6-96231b3b80d8
Change-Id: Ice5baa25246cf5830c91b329eaeb819ae0dd1aad
2015-03-06 11:45:15 -08:00
Dan Albert
5cb52824fc Merge to upstream r231255.
Change-Id: Ia8ee1801b42943464b99f28b6a83647458f3efb5
2015-03-04 10:47:52 -08:00
Dan Albert
7cea231ad2 am 94962fba: Clean up some redundant link flags.
* commit '94962fba20d5830a18f3ce0350d6cf299c04b8aa':
  Clean up some redundant link flags.
2015-03-04 00:16:18 +00:00
Dan Albert
94962fba20 Clean up some redundant link flags.
The build system has done this for us for some time now.

Change-Id: Idc7abf8abde086b6085c770f1b4c0dfb32500f14
2015-03-03 15:05:07 -08:00
Bill Yi
b77e484928 Merge commit '806cc8c60b57aa9e7c1007ed7dfcb44b8e5cc4b4' into HEAD 2015-02-19 14:31:12 -08:00
Dan Albert
9d2b9054b5 Revert "Add the NDK's libc++ library to the build."
This broke the world for the SANITIZE_HOST build and the coverage bot.
Reverting until I have time to look in to it.

This reverts commit 1640950226.
2015-02-18 22:06:44 -08:00
Dan Albert
aec496f48e Add NDK tests.
Bug: 19149083
Change-Id: I2222ee6230ed11e09ee00553e21855290b662da0
2015-02-17 17:03:28 -08:00
Dan Albert
1640950226 Add the NDK's libc++ library to the build.
This depends on Bionic's NDK compatibility library, which is still a
WIP.

We should probably consider adding both compatlib and non-compatlib
flows to the NDK so that users who only care about the latest versions
can avoid using the compatblib (there are probably going to be bugs
for a while).

Bug: 19149083
Change-Id: I76907cc6cfb1960a4dbd144974ce20cdd9b94777
2015-02-17 17:03:23 -08:00
Dan Albert
79589785c5 Makefile cleanup.
LOCAL_ADDITIONAL_DEPENDENCIES := $(THIS_MAKEFILE) is no longer
necessary.

The ifneq ARM block for libdl not only isn't correct (broken for
32-bit arm on an aarch64 device), but is already linked for all
architectures just above.

Change-Id: Ie2ad80b22dbf73e5834be26bccecd4a811ad5ac7
2015-02-17 20:54:49 +00:00
Dan Albert
46fa3763eb Fix some -Wundef issues.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228266 91177308-0d34-0410-b5e6-96231b3b80d8
Change-Id: Ib53cc3c6d89254376a34d795f6bf34b32f7c1577
(cherry picked from commit 3727be521a)
2015-02-17 11:10:48 -08:00
Dan Albert
806cc8c60b am 00ed9870: Fix error checking in get_temp_file_name().
* commit '00ed9870d98b93d8a6438e5cf9058ebbe10dab01':
  Fix error checking in get_temp_file_name().
2015-02-13 17:59:30 +00:00
Dan Albert
00ed9870d9 Fix error checking in get_temp_file_name().
Checking errno without first checking that the call failed means that
if some other call prior to mkstemp failed with EINVAL prior to this,
the assert would fire even if mkstemp succeeded. If something failed
with EEXIST, it would go in to an infinite loop.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229035 91177308-0d34-0410-b5e6-96231b3b80d8
Change-Id: I512f29f2cb4b379e9f33e9bc12c060851152647c
2015-02-12 19:08:06 -08:00
Dan Albert
2d332e779b am 8f9e26da: Remove triple detection from cmake.
* commit '8f9e26da95273e2b6841d3030cabb940edefc4dd':
  Remove triple detection from cmake.
2015-01-16 06:07:39 +00:00
Dan Albert
9c4490fd21 am ba6d1ebf: [libc++] Add support for cross compiling.
* commit 'ba6d1ebf99948a71deb28ad292a0ea71c587d08b':
  [libc++] Add support for cross compiling.
2015-01-16 06:07:34 +00:00
Dan Albert
e57b2908b2 am 69f78432: Fix up Android test config to match upstream.
* commit '69f7843275d13fe6a867e50ecdcd7e2eb43ae2f7':
  Fix up Android test config to match upstream.
2015-01-16 06:07:33 +00:00
Dan Albert
a57ea0267e am 4dc5b219: Merge to upstream r226192.
* commit '4dc5b2198d1aa4ab585a3d4a87ee9626d681f9f7':
  Merge to upstream r226192.
2015-01-16 06:07:32 +00:00
Dan Albert
8f9e26da95 Remove triple detection from cmake.
This isn't actually used for anything, and is broken on Darwin
(currently causing build failures now that the triple is passed to aid
cross compiling). Rather than fix unused code, just remove it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226243 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit cbc84977aa)

Change-Id: I734aa3065ef7ece0c6582b3f00674e61171ea358
2015-01-15 18:32:51 -08:00
Dan Albert
ba6d1ebf99 [libc++] Add support for cross compiling.
Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6990

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-15 16:58:42 -08:00
Dan Albert
69f7843275 Fix up Android test config to match upstream.
Change-Id: I053dde99259feadc0c0ec4e3e42a575b1ddab454
2015-01-15 14:33:42 -08:00
Dan Albert
4dc5b2198d Merge to upstream r226192.
Change-Id: Id459c8ce0d7dec371ff4d064ee2c71f6b7178e63
2015-01-15 14:32:55 -08:00
Dan Albert
d36691c9df am 2b3c63f7: Ignore failures from failed cleanup.
* commit '2b3c63f7049d05a7affe265fed13516d16e6810e':
  Ignore failures from failed cleanup.
2015-01-15 02:57:41 +00:00
Dan Albert
2b3c63f704 Ignore failures from failed cleanup.
This `try` used to be in the function above, but an upstream change
made it our responsibility.

Change-Id: I34f1dca7244f67242b7a8f2979bf7560bc12b706
2015-01-14 18:08:38 -08:00
Dan Albert
14c34cc437 am 8234f20a: Update the test configs to match the new layout.
* commit '8234f20ae712e95ececf56ea3d03204eaf6fdc9b':
  Update the test configs to match the new layout.
2015-01-09 23:31:26 +00:00
Dan Albert
89748c112e am 036dcf63: [libc++] Refactor test components into modules.
* commit '036dcf6304186ba716ec2dc27b2e1866dca10204':
  [libc++] Refactor test components into modules.
2015-01-09 23:31:25 +00:00
Dan Albert
8234f20ae7 Update the test configs to match the new layout.
Everything can be broken out into modules now, so there's not need to
keep the whole world in one file. This also brings us to the point
where we no longer require changes to any files in test/ compared to
upstream, only new files.

Change-Id: I3da27e12e6e2890355013c51567415436c4b517b
2015-01-09 11:35:20 -08:00
Dan Albert
036dcf6304 [libc++] Refactor test components into modules.
Summary:
I've moved the bulk of `lit.cfg` into `test/libcxx/testconfig.py` and
`test/libcxx/testformat.py`. All that remains in `lit.cfg` is the
logic to discover lit.site.cfg if lit.cfg was run directly, and the
logic for loading configuration variants.

The configuration variant flow has changed with this patch. Rather
than instantiating an object of type `<VARIANT>Configuration`, we now
instatiate an object of type `Configuration` that was loaded from the
module `<VARIANT>.testconfig.py`.

This has to be done on a per-project basis rather than in LIT itself
because LIT doesn't actually know where the real test directory is,
only where the site configuration is (which is usually in the output
directory). It's simple enough to do though, so it's fine to require
each project to do it themselves.

I also cleaned up all the pylint issues while I was here, which was
mostly just a matter of fixing long lines.

Reviewers: mclow.lists, jroelofs, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6881

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225532 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit aa66357f48)

Change-Id: I07dafbe1085d9decd42f6aa28889dde1f5aaaa85
2015-01-09 10:28:22 -08:00
Dan Albert
320a3ed7dc am 4f3d0224: Allow arbitrary arguments to be passed to LIT.
* commit '4f3d02244b6073b1aacd4b6c3d12551fbfbd24cc':
  Allow arbitrary arguments to be passed to LIT.
2015-01-09 01:56:50 +00:00
Dan Albert
4f3d02244b Allow arbitrary arguments to be passed to LIT.
This allows the buildbot to use the --xunit-xml-output flag for better
reporting.

Change-Id: Ic9445d889e48cf0da55d5b08127446470dd34e98
2015-01-08 15:40:50 -08:00
Dan Albert
a60f5e0920 am 78f8c198: Make it easier to run test variants.
* commit '78f8c1981eed69d751b26958ea12262d4c663fe6':
  Make it easier to run test variants.
2015-01-08 06:39:18 +00:00
Dan Albert
78f8c1981e Make it easier to run test variants.
This adds all the permutations for tests as make targets of the form
test-libcxx-(host|target)-(clang|gcc)-(32|64).

This also changes the host tests to use the Android build system (like
I had done with https://android-review.googlesource.com/#/c/111924/).
This probably should have been a separate patch, but I got carried
away (and wanted to make sure this new approach would work for both),
and now they're non-trivial to split.

Change-Id: Ie99caf6c3ff21c833408f99d37299d966ee7bc94
2015-01-07 17:40:56 -08:00
Dan Albert
484d5d4941 am 3461be0c: Update Android LIT code to match API changes.
* commit '3461be0c177d5eb6869f184bf2814ce43e6b2e1b':
  Update Android LIT code to match API changes.
2015-01-07 18:12:06 +00:00