Skip to content

Commit c0a4890

Browse files
authored
Android prebuild support (#211)
1 parent 5d1b15c commit c0a4890

5 files changed

Lines changed: 34 additions & 10 deletions

File tree

environment/aws/topology_setup/test_server_platforms/java_register.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,13 @@ def create_bridge(self) -> PlatformBridge:
327327
PlatformBridge: The platform bridge.
328328
"""
329329
path = (
330-
JAK_TEST_SERVER_DIR
330+
TEST_SERVER_DIR
331+
/ "downloaded"
332+
/ self.platform
333+
/ self.version
334+
/ "testserver_android.apk"
335+
if self._downloaded
336+
else JAK_TEST_SERVER_DIR
331337
/ self.test_server_path
332338
/ "app"
333339
/ "build"

jenkins/pipelines/dev_e2e/android/Jenkinsfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ pipeline {
1919
}
2020
}
2121
}
22+
stage('Prebuild Server') {
23+
steps {
24+
script {
25+
build job: 'prebuild-test-server',
26+
parameters: [
27+
string(name: 'TS_PLATFORM', value: 'jak_android'),
28+
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
29+
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
30+
],
31+
wait: true,
32+
propagate: true
33+
}
34+
}
35+
}
2236
stage('Android') {
2337
agent { label 'mob-e2e-mac-01' }
2438
options {

jenkins/pipelines/dev_e2e/android/android_teardown.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ source $SCRIPT_DIR/../../shared/config.sh
77

88
export PYTHONPATH=$SCRIPT_DIR/../../../
99
pushd $AWS_ENVIRONMENT_DIR
10+
stop_venv
1011
create_venv venv
1112
source venv/bin/activate
12-
pip install -r requirements.txt
13+
trap stop_venv EXIT
14+
uv pip install -r requirements.txt
1315
python3 ./stop_backend.py --topology topology_setup/topology.json

jenkins/pipelines/dev_e2e/android/android_tests.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,28 @@ yes | ${SDK_MGR} --channel=1 --licenses > /dev/null 2>&1
3333
${SDK_MGR} --channel=1 --install "build-tools;${BUILD_TOOLS_VERSION}"
3434
PATH="${PATH}:$ANDROID_HOME/platform-tools"
3535

36+
stop_venv
3637
create_venv venv
3738
source venv/bin/activate
38-
pip install -r $AWS_ENVIRONMENT_DIR/requirements.txt
39+
trap stop_venv EXIT
40+
uv pip install -r $AWS_ENVIRONMENT_DIR/requirements.txt
3941
if [ -n "$private_key_path" ]; then
4042
python3 $SCRIPT_DIR/setup_test.py $CBL_VERSION $DATASET_VERSION $SG_VERSION --private_key $private_key_path
4143
else
4244
python3 $SCRIPT_DIR/setup_test.py $CBL_VERSION $DATASET_VERSION $SG_VERSION
4345
fi
44-
deactivate
4546

4647
echo "Start logcat"
4748
pushd $SCRIPT_DIR
4849
python3 logcat.py &
4950
echo $! > logcat.pid
5051

5152
pushd $DEV_E2E_TESTS_DIR > /dev/null
52-
rm -rf venv http_log testserver.log
53-
create_venv venv
54-
source venv/bin/activate
55-
pip install -r requirements.txt
53+
rm -rf http_log testserver.log
54+
uv pip install -r requirements.txt
5655

5756
echo "Run the tests"
58-
adb shell input keyevent KEYCODE_WAKEUP
57+
# To re-enable this, this script needs to become aware of the
58+
# serial number of the device, which is not currently passed
59+
#adb shell input keyevent KEYCODE_WAKEUP
5960
pytest --maxfail=7 -W ignore::DeprecationWarning --config config.json

jenkins/pipelines/dev_e2e/android/topology_single_device.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"platform": "jak_android",
66
"cbl_version": "{{version}}",
77
"dataset_version": "{{dataset_version}}",
8-
"location": "1BCACS00001MX3"
8+
"location": "1BCACS00001MX3",
9+
"download": true
910
}
1011
],
1112
"include": "../../../../environment/aws/topology_setup/default_topology.json"

0 commit comments

Comments
 (0)