Skip to content

Commit

Permalink
Update Checkbox documentation section about side-loading providers (#269
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pieqq committed Dec 13, 2022
1 parent be5780a commit 8caf0cc
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions checkbox-ng/docs/side-loading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ on the number of new providers supplied with side-loading.
.. note::
side-loading is a means to quickly iterate when developing new jobs.
Don't use it *in production*. Also remember to empty (or delete) the
`~/provider` directory once you're done developing, so you don't get nasty
surprises down the line.
`/var/tmp/checkbox-providers` directory once you're done developing, so you
don't get nasty surprises down the line.
Checkbox will not submit any reports to Certification website if
side-loaded providers have been used.

Expand All @@ -28,12 +28,11 @@ Example scenario
Goal: change the runtime of the stress/cpu_stress_ng_test job without rebuilding
snap.

Make sure that checkbox-snappy snap is installed. It comes with following
providers available::
Make sure that checkbox snap is installed. It comes with following providers
available::

plainbox-provider-checkbox
plainbox-provider-docker
2017.com.canonical.se:engineering-tests
plainbox-provider-ipdt
plainbox-provider-resource-generic
plainbox-provider-snappy
Expand All @@ -48,26 +47,28 @@ Create ``checkbox-providers`` directory in ``/var/tmp/``::
You may not have write permissions for ``/var/tmp/``. You may want to
run mkdir with sudo and later ``chown`` that directory

Clone plainbox-provider-checkbox to the side-loaded directory::
Clone Checkbox repository and copy the base provider to the side-loaded
directory::

cd /var/tmp/checkbox-providers
git clone --depth=1 http://git.launchpad.net/plainbox-provider-checkbox
cd $HOME
git clone --depth=1 https://github.com/canonical/checkbox.git
cp -r $HOME/checkbox/providers/base /var/tmp/checkbox-providers/

.. tip::
--depth=1 tells git not to download all the history of the repo

When started, Checkbox should display following warning::

$ checkbox-snappy.checkbox-cli
WARNING:plainbox.session.assistant:Using side-loaded provider:
com.canonical.certification:plainbox-provider-checkbox
$ checkbox.checkbox-cli
Using sideloaded provider: checkbox-provider-base, version 2.1.0 from
/var/tmp/checkbox-providers/base

Let's edit the job definition::

$ vim /var/tmp/checkbox-providers/plainbox-provider-checkbox/units/stress/jobs.pxu
$ vim /var/tmp/checkbox-providers/base/units/stress/jobs.pxu

Now let's run Checkbox::

$ checkbox-snappy.checkbox-cli
$ checkbox.checkbox-cli

The recently edited definition should be used.

0 comments on commit 8caf0cc

Please sign in to comment.