Skip to content
Snippets Groups Projects
Unverified Commit e670835a authored by magdesign's avatar magdesign :speech_balloon: Committed by Pablo Correa Gomez
Browse files

Add installation and usage instructions for mrtest (MR 58)

Fixes #26
parent c89378c3
No related branches found
No related tags found
1 merge request!58Updated Docs
Pipeline #209651 passed
......@@ -14,6 +14,7 @@ For further information, please check out the `postmarketOS-wiki`_.
:maxdepth: 3
:caption: Contents:
installation
usage
mrhlpr/modules
mrtest/modules
......
############################
Installation on PostmarketOS
############################
From Alpine's package manager
.. code-block::
$ apk add mrtest
Or from the git repository
.. code-block::
$ git clone https://gitlab.postmarketos.org/postmarketOS/mrhlpr.git
mrtest source code lives inside `mrhlpr.git <https://gitlab.postmarketos.org/postmarketOS/mrhlpr>`_ , it shares code for interacting with the gitlab API with the mrhlpr project.
......@@ -2,7 +2,7 @@
Usage
#####
mrhlpr and mrtest offer some options and actions and are normally ran from a shell.
**mrhlpr** and **mrtest** offer some options and actions and are normally ran from a shell.
mrhlpr
######
......@@ -24,6 +24,80 @@ mrtest is the tool for testing the content of an MR on a postmarketOS or Alpine
It supports interacting with both Alpine's aports and postmarketOS' pmaports.
This is done by using the artifacts from the CI runs as source to get packages which are installed locally.
**Installing packages**
Navigate to a merge request that you want to test.
After reading through the changes made in the merge request, run:
.. code-block::
$ mrtest add MR_ID.
replacing MR_ID with the number of the MR
It will automatically figure out the last pipeline, get the job with the suitable arch of your device, and show which packages are available for installation. Then you will be able to select the packages in an interactive prompt.
To install packages from a merge request in Alpine, use `mrtest add -a` (or --alpine).
**Example**
Trying `!62 <https://gitlab.postmarketos.org/postmarketOS/mobile-config-firefox/-/merge_requests/62>`_
.. code-block::
$ mrtest add 62
Download https://gitlab.com/api/v4/projects/postmarketOS%2Fpmaports/merge_requests/62
Download https://gitlab.com/api/v4/projects/8986050
Welcome to mrtest, this tool allows downloading and installing
Alpine packages from merge requests.
WARNING: do not use this tool unless you understand what it does,
otherwise you can get tricked into installing malicious code!
Malicious code may make your device permanently unusable, steal
your passwords, and worse.
You are about to select and then install packages from:
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/62
“wingtech-wt88047: initial support (xiaomi redmi 2)”
(sylvieon/pmaports:device/wingtech-wt88047)
* Did you read and understand the diff?
* If not, do you at least trust the person who submitted it?
If you don't understand the diff and don't trust the submitter,
answer with 'stop'. Otherwise, if you want to proceed, type in the
MR ID.
Your answer:
Now you enter `62` and follow to promts until the full mr is installed with returning:
.. code-block::
All done! Use 'mrtest zap' to uninstall added packages.
**Uninstalling packages**
Use `mrtest zap` to check for previously installed virtual packages, and to get a prompt to uninstall them.
Uninstalling virtual packages will remove all packages that were added with a mrtest add command.
Note that this does not include upgraded packages, to remove upgrade packages you will need to run `apk upgrade -a` as the output at the end of `mrtest zap` explains.
.. code-block::
$ mrtest zap
Getting installed packages...
Virtual packages from previous 'mrtest add':
* .mrtest-61-postmarketOS
Remove virtual packages and packages added with mrtest? [y/N] y
Proceed with entering `y` and your system is back to the original state.
.. note::
Packages installed through `mrtest add` won't be automatically upgraded. You'll need to `mrtest zap` them before you'd be able to install newer versions from the official binary repo later using `apk upgrade`!
.. autoprogram:: mrtest.frontend:get_parser()
:prog: mrtest
:groups:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment