Skip to content

Commit

Permalink
Re-add ComposHostTestCases
Browse files Browse the repository at this point in the history
We want to run them as a presubmit here, since ART changes can cause
the tests to fail and we want to catch that.

Commit c3cb031 removed them from
presubmit since they were flaky on cuttlefish, but they are now
disabled on cuttlefish.

Now run them using avf-presubmit, which will ensure they run on some
real devices.

Bug: 264496291
Test: Presubmit
Change-Id: I9ff8120d2694305210fe7d9416ce346310ba722a
  • Loading branch information
AlanStokes committed Apr 11, 2023
1 parent f76ca8c commit 88834c9
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 0 deletions.
32 changes: 32 additions & 0 deletions TEST_MAPPING
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@
{
"name": "art-run-test-2044-get-stack-traces[com.google.android.art.apex]"
},
{
"name": "art-run-test-2046-checker-comparison[com.google.android.art.apex]"
},
{
"name": "art-run-test-2047-checker-const-string-length[com.google.android.art.apex]"
},
{
"name": "art-run-test-2231-checker-heap-poisoning[com.google.android.art.apex]"
},
Expand Down Expand Up @@ -484,6 +490,9 @@
{
"name": "art-run-test-2259-checker-code-sinking-infinite-try-catch[com.google.android.art.apex]"
},
{
"name": "art-run-test-2260-checker-inline-unimplemented-intrinsics[com.google.android.art.apex]"
},
{
"name": "art-run-test-300-package-override[com.google.android.art.apex]"
},
Expand Down Expand Up @@ -1834,6 +1843,12 @@
{
"name": "art-run-test-2044-get-stack-traces"
},
{
"name": "art-run-test-2046-checker-comparison"
},
{
"name": "art-run-test-2047-checker-const-string-length"
},
{
"name": "art-run-test-2231-checker-heap-poisoning"
},
Expand Down Expand Up @@ -1894,6 +1909,9 @@
{
"name": "art-run-test-2259-checker-code-sinking-infinite-try-catch"
},
{
"name": "art-run-test-2260-checker-inline-unimplemented-intrinsics"
},
{
"name": "art-run-test-300-package-override"
},
Expand Down Expand Up @@ -3228,6 +3246,12 @@
{
"name": "art-run-test-2044-get-stack-traces"
},
{
"name": "art-run-test-2046-checker-comparison"
},
{
"name": "art-run-test-2047-checker-const-string-length"
},
{
"name": "art-run-test-2231-checker-heap-poisoning"
},
Expand Down Expand Up @@ -3288,6 +3312,9 @@
{
"name": "art-run-test-2259-checker-code-sinking-infinite-try-catch"
},
{
"name": "art-run-test-2260-checker-inline-unimplemented-intrinsics"
},
{
"name": "art-run-test-300-package-override"
},
Expand Down Expand Up @@ -4188,5 +4215,10 @@
{
"name": "libnativeloader_test"
}
],
"avf-presubmit": [
{
"name": "ComposHostTestCases"
}
]
}
43 changes: 43 additions & 0 deletions test/2046-checker-comparison/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Generated by `regen-test-files`. Do not edit manually.

// Build rules for ART run-test `2046-checker-comparison`.

package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "art_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["art_license"],
}

// Test's Dex code.
java_test {
name: "art-run-test-2046-checker-comparison",
defaults: ["art-run-test-defaults"],
test_config_template: ":art-run-test-target-template",
srcs: ["src/**/*.java"],
data: [
":art-run-test-2046-checker-comparison-expected-stdout",
":art-run-test-2046-checker-comparison-expected-stderr",
],
// Include the Java source files in the test's artifacts, to make Checker assertions
// available to the TradeFed test runner.
include_srcs: true,
}

// Test's expected standard output.
genrule {
name: "art-run-test-2046-checker-comparison-expected-stdout",
out: ["art-run-test-2046-checker-comparison-expected-stdout.txt"],
srcs: ["expected-stdout.txt"],
cmd: "cp -f $(in) $(out)",
}

