Skip to content

Commit ef98293

Browse files
fix(renderer): cover authored shape replay edge cases
Remove the unused feedback injection shader, use actual canvas dimensions for fallback border offsets, and cover textured inputs and multi-batch ordering. Allow source-bound validation workers to target 32-bit TVs. Host 260 tests and validation-tool 36 tests pass; device validation continues.
1 parent 01f808e commit ef98293

4 files changed

Lines changed: 266 additions & 76 deletions

File tree

‎tools/native-trails/README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Focused Native trails validation
22

3-
Use a dedicated, task-owned Android arm64 emulator. Do not use the corpus owner's
3+
Use a dedicated, task-owned Android emulator or a physical TV authorized for this task. Do not use the corpus owner's
44
`emulator-5580` or reuse another task's work directory. Physical GPU performance
55
and compatibility cannot be inferred from an emulator.
66

@@ -19,6 +19,11 @@ python tools/native-trails/build_validation.py --commit CANDIDATE_SHA --policy n
1919
python tools/native-trails/run_validation.py run --device OWNED_EMULATOR --workers build/native-trails/workers --presets tools/native-trails/presets.txt --work build/native-trails/focused
2020
```
2121

22+
The builder defaults to `--abi arm64-v8a`. For a TV running 32-bit Android (check
23+
`adb -s DEVICE shell getprop ro.product.cpu.abilist`), build both comparison roles
24+
with `--abi armeabi-v7a`. The selected ABI is recorded in the build identity;
25+
the production APK/core continue to include both supported ABIs.
26+
2227
The builders refuse existing role directories. Each build exports a committed
2328
revision, composes the existing Preset Lab deterministic engine instrumentation
2429
with the actual core, and records transformations and compiled AAR/APK identities.

‎tools/native-trails/build_validation.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def native_hashes(archive):
6767
for name in archive.namelist() if name.startswith("jni/") and name.endswith(".so")}
6868

6969

70-
def build(commit, policy, role, work):
70+
def build(commit, policy, role, work, abi="arm64-v8a"):
71+
if abi not in ("arm64-v8a", "armeabi-v7a"):
72+
raise ValueError("Unsupported ABI: " + abi)
7173
commit = subprocess.check_output(["git", "rev-parse", commit], cwd=ROOT, text=True).strip()
7274
destination = work.resolve() / role
7375
destination.mkdir(parents=True, exist_ok=False)
@@ -114,15 +116,15 @@ def build(commit, policy, role, work):
114116
change(cmake, text, changes, source)
115117
gradle = source / "core/build.gradle"
116118
change(gradle, once(gradle.read_text(), 'abiFilters "armeabi-v7a", "arm64-v8a"',
117-
'abiFilters "arm64-v8a"'), changes, source)
119+
'abiFilters "' + abi + '"'), changes, source)
118120
sdk = Path(os.environ.get("ANDROID_HOME", str(Path.home() / "Library/Android/sdk")))
119121
(source / "local.properties").write_text("sdk.dir=" + str(sdk) + "\n")
120122
patches = [{"name": p.name, "sha256": file_digest(p)}
121123
for p in sorted((source / "tools/projectm-patches").glob("*.patch"))]
122124
if [int(p["name"][:4]) for p in patches] != list(range(1, len(patches) + 1)):
123125
raise ValueError("Nonconsecutive patch series")
124126
(destination / "instrumentation.diff").write_text("".join(changes))
125-
identity = {"source_commit": commit, "policy": policy, "role": role,
127+
identity = {"source_commit": commit, "policy": policy, "role": role, "abi": abi,
126128
"ordered_patches": patches, "engine_identity": asdict(engine_identity),
127129
"builder_sha256": file_digest(Path(__file__)),
128130
"instrumentation_diff_sha256": file_digest(destination / "instrumentation.diff"),
@@ -198,6 +200,7 @@ def build(commit, policy, role, work):
198200
parser.add_argument("--commit", required=True)
199201
parser.add_argument("--policy", choices=("native", "capped"), required=True)
200202
parser.add_argument("--role", choices=("baseline-native", "baseline-capped", "candidate-native", "candidate-capped"), required=True)
203+
parser.add_argument("--abi", choices=("arm64-v8a", "armeabi-v7a"), default="arm64-v8a")
201204
parser.add_argument("--work", type=Path, default=ROOT / "build/native-trails/workers")
202205
args = parser.parse_args()
203-
build(args.commit, args.policy, args.role, args.work)
206+
build(args.commit, args.policy, args.role, args.work, abi=args.abi)

‎tools/native-trails/test_build_validation.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def test_all_reference_paths_share_one_frozen_override(self):
1818
self.assertNotIn('steady_clock::now()', changed)
1919
self.assertIn('lab::clock_seconds.load()', changed)
2020

21+
def test_invalid_abi_is_rejected_before_export(self):
22+
with tempfile.TemporaryDirectory() as temp:
23+
with self.assertRaisesRegex(ValueError, "Unsupported ABI"):
24+
builder.build("HEAD", "native", "candidate-native", Path(temp), abi="x86_64")
25+
self.assertEqual(list(Path(temp).iterdir()), [])
26+
2127
def test_native_directory_entries_are_not_artifacts(self):
2228
with tempfile.TemporaryDirectory() as temp:
2329
path = Path(temp) / 'sample.aar'

0 commit comments

Comments
 (0)