← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~tushar5526/lpbuildbot-worker:add-support-for-creating-base-image-flavors-for-testing into lpbuildbot-worker:main

 


Diff comments:

> diff --git a/README.md b/README.md
> index 559d71b..31a07a4 100644
> --- a/README.md
> +++ b/README.md
> @@ -96,3 +96,43 @@ SLAVE_PREFIXCMD[1]=""                 # prefix command, i.e. nice, linux32, dchr
>  ### Run the worker
>  
>  `sudo /etc/init.d/buildslave start`
> +
> +# Development Guide
> +
> +Create a new virtual environment:
> +
> +```
> +python -m venv <path-to-virtual-env>
> +source <path-to-virtual-env>/bin/activate
> +```
> +
> +Install the required dependencies
> +
> +```
> +pip install -r charm/requirements-dev.txt
> +```
> +
> +### Running the tests
> +
> +You can run the tests using tox. Install `tox` and install the required python interpreters you want to test on using `pyenv`.

Yes, it seems so. The tests works fine and the tox file was pre-configured with python >=3.7 <=3.12

> +
> +Once you have the necessary python versions installed. Enable them globally so `tox` discovers them. For example, you can run:
> +
> + ```
> + pyenv global 3.6 3.7 ..
> + ```
> +
> +Test files are present in `charms/tests`. Finally, run tests using tox.
> +
> +```
> +cd charms
> +tox
> +tox -e py36 py37 # if you want to run test for specific versions

Yes, thanks good catch.

> +```
> +
> +Running the tests generates the coverage file as well. Run the following to get the coverage report.
> +
> +```
> +# a .coverage file should be generated by running tests before running this command
> +tox -e coverage
> +```


-- 
https://code.launchpad.net/~tushar5526/lpbuildbot-worker/+git/lpbuildbot-worker/+merge/477795
Your team Launchpad code reviewers is requested to review the proposed merge of ~tushar5526/lpbuildbot-worker:add-support-for-creating-base-image-flavors-for-testing into lpbuildbot-worker:main.



References