Cannot run individual AP tests using phablet-test-run
Bug #1321463 reported by
Nekhelesh Ramananthan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
phablet-tools (Ubuntu) |
Fix Released
|
Undecided
|
Nicholas Skaggs |
Bug Description
Recently it is not possible to run a single individual autopilot test on the device using phablet-test-run. Running the entire test suite works. On debugging the issue, it turns out that the code logic which determines whether python 2 or python 3 should be used fails since if we set it to run python3, then running a single AP test works as expected.
Related branches
lp:~nskaggs/phablet-tools/remove-python2-support
- Paul Larson (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
- Sergio Schvezov: Approve (code)
- Oliver Grawert: Approve
-
Diff: 231 lines (+57/-77)2 files modifiedphablet-click-test-setup (+56/-65)
phablet-test-run (+1/-12)
Changed in phablet-tools (Ubuntu): | |
status: | New → Confirmed |
Changed in phablet-tools (Ubuntu): | |
assignee: | nobody → Nicholas Skaggs (nskaggs) |
status: | Confirmed → In Progress |
To post a comment you must log in.
Specifically, this import fails when using a qualified name:
# First let's try python3, without python2 path "/usr/bin/ python3" error=$ (adb shell "cd /home/phablet/ autopilot; $defaultpy -c 'import $TESTSUITE'") "PYTHONPATH= /home/phablet/ autopilot/ legacy- py2:/home/ phablet/ autopilot /usr/bin/python"
defaultpy=
import_
if [ -n "$import_error" ]; then
echo 'running with python2'
defaultpy=
fi
So if you run like this, it's a simple name and imports fine
phablet-test-run ubuntu_clock_app
if you run like this, it fails to import, causing it to fallback to python2:
phablet-test-run ubuntu_ clock_app. tests.testMainV iew