From 0c598c27ac816e8e9589e0a8ae82d1dbbd2a7757 Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Thu, 12 Nov 2026 16:25:26 +0000 Subject: [PATCH 1/2] Android emulator tests: make the AVD where the emulator looks for it Release run 43251862764's emulator exited at once: "Unknown AVD name [tslang_api29_x86_64] ... no file tslang_api29_x86_64.ini in $HOME/.android/avd". The runner's avdmanager had made it elsewhere. The run job sets ANDROID_USER_HOME and ANDROID_AVD_HOME for both, and the install step checks that `emulator -list-avds` names the AVD. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test-android.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test-android.yml b/.github/workflows/test-android.yml index 0aca60e9f..f9fd79634 100644 --- a/.github/workflows/test-android.yml +++ b/.github/workflows/test-android.yml @@ -111,6 +111,11 @@ jobs: needs: build runs-on: ubuntu-24.04 timeout-minutes: 90 + # one place for avdmanager to make the AVD and the emulator to find it: left to themselves the + # runner's command-line tools made it where the emulator does not look ("Unknown AVD name") + env: + ANDROID_USER_HOME: ${{ github.workspace }}/__android + ANDROID_AVD_HOME: ${{ github.workspace }}/__android/avd steps: - name: Checkout code uses: actions/checkout@v4 @@ -149,7 +154,9 @@ jobs: sdkmanager=$sdk/cmdline-tools/latest/bin/sdkmanager yes | $sdkmanager --licenses > /dev/null || true $sdkmanager --install "emulator" "platform-tools" "system-images;android-29;default;x86_64" > /dev/null + mkdir -p "$ANDROID_AVD_HOME" echo no | $sdk/cmdline-tools/latest/bin/avdmanager create avd --force -n tslang_api29_x86_64 -k "system-images;android-29;default;x86_64" + $sdk/emulator/emulator -list-avds | grep -x tslang_api29_x86_64 || { echo "the emulator does not see the AVD:"; ls -R "$ANDROID_USER_HOME"; exit 1; } echo "$sdk/emulator" >> "$GITHUB_PATH" echo "$sdk/platform-tools" >> "$GITHUB_PATH" From 2fe1f800a2af062d538951e1d3b91150c28047df Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Thu, 12 Nov 2026 16:37:09 +0000 Subject: [PATCH 2/2] Android emulator tests: a published package runs with its own release's tests PR #829's run booted the emulator and passed everything but two tester tests, 00class_override_arity and 00optional_union_truthiness, under every model: both came after v0.0-pre-alpha124 with the compiler fixes they check (#811, #815). When the job takes a published release's package, it now takes that release's tslang/test/tester/tests and CMakeLists.txt too; the runner and its skips stay the commit's own. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test-android.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-android.yml b/.github/workflows/test-android.yml index f9fd79634..cca7936ad 100644 --- a/.github/workflows/test-android.yml +++ b/.github/workflows/test-android.yml @@ -6,7 +6,8 @@ name: Test - Android (emulator) # Windows, so Windows builds the programs and Linux, which has KVM, runs the emulator. # # create-release.yml calls it with the package it has just built (package: artifact). A pull request -# that changes the runner, and a manual run, test the latest published release's package. +# that changes the runner, and a manual run, test the latest published release's package, with that +# release's tester tests. on: workflow_call: @@ -73,6 +74,12 @@ jobs: Write-Host "release: $tag" gh release download $tag --repo ${{ github.repository }} --pattern '*-windows-x64.zip' if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + # that release's compiler with that release's tests: a test added since checks a fix it + # does not have. The runner and its skips stay this commit's - they are what is tested. + git fetch --depth=1 origin tag $tag + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + git checkout $tag -- tslang/test/tester/tests tslang/test/tester/CMakeLists.txt + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - name: Unpack the package shell: pwsh