Local LAVA Development with PyCharm

This page details how to setup a local LAVA development environment using PyCharm 3.4 both locally and remotely.

Setup

Please ensure your environment meets the following requirements

  • Debian Jessie or Sid
  • Ubuntu Trusty or Unicorn
  • PyCharm 3.4

If you wish to develop on a remote target you will need the following

  • A virtual machine or a remote machine with ssh root access

Install LAVA

Install the latest version of LAVA on your local or remote machine

https://validation.linaro.org/static/docs/installation.html

Configure LAVA

You'll first want to configure some test devices on your LAVA instance as described here

https://validation.linaro.org/static/docs/lava-image-creation.html#adding-a-device-to-lava

Add LAVA Projects to PyCharm

If you haven't already, clone the the desired LAVA projects from the Linaro git server

https://git.linaro.org/?a=project_list;pf=lava

Now open these projects in PyCharm

File => Open => Select LAVA project

If you prefer, select "Open in current Window" and select "Add to currently opened projects" for convenience.

Deployment/Debugging on a Remote Server

This step only needs to be followed if you plan on developing and debugging on a remote server

Configure Deployment

In the project window select the project to deploy

TODO: Add pictures for these steps

Select Tools => Deployment => Configuration

Now create a new SFTP connection to your remote machine. Once you have configured this, you can test your configuration by clicking 'Test SFTP Connection' to confirm everything is working properly.

After the connection is working properly you will need to create a mapping for your project. This step will map your local files to the remote location. Click the 'Mappings' tab and configure your local path and remote path appropriately.

Here is an example:

Local Path: /home/ubuntu/srv/lava-dispatcher

Remote Path: /root/lava-dispatcher

At this point you should have the mappings setup, so click 'OK'. Most likely you will want to automatically sync your local source to the remote server when you change a file.

You can do this by selecting Tools => Deployment => Automatic Upload

If you frequently apply patches to test or review, you can configure automatic upload when the source changes externally.

Tool => Deployment => Options

Now select 'Upload External Changes'

Configure Remote Debugger

LAVA/Team/Pycharm (last modified 2014-10-08 22:51:02)