From Fedora Project Wiki

< CI

(Created page with "===Preconditions=== To start working with a test you need Fedora installed on your PC or VM. Change user to root: <pre> $ sudo -s </pre> Install necessary packages: <pre>...")
 
Line 15: Line 15:
</pre>
</pre>


Navigate to the https://upstreamfirst.fedorainfracloud.org/ and choose any package you like to run.
===Get tests===
For example '''elfutils'''  
Navigate to the https://upstreamfirst.fedorainfracloud.org/ and choose any package you like to run.<br />
 
For example '''elfutils''' <br />
 
Navigate to the page with tests:
Navigate to the page with tests:
https://upstreamfirst.fedorainfracloud.org/elfutils
https://upstreamfirst.fedorainfracloud.org/elfutils<br />
 
Copy '''Source GIT URL'''
Copy '''Source GIT URL'''
<gallery>
[[File:Selection 001.png|frame|left|Source GIT URL]]
https://i.imgur.com/NMziHan.png|Source GIT URL
 
</gallery>
Navigate to you VM or laptop command line and clone this package:
<pre>
# git clone https://upstreamfirst.fedorainfracloud.org/elfutils.git
# cd elfutils
</pre>
 
Check tags that you have. Execute command:
<pre>
# ansible-playbook --list-tags tests.yml
</pre>
The output will be something like tis: <br/>
[[File:Selection 002.png|frame|left|List of tags]]
<br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/>
It means that we have <code>container, atomic, classic</code>  tags
So we can run our tests for each of them.
 
===Run classic (local) tests===
Now we are ready for running tests on our laptol.
Execute command:
<pre>
# ansible-playbook --tags=classic tests.yml
</pre>
This command will run all package's tests. And the result will be: <br/>
[[File:Selection 003.png|frame|left|Classic tests result]] <br/>

Revision as of 17:03, 24 November 2017

Preconditions

To start working with a test you need Fedora installed on your PC or VM.

Change user to root:

$ sudo -s

Install necessary packages:

# dnf install git
# dnf install ansible python2-dnf libselinux-python standard-test-roles

Get tests

Navigate to the https://upstreamfirst.fedorainfracloud.org/ and choose any package you like to run.

For example elfutils

Navigate to the page with tests: https://upstreamfirst.fedorainfracloud.org/elfutils

Copy Source GIT URL

Source GIT URL

Navigate to you VM or laptop command line and clone this package:

# git clone https://upstreamfirst.fedorainfracloud.org/elfutils.git
# cd elfutils

Check tags that you have. Execute command:

# ansible-playbook --list-tags tests.yml

The output will be something like tis:

List of tags















It means that we have container, atomic, classic tags So we can run our tests for each of them.

Run classic (local) tests

Now we are ready for running tests on our laptol. Execute command:

# ansible-playbook --tags=classic tests.yml

This command will run all package's tests. And the result will be:

Classic tests result