summaryrefslogtreecommitdiff
path: root/ravenwood/junit-stub-src
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@google.com> 2023-11-16 09:26:28 -0700
committer Jeff Sharkey <jsharkey@google.com> 2023-11-16 09:26:54 -0700
commit41cfbb3f010ca14bc952615e9b79a91bd0ddf921 (patch)
tree78af78f040e367177e6b054e4c595c65c171202c /ravenwood/junit-stub-src
parent36b2f5122c17694ba9b0a79a7c2f268fdaa8db3f (diff)
Build `ravenwood-junit` against `test_current`.
Some CTS tests desire to link against `test_current` to prove to themselves that they're not touching hidden APIs. This means if they also want to use our `ravenwood-junit` rules, that dependency also needs to link against `test_current`. Since we're reaching down into plenty of hidden details when we're actually running on a Ravenwood runtime, we split into a `stub` and an `impl` library, so that we give a cleanly compiling library to to clients, which is then replaced under the Ravenwood runtime. Bug: 292141694 Test: atest-dev CtsTextTestCasesRavenwood CtsTextTestCases Change-Id: I96dbc9643324a7853a992e97b51a88f70eb721f3
Diffstat (limited to 'ravenwood/junit-stub-src')
-rw-r--r--ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java b/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
new file mode 100644
index 000000000000..ecaff8084888
--- /dev/null
+++ b/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2023 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 android.platform.test.ravenwood;
+
+public class RavenwoodRuleImpl {
+ public static void init(RavenwoodRule rule) {
+ // Must be provided by impl to reference runtime internals
+ throw new UnsupportedOperationException();
+ }
+
+ public static void reset(RavenwoodRule rule) {
+ // Must be provided by impl to reference runtime internals
+ throw new UnsupportedOperationException();
+ }
+}