-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrobalt on-device test work for Android #728
base: feature/chrobalt_odt
Are you sure you want to change the base?
Conversation
--token ${GITHUB_TOKEN} \ | ||
${DIMENSION:+"--dimension" "$DIMENSION"} \ | ||
${ON_DEVICE_TEST_ATTEMPTS:+"--test_attempts" "$ON_DEVICE_TEST_ATTEMPTS"} \ | ||
--archive_path "${GCS_PATH}/artifacts.tar" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This param is not used.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring specifically to archive_path
. This parameter is not used by in the ApkTests code path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are we going to pass GCS path to where APKs are stored? I think the intention is to use archive_path
. Maybe @Libzu can confirm?
tools/on_device_tests_gateway.proto
Outdated
} | ||
|
||
// Working directory and command line arguments to be passed to the gateway. | ||
message OnDeviceTestsCommand { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to remove unused parameters from this proto message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we're never going to use the client on main
to trigger old Cobalt ODTs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @Libzu
] | ||
|
||
# All test configs On-Device tests support | ||
_TEST_CONFIGS = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how this is used, I don't see this being referenced anywhere.
#'on-device-tests-gateway-service.on-device-tests.svc.cluster.local') | ||
'localhost') | ||
#_ON_DEVICE_TESTS_GATEWAY_SERVICE_PORT = '50052' | ||
_ON_DEVICE_TESTS_GATEWAY_SERVICE_PORT = '12345' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a left over from the local testing, I think the official port is 50052?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this line should be reverted and the lines above uncommented.
run: | | ||
echo "Nothing yet" | ||
set -uxe | ||
python3 -u tools/on_device_tests_gateway_client.py \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oxve , I think some of the labels we removed (e.g. change number, pr number, etc.) might still be useful if we add them to each sponge invocation, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should add those back and handle them appropriately in the odt gateway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oxve , I went ahead and pushed d6d7c0a
(#728). Can you see if that looks complete?
@Libzu , once argument list is finalized, we'll need to update odt gateway client.
platform_json_file_data = _read_json_config(platform_json_file) | ||
gtest_device = platform_json_file_data["gtest_device"] | ||
gtest_lab = platform_json_file_data["gtest_lab"] | ||
gtest_blaze_target = "//experimental/cobalt/chrobalt_poc:custom_chrobalt_unit_tests_" + gtest_device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would have to change that, see cl/708442211
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do once cl/708442211 is submitted
gtest_device = platform_json_file_data["gtest_device"] | ||
gtest_lab = platform_json_file_data["gtest_lab"] | ||
gtest_blaze_target = "//experimental/cobalt/chrobalt_poc:custom_chrobalt_unit_tests_" + gtest_device | ||
default_gtest_filters = "GURL*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think default should be * or we shouldn't set filter at all.
if failing_tests_string: | ||
gtest_filters += ":-" + failing_tests_string | ||
#print(f" gtest_filters = {gtest_filters}"); | ||
apk_test["apk_path"] = "/bigstore/yt-temp/" + gtest_target + "-debug.apk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apk_path should be set from --archive_path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would apk_path look for the following?:
--archive_path gs://cobalt-actions-prod-test-artifacts/android_25.lts.1+/1622/android-arm_devel/artifacts.tar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--archive_path /bigstore/cobalt-actions-prod-test-artifacts/android_25.lts.1+/1622/android-arm_devel/
shell: bash | ||
- name: Run ${{ env.SHARD_NAME }} Tests on ${{ matrix.platform }} Platform |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
--token ${GITHUB_TOKEN} \ | ||
${DIMENSION:+"--dimension" "$DIMENSION"} \ | ||
${ON_DEVICE_TEST_ATTEMPTS:+"--test_attempts" "$ON_DEVICE_TEST_ATTEMPTS"} \ | ||
--archive_path "${GCS_PATH}/artifacts.tar" \ |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
trigger \ | ||
shell: bash | ||
- name: Download ${{ matrix.platform }} Test Results | ||
if: always() && env.TEST_TYPE == 'unit_test' |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
--token ${GITHUB_TOKEN} \ | ||
${DIMENSION:+"--dimension" "$DIMENSION"} \ | ||
${ON_DEVICE_TEST_ATTEMPTS:+"--test_attempts" "$ON_DEVICE_TEST_ATTEMPTS"} \ | ||
--archive_path "${GCS_PATH}/artifacts.tar" \ |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
tools/on_device_tests_gateway.proto
Outdated
} | ||
|
||
// Working directory and command line arguments to be passed to the gateway. | ||
message OnDeviceTestsCommand { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the fields we're not going to use for chrobalt. Just keep the numbers on the fields we are using the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @Libzu
_WORK_DIR = '/on_device_tests_gateway' | ||
_ON_DEVICE_TESTS_GATEWAY_SERVICE_HOST = ( | ||
#'on-device-tests-gateway-service.on-device-tests.svc.cluster.local') | ||
'localhost') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
tools/on_device_tests_gateway_pb2.py
Outdated
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
tools/on_device_tests_gateway.proto
Outdated
} | ||
|
||
// Working directory and command line arguments to be passed to the gateway. | ||
message OnDeviceTestsCommand { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we're never going to use the client on main
to trigger old Cobalt ODTs.
failing_tests_string = ":".join(failing_tests_list) | ||
#passing_tests_string = ":".join(passing_tests_list) | ||
#if passing_tests_string: | ||
# gtest_filters += ":" + passing_tests_string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented out code?
print(f" gtest_filters = {gtest_filters}"); | ||
|
||
#apk_test["apk_path"] = "/bigstore/yt-temp/" + gtest_target + "-debug.apk" | ||
apk_test["apk_path"] = "/bigstore/yt-temp/base_unittests-debug.apk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a TODO?
shell: bash | ||
- name: Generate gRPC files | ||
run: | | ||
python -m grpc_tools.protoc -Itools/ --python_out=cobalt/tools/ --grpc_python_out=cobalt/tools/ cobalt/tools/on_device_tests_gateway.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this relative path is correct, the absolute path is ${GITHUB_WORKSPACE}/src/cobalt/tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to using absolute path here
.github/config/android-arm.json
Outdated
@@ -21,6 +21,8 @@ | |||
"sql_unittests", | |||
"url_unittests" | |||
], | |||
"gtest_device": "sabrina", | |||
"gtest_lab": "maneki", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be nested under a test_dimensions
key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test_dimension
key, @Libzu please make a note of it.
456d4de
to
8824e29
Compare
b/354062546
673451f
to
0b8c742
Compare
b/354062546