Comment 1 for bug 1321463

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