Verify ART run-tests' standard output and standard error separately.

Introduce expected standard error files for ART run-tests. Collect
tests' standard output and standard error separately and check them
against the corresponding expectation file.

Test: Run ART run-tests on host and device using `testrunner.py`.
Test: atest --test-mapping art:all
Test: atest --test-mapping cts/hostsidetests/jvmti:all
Bug: 171865375
Bug: 147812905
Change-Id: Ie95bec4a4684ff6791d464124ce8976339432d1f
diff --git a/test/1963-add-to-dex-classloader-in-memory/Android.bp b/test/1963-add-to-dex-classloader-in-memory/Android.bp
index a9eb0d0..9de3dd0 100644
--- a/test/1963-add-to-dex-classloader-in-memory/Android.bp
+++ b/test/1963-add-to-dex-classloader-in-memory/Android.bp
@@ -8,13 +8,24 @@
     defaults: ["art-run-test-defaults"],
     test_config_template: ":art-run-test-target-no-test-suite-tag-template",
     srcs: ["src/**/*.java"],
-    data: [":art-run-test-1963-add-to-dex-classloader-in-memory-expected-stdout"],
+    data: [
+        ":art-run-test-1963-add-to-dex-classloader-in-memory-expected-stdout",
+        ":art-run-test-1963-add-to-dex-classloader-in-memory-expected-stderr",
+    ],
 }
 
-// Test's expected output.
+// Test's expected standard output.
 genrule {
     name: "art-run-test-1963-add-to-dex-classloader-in-memory-expected-stdout",
     out: ["art-run-test-1963-add-to-dex-classloader-in-memory-expected-stdout.txt"],
     srcs: ["expected-stdout.txt"],
     cmd: "cp -f $(in) $(out)",
 }
+
+// Test's expected standard error.
+genrule {
+    name: "art-run-test-1963-add-to-dex-classloader-in-memory-expected-stderr",
+    out: ["art-run-test-1963-add-to-dex-classloader-in-memory-expected-stderr.txt"],
+    srcs: ["expected-stderr.txt"],
+    cmd: "cp -f $(in) $(out)",
+}
diff --git a/test/1963-add-to-dex-classloader-in-memory/check b/test/1963-add-to-dex-classloader-in-memory/check
index ae1ebf3..d536891 100755
--- a/test/1963-add-to-dex-classloader-in-memory/check
+++ b/test/1963-add-to-dex-classloader-in-memory/check
@@ -14,6 +14,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Inputs:
+# $1: Test's expected standard output
+# $2: Test's actual standard output
+# $3: Test's expected standard error
+# $4: Test's actual standard error
+
 # Some of our test devices are so old that they don't have memfd_create and are setup in such a way
 # that tmpfile() doesn't work. In these cases this test cannot complete successfully.
 
diff --git a/test/1963-add-to-dex-classloader-in-memory/expected-stderr.txt b/test/1963-add-to-dex-classloader-in-memory/expected-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/1963-add-to-dex-classloader-in-memory/expected-stderr.txt