From 648a1c137663ef7207684d0d7009dd5518942111 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Fri, 24 Jul 2015 16:45:36 -0700 Subject: Prepare for arm64 prebuilts of RS support library. Bug: 22693954 This change fixes update_rs_prebuilts.sh to build for arm64 as well. It also makes some changes to RSTest_CompatLib for working on arm64 (i.e. removed APIs, etc.). The old version of RSTest_CompatLib is retained as RSTest_CompatLibLegacy, but it is disabled from building due to errors with mma and FORCE_BUILD_RS_COMPAT. We also now need to ensure we properly build all the required libraries (both .so and .a files). Change-Id: If89b8a542eb0d61db0ba186d4e3221bcc6e5664b --- .../src/com/android/rs/test/UT_unsigned.java | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java (limited to 'java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java') diff --git a/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java b/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java new file mode 100644 index 00000000..d2fb5f32 --- /dev/null +++ b/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.rs.test_compatlegacy; + +import android.content.Context; +import android.content.res.Resources; +import android.support.v8.renderscript.*; + +public class UT_unsigned extends UnitTest { + private Resources mRes; + + protected UT_unsigned(RSTestCore rstc, Resources res, Context ctx) { + super(rstc, "Unsigned", ctx); + mRes = res; + } + + private boolean initializeGlobals(ScriptC_unsigned s) { + short pUC = s.get_uc(); + if (pUC != 5) { + return false; + } + s.set_uc((short)129); + + long pUI = s.get_ui(); + if (pUI != 37) { + return false; + } + s.set_ui(0x7fffffff); + + return true; + } + + public void run() { + RenderScript pRS = RenderScript.create(mCtx); + ScriptC_unsigned s = new ScriptC_unsigned(pRS); + pRS.setMessageHandler(mRsMessage); + if (!initializeGlobals(s)) { + failTest(); + } else { + s.invoke_unsigned_test(); + pRS.finish(); + waitForMessage(); + } + pRS.destroy(); + } +} -- cgit v1.2.3