diff options
author | Dan Albert <danalbert@google.com> | 2014-07-18 14:15:56 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-07-25 17:39:44 +0000 |
commit | 0f81d7634f698157ddef3061713caca314f59ca4 (patch) | |
tree | 273f27d55940485c98a9cfc1241d96e343d3f91c /Android.mk | |
parent | 8caa123b96b5c7151f652003b2674dddf763a234 (diff) | |
download | external_libcxx-0f81d7634f698157ddef3061713caca314f59ca4.tar.gz external_libcxx-0f81d7634f698157ddef3061713caca314f59ca4.tar.bz2 external_libcxx-0f81d7634f698157ddef3061713caca314f59ca4.zip |
Add support for LIT to Android.mk.
Now that test/lit.cfg can handle running tests on Android devices, we
can move testing over to LIT so that it's easier to stay in sync with
upstream (no longer have to run test/makemake.py to regenerate makefiles
for each test). Also, we can now actually run all of the xfail tests
(tests that are considered passing if compilation fails).
The libc++ tests can be run with:
$ mm test-libcxx # run all tests
$ mm test-libcxx-host # host only
$ mm test-libcxx-device # device only (uses current lunch target)
Actually generating the cppflags and ldflags is done in test/device.cfg.
It's a little ugly, but it does a decent job of approximating our build
system while still allowing us to finish a test run in less than 7
hours. Additional devices can be added to the config as needed.
Change-Id: Ieba38912a213c43e54e03ab9b8c4e25f019b0305
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk index 65b44b713..69144531e 100644 --- a/Android.mk +++ b/Android.mk @@ -122,4 +122,16 @@ endif LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk include $(BUILD_HOST_SHARED_LIBRARY) +LIT := $(ANDROID_BUILD_TOP)/external/llvm/utils/lit/lit.py +test-libcxx-host: libc++ + LIT=$(LIT) LIT_MODE=host make -f $(ANDROID_BUILD_TOP)/external/libcxx/test.mk +test-libcxx-target: libc++ + LIT=$(LIT) LIT_MODE=device make -f $(ANDROID_BUILD_TOP)/external/libcxx/test.mk + +# Don't want to just make test-libcxx-(host|target) dependencies of this because +# the two families can't be run concurrently. +test-libcxx: libc++ + LIT=$(LIT) LIT_MODE=host make -f $(ANDROID_BUILD_TOP)/external/libcxx/test.mk + LIT=$(LIT) LIT_MODE=device make -f $(ANDROID_BUILD_TOP)/external/libcxx/test.mk + endif # TARGET_BUILD_APPS |