Merge "Clean up hoststubgen README files" into main
diff --git a/tools/hoststubgen/README.md b/tools/hoststubgen/README.md
index b0a1262..3455b0a 100644
--- a/tools/hoststubgen/README.md
+++ b/tools/hoststubgen/README.md
@@ -2,19 +2,27 @@
## Overview
-This directory contains tools / sample code / investigation for host side test support.
+HostStubGen is a tool built for ravenwood. It can read an Android framework jar file
+(such as `framework-minus-apex.jar` or `framework-all.jar`) and
+converts them, so that they can be used on the Ravenwood environment.
+This directory contains the HostStubGen source code, tests and some library source files
+used at runtime.
+
+- HostStubGen itself is design to be agnostic to Android. It doesn't use any Android APIs
+(hidden or not). But it may use Android specific knowledge -- e.g. as of now,
+AndroidHeuristicsFilter has hardcoded heuristics to detect AIDL generated classes.
+
+- `test-tiny-framework/` contains basic tests that are agnostic to Android.
+
+- More Android specific build files and code are stored in `frameworks/base/Ravenwood.bp`
+ `frameworks/base/ravenwood`.
## Directories and files
- `hoststubgen/`
Contains source code of the "hoststubgen" tool and relevant code
- - `framework-policy-override.txt`
- This file contains "policy overrides", which allows to control what goes to stub/impl without
- having to touch the target java files. This allows quicker iteration, because you can skip
- having to rebuild framework.jar.
-
- `src/`
HostStubGen tool source code.
@@ -26,14 +34,12 @@
- `test-tiny-framework/` See `README.md` in it.
- - `test-framework` See `README.md` in it.
+ - `test-framework`
+ This directory was used during the prototype phase, but now that we have real ravenwood tests,
+ this directory is obsolete and should be deleted.
+
- `scripts`
- - `run-host-test.sh`
-
- Run a host side test. Use it instead of `atest` for now. (`atest` works "mostly" but it has
- problems.)
-
- `dump-jar.sh`
A script to dump the content of `*.class` and `*.jar` files.
@@ -53,8 +59,8 @@
### Run the tests
-- Run all relevant tests and test scripts. Some of thests are still expected to fail,
- but this should print "finished, with no unexpected failures" at the end.
+- Run all relevant tests and test scripts. All of it is expected to pass, and it'll print
+ "Ready to submit" at the end.
However, because some of the script it executes depend on internal file paths to Soong's
intermediate directory, some of it might fail when something changes in the build system.
@@ -74,3 +80,7 @@
(or at least check it.)
- The `HostStubGenTest-framework-test-host-test-lib` jar somehow contain all ASM classes? Figure out where the dependency is coming from.
+
+- At some point, we can move or delete all Android specific code to `frameworks/base/ravenwood`.
+ - `helper-framework-*-src` should be moved to `frameworks/base/ravenwood`
+ - `test-framework` should be deleted.
\ No newline at end of file
diff --git a/tools/hoststubgen/hoststubgen/test-framework/README.md b/tools/hoststubgen/hoststubgen/test-framework/README.md
index f616ad6..26a9ad1 100644
--- a/tools/hoststubgen/hoststubgen/test-framework/README.md
+++ b/tools/hoststubgen/hoststubgen/test-framework/README.md
@@ -1,20 +1,21 @@
-# HostStubGen: real framework test
+# HostStubGen: (obsolete) real framework test
This directory contains tests against the actual framework.jar code. The tests were
copied from somewhere else in the android tree. We use this directory to quickly run existing
tests.
+This directory was used during the prototype phase, but now that we have real ravenwood tests,
+this directory is obsolete and should be deleted.
+
## How to run
- With `atest`. This is the proper way to run it, but it may fail due to atest's known problems.
- See the top level README.md on why `--no-bazel-mode` is needed (for now).
-
```
-$ atest --no-bazel-mode HostStubGenTest-framework-test-host-test
+$ atest HostStubGenTest-framework-all-test-host-test
```
-- Advanced option: `run-test-without-atest.sh` runs the test without using `atest` or `run-ravenwood-test`
+- Advanced option: `run-test-without-atest.sh` runs the test without using `atest`
```
$ ./run-test-without-atest.sh
diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md b/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md
index 3bfad9b..344b4e9 100644
--- a/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md
+++ b/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md
@@ -2,7 +2,7 @@
This directory contains a small classes that "simulates" framework.jar, and tests against it.
-This test doesn't use the actual android framework code.
+This test is agnostic to Android, and it doesn't use any android framework code or knowledge.
## How to run
diff --git a/tools/hoststubgen/scripts/run-all-tests.sh b/tools/hoststubgen/scripts/run-all-tests.sh
index 82faa91..4ea501e 100755
--- a/tools/hoststubgen/scripts/run-all-tests.sh
+++ b/tools/hoststubgen/scripts/run-all-tests.sh
@@ -53,4 +53,4 @@
# These tests should all pass.
run atest ${READY_TEST_MODULES[*]}
-echo ""${0##*/}" finished, with no unexpected failures. Ready to submit!"
\ No newline at end of file
+echo ""${0##*/}" finished, with no failures. Ready to submit!"
\ No newline at end of file