Cannot run individual AP tests using phablet-test-run

Bug #1321463 reported by Nekhelesh Ramananthan
6
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

Changed in phablet-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Specifically, this import fails when using a qualified name:

    # First let's try python3, without python2 path
    defaultpy="/usr/bin/python3"
    import_error=$(adb shell "cd /home/phablet/autopilot; $defaultpy -c 'import $TESTSUITE'")
    if [ -n "$import_error" ]; then
        echo 'running with python2'
 defaultpy="PYTHONPATH=/home/phablet/autopilot/legacy-py2:/home/phablet/autopilot /usr/bin/python"
    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.testMainView

Changed in phablet-tools (Ubuntu):
assignee: nobody → Nicholas Skaggs (nskaggs)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package phablet-tools - 1.1+14.10.20140918-0ubuntu1

---------------
phablet-tools (1.1+14.10.20140918-0ubuntu1) utopic; urgency=low

  [ Oliver Grawert ]
  * 'phablet-shell: only start/stop ssh if it is not already running, do
    not wipe authorized_keys (breaks the SDK) and instead only append
    the key if it is not there yet. make sure ~/.ssh exists before
    trying to do anything with it (LP: #1355286) (LP: #1337289) (LP:
    #1326805) (LP: #1337289, #1326805, #1355286)

  [ nskaggs ]
  * Make phablet-test-run use only python3 and the autopilot3 binary.
    Fixes bug 1321463 and bug 1364369 (LP: #1364369, #1321463)
 -- Ubuntu daily release <email address hidden> Thu, 18 Sep 2014 11:52:02 +0000

Changed in phablet-tools (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.