// Test's expected standard error.
genrule {
name: "art-run-test-2046-checker-comparison-expected-stderr",
out: ["art-run-test-2046-checker-comparison-expected-stderr.txt"],
srcs: ["expected-stderr.txt"],
cmd: "cp -f $(in) $(out)",
}
43 changes: 43 additions & 0 deletions test/2047-checker-const-string-length/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Generated by `regen-test-files`. Do not edit manually.

// Build rules for ART run-test `2047-checker-const-string-length`.

package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "art_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["art_license"],
}

// Test's Dex code.
java_test {
name: "art-run-test-2047-checker-const-string-length",
defaults: ["art-run-test-defaults"],
test_config_template: ":art-run-test-target-template",
srcs: ["src/**/*.java"],
data: [
":art-run-test-2047-checker-const-string-length-expected-stdout",
":art-run-test-2047-checker-const-string-length-expected-stderr",
],
// Include the Java source files in the test's artifacts, to make Checker assertions
// available to the TradeFed test runner.
include_srcs: true,
}

// Test's expected standard output.
genrule {
name: "art-run-test-2047-checker-const-string-length-expected-stdout",
out: ["art-run-test-2047-checker-const-string-length-expected-stdout.txt"],
srcs: ["expected-stdout.txt"],
cmd: "cp -f $(in) $(out)",
}

// Test's expected standard error.
genrule {
name: "art-run-test-2047-checker-const-string-length-expected-stderr",
out: ["art-run-test-2047-checker-const-string-length-expected-stderr.txt"],
srcs: ["expected-stderr.txt"],
cmd: "cp -f $(in) $(out)",
}
43 changes: 43 additions & 0 deletions test/2260-checker-inline-unimplemented-intrinsics/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Generated by `regen-test-files`. Do not edit manually.

// Build rules for ART run-test `2260-checker-inline-unimplemented-intrinsics`.

package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "art_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["art_license"],
}

// Test's Dex code.
java_test {
name: "art-run-test-2260-checker-inline-unimplemented-intrinsics",
defaults: ["art-run-test-defaults"],
test_config_template: ":art-run-test-target-template",
srcs: ["src/**/*.java"],
data: [
":art-run-test-2260-checker-inline-unimplemented-intrinsics-expected-stdout",
":art-run-test-2260-checker-inline-unimplemented-intrinsics-expected-stderr",
],
// Include the Java source files in the test's artifacts, to make Checker assertions
// available to the TradeFed test runner.
include_srcs: true,
}

// Test's expected standard output.
genrule {
name: "art-run-test-2260-checker-inline-unimplemented-intrinsics-expected-stdout",
out: ["art-run-test-2260-checker-inline-unimplemented-intrinsics-expected-stdout.txt"],
srcs: ["expected-stdout.txt"],
cmd: "cp -f $(in) $(out)",
}

// Test's expected standard error.
genrule {
name: "art-run-test-2260-checker-inline-unimplemented-intrinsics-expected-stderr",
out: ["art-run-test-2260-checker-inline-unimplemented-intrinsics-expected-stderr.txt"],
srcs: ["expected-stderr.txt"],
cmd: "cp -f $(in) $(out)",
}
5 changes: 5 additions & 0 deletions test/utils/regen-test-files
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ class Generator:
for t in mainline_presubmit_tests
]

# Android Virtualization Framework presubmits
avf_presubmit_tests = ["ComposHostTestCases"]
avf_presubmit_tests_dict = [{"name": t} for t in avf_presubmit_tests]

# Presubmits.
other_presubmit_tests = [
"ArtServiceTests",
Expand All @@ -622,6 +626,7 @@ class Generator:
("mainline-presubmit", mainline_presubmit_tests_dict),
("presubmit", presubmit_tests_dict),
("hwasan-presubmit", hwasan_presubmit_tests_dict),
("avf-presubmit", avf_presubmit_tests_dict),
]
if test_group_dict
])
Expand Down

0 comments on commit 88834c9

Please sign in to comment.