diff options
17 files changed, 67 insertions, 46 deletions
@@ -14,11 +14,26 @@ package { default_visibility: ["//visibility:private"], + default_applicable_licenses: ["external_apache-harmony_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "external_apache-harmony_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], } java_test { name: "apache-harmony-tests", visibility: [ + "//art/build/sdk", "//cts/tests/libcore/luni", ], hostdex: true, diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..d97975c --- /dev/null +++ b/METADATA @@ -0,0 +1,3 @@ +third_party { + license_type: NOTICE +} @@ -2,9 +2,7 @@ allight@google.com oth@google.com ngeoffray@google.com -shertz@google.com # For build / style / minor test fixes: include platform/libcore:/OWNERS -agampe@google.com -sehr@google.com +calin@google.com diff --git a/jdwp/Android.bp b/jdwp/Android.bp index b1af1b5..83e3d28 100644 --- a/jdwp/Android.bp +++ b/jdwp/Android.bp @@ -1,3 +1,27 @@ +package { + default_applicable_licenses: ["external_apache-harmony_jdwp_license"], +} + +// Added automatically by a large-scale-change +// +// large-scale-change included anything that looked like it might be a license +// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. +// +// Please consider removing redundant or irrelevant files from 'license_text:'. +// See: http://go/android-license-faq +license { + name: "external_apache-harmony_jdwp_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "COPYRIGHT.txt", + "LICENSE.txt", + "NOTICE.txt", + ], +} + java_genrule { name: "SourceDebugExtensionMockClass_gen", host_supported: true, @@ -10,6 +34,7 @@ java_genrule { java_test { name: "apache-harmony-jdwp-tests", visibility: [ + "//art/build/sdk", "//cts/tests/jdwp", ], hostdex: true, diff --git a/jdwp/AndroidTest.xml b/jdwp/AndroidTest.xml deleted file mode 100644 index faf3b33..0000000 --- a/jdwp/AndroidTest.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2015 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. ---> -<configuration description="Base config for JDWP testing in CTS"> - <include name="common-config" /> - <!-- Removes temporary dalvik-cache directory created by JDWP tests --> - <option name="run-command:teardown-command" value="rm -rf /data/local/tmp/dalvik-cache" /> -</configuration> diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/DDMDebuggee.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/DDMDebuggee.java index 0fa81e8..543e5be 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/DDMDebuggee.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/DDMDebuggee.java @@ -56,10 +56,10 @@ public class DDMDebuggee extends SyncDebuggee { public int disconnectCount = 0; @Override - public void connected() { connectCount++; } + public void onConnected() { connectCount++; } @Override - public void disconnected() { disconnectCount++; } + public void onDisconnected() { disconnectCount++; } @Override public Chunk handleChunk(Chunk request) { diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java index 3671af3..5991a94 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java @@ -79,8 +79,8 @@ public class CombinedEvents003Test extends CombinedEventsTestCase { long runMethodID = debuggeeWrapper.vmMirror.getMethodID(debuggeeClassID, "run"); logWriter.println("=> runMethodID = " + runMethodID); - long dummyMethodID = debuggeeWrapper.vmMirror.getMethodID(debuggeeClassID, "dummyMethod"); - logWriter.println("=> dummyMethodID = " + dummyMethodID); + long fakeMethodID = debuggeeWrapper.vmMirror.getMethodID(debuggeeClassID, "fakeMethod"); + logWriter.println("=> fakeMethodID = " + fakeMethodID); logWriter.println(""); logWriter.println("=> Info for tested method '" + methodForEvents + "':"); diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedExceptionEventsDebuggee.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedExceptionEventsDebuggee.java index de1825a..ecfe84c 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedExceptionEventsDebuggee.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedExceptionEventsDebuggee.java @@ -43,7 +43,7 @@ public class CombinedExceptionEventsDebuggee extends SyncDebuggee { logWriter.println("-> CombinedExceptionEventsDebuggee: Starting..."); // Preload exception classes - new SubDebuggeeException("dummy"); + new SubDebuggeeException("fake"); synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY); diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionCaughtDebuggee.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionCaughtDebuggee.java index 57e27b5..14edd22 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionCaughtDebuggee.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionCaughtDebuggee.java @@ -48,7 +48,7 @@ public class ExceptionCaughtDebuggee extends SyncDebuggee { logWriter.println("-- ExceptionCatchDebuggee: STARTED"); // Cause loading of DebuggeeException so it is visible from the test. - new DebuggeeException("dummy exception"); + new DebuggeeException("fake exception"); synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY); diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionUncaughtDebuggee.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionUncaughtDebuggee.java index 21152bc..d7f6de2 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionUncaughtDebuggee.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionUncaughtDebuggee.java @@ -44,7 +44,7 @@ public class ExceptionUncaughtDebuggee extends SyncDebuggee { logWriter.println("-- ExceptionUncaughtDebuggee: STARTED"); // Cause loading of DebuggeeException so it is visible from the test. - new DebuggeeException("dummy exception"); + new DebuggeeException("fake exception"); synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY); diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionWithLocationDebuggee.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionWithLocationDebuggee.java index 2816c4f..5c773c2 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionWithLocationDebuggee.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionWithLocationDebuggee.java @@ -51,7 +51,7 @@ public class ExceptionWithLocationDebuggee extends SyncDebuggee { logWriter.println("ExceptionWithLocationDebuggee: STARTED"); // load and prepare DebuggeeException class @SuppressWarnings("unused") - DebuggeeException ex = new DebuggeeException("dummy exception"); + DebuggeeException ex = new DebuggeeException("fake exception"); synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY); diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/MultiSession/ExceptionDebuggee.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/MultiSession/ExceptionDebuggee.java index a1e18a1..a2fb675 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/MultiSession/ExceptionDebuggee.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/MultiSession/ExceptionDebuggee.java @@ -39,27 +39,27 @@ public class ExceptionDebuggee extends SyncDebuggee { public static void main(String[] args) { runDebuggee(ExceptionDebuggee.class); } - + @Override public void run(){ - + logWriter.println("--> ExceptionDebuggee: STARTED"); // load and prepare DebuggeeException class - DebuggeeException ex = new DebuggeeException("dummy exception"); - + DebuggeeException ex = new DebuggeeException("fake exception"); + synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY); - + logWriter.println("--> ExceptionDebuggee: Wait for SGNL_CONTINUE..."); synchronizer.receiveMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE); logWriter.println("--> ExceptionDebuggee: SGNL_CONTINUE has been received!"); - + try { // throw caught exception throw new DebuggeeException("Caught debuggee exception"); } catch (DebuggeeException e) { logWriter.println("-- ExceptionDebuggee: Exception: \""+e.getMessage()+"\" was thrown"); } - + synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY); logWriter.println("DUMP{" + ex + "}"); diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValues002Test.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValues002Test.java index 641bba9..e4fcf01 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValues002Test.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValues002Test.java @@ -131,7 +131,7 @@ public class GetValues002Test extends JDWPSyncTestCase { assertEquals("Invalid number of values,", checkedFieldsNumber - 1, returnedValuesNumber); byte expectedFieldTags[] = { - 0, // dummy + 0, // placeholder JDWPConstants.Tag.LONG_TAG, JDWPConstants.Tag.INT_TAG, JDWPConstants.Tag.STRING_TAG, diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValuesTest.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValuesTest.java index 7d86429..5339ec2 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValuesTest.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/GetValuesTest.java @@ -130,7 +130,7 @@ public class GetValuesTest extends JDWPSyncTestCase { assertEquals("Invalid number of values,", checkedFieldsNumber - 1, returnedValuesNumber); byte expectedFieldTags[] = { - 0, // dummy + 0, // fake JDWPConstants.Tag.INT_TAG, JDWPConstants.Tag.LONG_TAG, JDWPConstants.Tag.OBJECT_TAG, diff --git a/support/src/test/java/tests/support/Support_DummyPKCS12Keystore.java b/support/src/test/java/tests/support/Support_FakePKCS12Keystore.java index 9dedff3..7a13af4 100644 --- a/support/src/test/java/tests/support/Support_DummyPKCS12Keystore.java +++ b/support/src/test/java/tests/support/Support_FakePKCS12Keystore.java @@ -33,9 +33,9 @@ import java.util.Enumeration; /** * Empty implementation used to enable unit tests to run. */ -public class Support_DummyPKCS12Keystore extends KeyStoreSpi { +public class Support_FakePKCS12Keystore extends KeyStoreSpi { - public Support_DummyPKCS12Keystore() { + public Support_FakePKCS12Keystore() { super(); } diff --git a/support/src/test/java/tests/support/Support_ProviderJCE.java b/support/src/test/java/tests/support/Support_ProviderJCE.java index 6687a33..7949e51 100644 --- a/support/src/test/java/tests/support/Support_ProviderJCE.java +++ b/support/src/test/java/tests/support/Support_ProviderJCE.java @@ -22,7 +22,7 @@ import java.security.PrivilegedAction; import java.security.Provider; /** - * This class implements a dummy security provider + * This class implements a fake security provider */ public class Support_ProviderJCE extends Provider { private static final long serialVersionUID = 1L; @@ -37,7 +37,7 @@ public class Support_ProviderJCE extends Provider { + " DSA key, parameter generation and signing; SHA-1 digest"; /** - * Constructs a new instance of the dummy provider. + * Constructs a new instance of the fake provider. */ public Support_ProviderJCE() { super(NAME, VERSION, INFO); diff --git a/support/src/test/java/tests/support/Support_ProviderRSA.java b/support/src/test/java/tests/support/Support_ProviderRSA.java index 4db0043..26fa6f2 100644 --- a/support/src/test/java/tests/support/Support_ProviderRSA.java +++ b/support/src/test/java/tests/support/Support_ProviderRSA.java @@ -22,7 +22,7 @@ import java.security.PrivilegedAction; import java.security.Provider; /** - * This class implements a dummy provider. + * This class implements a fake provider. */ public class Support_ProviderRSA extends Provider { private static final long serialVersionUID = 1L; @@ -37,7 +37,7 @@ public class Support_ProviderRSA extends Provider { + " DSA key, parameter generation and signing; SHA-1 digest"; /** - * Constructs a new instance of the dummy provider. + * Constructs a new instance of the fake provider. */ public Support_ProviderRSA() { super(NAME, VERSION, INFO); |