Skip to content

Link the Android native tests in CI and name them after their classes - #39

Merged
Xget7 merged 3 commits into
mainfrom
fix-ci-android-tests
Oct 20, 2026
Merged

Xget7 merged 3 commits into
mainfrom
fix-ci-android-tests

Conversation

@Xget7

@Xget7 Xget7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

CI now links every Android native test, and the test executables carry the Vulkan class names.

scripts/lint-cpp.sh
  configure build/lint/android  (SPLATKIT_ANDROID_BUILD_TESTS=ON, already there for clang-tidy)
  + build splatkit_android_tests -> splatkit_vulkan_{buffer,upload_pressure,world,lod_selection,
                                    visibility_pass,frame_compute,radix_sort}_test
  • The link step lives in scripts/lint-cpp.sh, not in android.yml.
    That script already owns the only Android test configuration, so a second configure in the workflow would duplicate the NDK flags.
    The Android mirror ships lint.yml and lint-cpp.sh, so the check reaches it too.
  • A new splatkit_android_tests aggregate target in packages/splatkit-android/tests/CMakeLists.txt lists the seven executables, so the script names none of them.
  • The renamed executables are splatkit_vulkan_<class>_test; nothing outside the CMake file and two usage strings referenced the old names.
  • The Android README gains "Native tests on a device" (configure, build, adb push, run), and CONTRIBUTING.md points to it.

Evidence

  • Before: a wrong source path or an undefined reference in a test target was never built by CI.
  • After: with VulkanRadixSort.cpp removed from the radix sort test, the new step fails with ld.lld: error: undefined symbol: splatkit::VulkanRadixSort::...; with a misspelled source path, CMake generation fails.
    Restored, scripts/lint-cpp.sh exits 0 and all seven aarch64 ELF executables exist.
  • Where it ran: macOS host, NDK 27.1.12297006 cross-build only.
    No physical device ran it; device runs are deferred to an end session.
  • Checks: scripts/lint-cpp.sh clean (exit 0); the README recipe built from a fresh directory; SPIR-V hashes of the nine baseline shaders unchanged; the world frame completion host check compiles and exits 0; python3 -m unittest discover -s scripts/tests 38 tests OK.
    Not run: sdk_harness.py check, Gradle build (no Gradle or Kotlin change), npm checks.

Merge Danger

Door: Two-way.

Reverting restores the old names and drops the extra CI step.

Blast Radius: CI

The lint job gains a link step (the cpp job took 8m5s on this PR; a recent main run took 11m); the Android mirror receives the same script and test CMake.

Xget7 added 3 commits October 20, 2026 01:17
The seven splatkit_*_test executables kept the names of the pre-restructure
layout (gpu_buffer, world, visibility, radix_sort, ...), so none of them matched
the Vulkan class vocabulary the sources and test files now use.
Each executable is now splatkit_vulkan_<class>_test, with the visibility and frame
tests spelled out as visibility_pass and frame_compute, and the two usage
strings follow. Nothing outside the CMake file and those strings referenced them.
The splatkit_*_test executables were only built on a developer's machine,
so a wrong source path or an undefined reference surfaced when the test
was pushed to a phone. scripts/lint-cpp.sh already configures the Android
tree with SPLATKIT_ANDROID_BUILD_TESTS=ON for clang-tidy, so it now also
builds the new splatkit_android_tests aggregate target, which links all
seven tests with the NDK toolchain, and prints the build log on failure.
Keeping it there leaves one script owning the Android test configuration,
and the Android mirror already ships lint.yml and lint-cpp.sh.
The splatkit_vulkan_*_test executables had no written recipe, so the
configure flags, the target and the adb steps lived only in agent notes.
The Android README gets a short "Native tests on a device" section, and
CONTRIBUTING.md now says the lint script links the tests while running
them on a phone stays a manual step.
@Xget7
Xget7 merged commit f976121 into main Oct 20, 2026
17 checks passed
@Xget7
Xget7 deleted the fix-ci-android-tests branch October 20, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant