Skip to content

Commit 7a0f534

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
Move e2e/ to tests/e2e/ and fix CI NDK version
- Relocate e2e test scripts and code to tests/e2e/ for cleaner layout - Update all references in Makefile, .gitignore, and shell scripts - Fix CI cross-compile failure by using NDK r28 (28.0.13004108) to match the NDK version used to generate capi/ bindings
1 parent d42bd33 commit 7a0f534

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ permissions:
1111
contents: read
1212

1313
env:
14-
ANDROID_NDK_VERSION: r27c
15-
ANDROID_NDK_DIR_NAME: "27.2.12479018"
14+
ANDROID_NDK_VERSION: r28
15+
ANDROID_NDK_DIR_NAME: "28.0.13004108"
1616

1717
jobs:
1818
test:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/discussion
22

33
# Compiled E2E test binary
4-
e2e/e2e_test
4+
tests/e2e/e2e_test
55

66
*.apk
77
_build/

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fixtures: specs-fixtures idiomatic
8383
regen: clean specs capi idiomatic
8484

8585
test:
86-
go test $$(go list ./... | grep -v -E '/(capi|e2e|examples)/|/ndk/[a-z][a-z0-9]*$$') -count=1
86+
go test $$(go list ./... | grep -v -E '/(capi|tests|examples)/|/ndk/[a-z][a-z0-9]*$$') -count=1
8787

8888
lint:
8989
golangci-lint run ./tools/...
@@ -98,15 +98,15 @@ check-examples:
9898
e2e-build:
9999
CGO_ENABLED=1 GOOS=android GOARCH=amd64 \
100100
CC=$(NDK_PATH)/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android35-clang \
101-
go build -o e2e/e2e_test ./e2e
101+
go build -o tests/e2e/e2e_test ./tests/e2e
102102

103103
# Run full E2E test on Android emulator (requires SDK + NDK + KVM)
104104
e2e: e2e-build
105-
ANDROID_HOME=$(dir $(NDK_PATH)) ./e2e/run.sh
105+
ANDROID_HOME=$(dir $(NDK_PATH)) ./tests/e2e/run.sh
106106

107107
# Run all examples on Android emulator (requires running emulator + NDK)
108108
e2e-examples:
109-
./e2e/run-examples.sh
109+
./tests/e2e/run-examples.sh
110110

111111
clean:
112112
@for m in $(MODULES); do rm -rf "capi/$$m/"; done
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
set -euo pipefail
1515

1616
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
17-
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
17+
PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
1818

1919
# Detect NDK.
2020
ANDROID_HOME="${ANDROID_HOME:-$HOME/Android/Sdk}"

e2e/run.sh renamed to tests/e2e/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
set -euo pipefail
1313

1414
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
15-
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
15+
PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
1616

1717
: "${ANDROID_HOME:?ANDROID_HOME must be set}"
1818
NDK_VERSION="${NDK_VERSION:-27.2.12479018}"
@@ -35,8 +35,8 @@ done
3535
echo "=== Step 1: Cross-compile ==="
3636
cd "$PROJECT_DIR"
3737
CGO_ENABLED=1 GOOS=android GOARCH=amd64 CC="$CC" \
38-
go build -o e2e/e2e_test ./e2e
39-
file e2e/e2e_test
38+
go build -o tests/e2e/e2e_test ./tests/e2e
39+
file tests/e2e/e2e_test
4040

4141
echo "=== Step 2: Create AVD (if needed) ==="
4242
if [ ! -d "$HOME/.android/avd/${AVD_NAME}.avd" ]; then
@@ -67,7 +67,7 @@ for i in $(seq 1 60); do
6767
done
6868

6969
echo "=== Step 4: Run E2E test ==="
70-
"$ADB" push e2e/e2e_test /data/local/tmp/
70+
"$ADB" push tests/e2e/e2e_test /data/local/tmp/
7171
"$ADB" shell chmod 755 /data/local/tmp/e2e_test
7272
"$ADB" shell /data/local/tmp/e2e_test
7373
EXIT_CODE=$?

0 commit comments

Comments
 (0)