-
Notifications
You must be signed in to change notification settings - Fork 14.3k
lldb: android: fix missing Python import of urlparse in lldb test utilities #99934
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
Conversation
This import is only used on the Android path. It looks like it was removed by mistake in 22ea97d.
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
cc @compnerd |
@llvm/pr-subscribers-lldb Author: Andrew Rogers (andrurogerz) ChangesIssueAttempting to run the lldb API tests against a remote-android target fails with the error Root CauseIt looks the Python import of FixThis change simply puts back the missing import. It is a one line change. fixes 99931 ValidationTested on Fedora 39 with an attached Android device:
Full diff: https://github.com/llvm/llvm-project/pull/99934.diff 1 Files Affected:
diff --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
index b7e6f240f59f6..e3c6fd1a99568 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -9,6 +9,7 @@
import sys
import os
from packaging import version
+from urllib.parse import urlparse
# LLDB modules
import lldb
|
@andrurogerz Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested Please check whether problems have been caused by your change specifically, as How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/2088 Here is the relevant piece of the build log for the reference:
|
…lities (#99934) Summary: ## Issue Attempting to run the lldb API tests against a remote-android target fails with the error `NameError: name 'urlparse' is not defined`. ## Root Cause It looks the Python import of `urlparse` was removed by mistake in 22ea97d. This import is only used when running the lldb API tests against a remote-android target so it went unnoticed. ## Fix This change simply puts back the missing import. It is a one line change. fixes #99931 ## Validation Tested on Fedora 39 with an attached Android device: `cd llvm-project` `cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lldb' -DCMAKE_BUILD_TYPE=Release -DLLDB_ENABLE_PYTHON=On` `ninja -C build` `./build/bin/lldb-dotest --arch aarch64 --out-of-tree-debugserver --platform-name=remote-android --platform-working-dir=/data/local/tmp/ds2 --platform-url=connect://localhost:5432 --compiler ~/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang` Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251272
Issue
Attempting to run the lldb API tests against a remote-android target fails with the error
NameError: name 'urlparse' is not defined
.Root Cause
It looks the Python import of
urlparse
was removed by mistake in 22ea97d. This import is only used when running the lldb API tests against a remote-android target so it went unnoticed.Fix
This change simply puts back the missing import. It is a one line change.
fixes #99931
Validation
Tested on Fedora 39 with an attached Android device:
cd llvm-project
cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lldb' -DCMAKE_BUILD_TYPE=Release -DLLDB_ENABLE_PYTHON=On
ninja -C build
./build/bin/lldb-dotest --arch aarch64 --out-of-tree-debugserver --platform-name=remote-android --platform-working-dir=/data/local/tmp/ds2 --platform-url=connect://localhost:5432 --compiler ~/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang