From a13888fd0e05f662bb23fd96677bec080b7c5b11 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 9 Aug 2018 18:25:48 -0700 Subject: android: Add nortti/noexcept test targets Test: make -j librxcpp-tests librxcpp-tests-upstream # and run Change-Id: I5e6451f9631d9e99865942506eab21bac5a44be9 --- Android.bp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Android.bp b/Android.bp index bb5a423..1e3fdec 100644 --- a/Android.bp +++ b/Android.bp @@ -18,17 +18,32 @@ cc_library_headers { export_include_dirs: ["Rx/v2/src"] } -cc_test { - name: "librxcpp-tests", +cc_defaults { + name: "librxcpp-tests-defaults", host_supported: true, srcs: [ "Rx/v2/test/**/*.cpp", ], - whole_static_libs: ["libcatch2-upstream"], header_libs: ["librxcpp"], gtest: false, - // Temporarily allow exceptions for all the use of try/catch in rxcpp. +} + +cc_test { + // "Upstream" config. Use exceptions. + // Ensure that if we update from upstream later that the merged code + // is still working on Android. + name: "librxcpp-tests-upstream", + defaults: ["librxcpp-tests-defaults"], + whole_static_libs: ["libcatch2-upstream"], + // Allow exceptions for all the use of try/catch/throw in rxcpp. cflags: ["-fexceptions"], - // Enable RTTI required to compile libcatch. - rtti: true, +} + +cc_test { + // "AOSP" config. Disable exceptions. + // Anything in AOSP using librxcpp will use it as this config, so + // that's what we really care about testing. + name: "librxcpp-tests", + defaults: ["librxcpp-tests-defaults"], + whole_static_libs: ["libcatch2"], } -- cgit v1.2.3