<feed xmlns='http://www.w3.org/2005/Atom'>
<title>freeipa.git/ipatests/ipa-run-tests, branch fix_ber_scanf</title>
<subtitle>FreeIPA patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/'/>
<entry>
<title>Simplify ipa-run-tests script</title>
<updated>2019-07-16T10:23:21+00:00</updated>
<author>
<name>Stanislav Levin</name>
<email>slev@altlinux.org</email>
</author>
<published>2019-07-08T08:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=2312b38a678d30b73c08dae19db7f8b74361a957'/>
<id>2312b38a678d30b73c08dae19db7f8b74361a957</id>
<content type='text'>
This is a sort of rollback to the pre #93c158b05 state with
several improvements.

For now, the nodeids calculation by ipa-run-tests is not stable,
since it depends on current working directory. Nodeids (tests
addresses) are utilized by the other plugins, for example.

Unfortunately, the `pytest_load_initial_conftests` hook doesn't
correctly work with pytest internal paths, since it is called
after the calculation of rootdir was performed, for example.

Eventually, it's simpler to follow the default convention for
Python test discovery.

There is at least one drawback of new "old" implementation.
The ignore rules don't support globs, because pytest 4.3.0+
has the same facility via `--ignore-glob`:

&gt; Add the `--ignore-glob` parameter to exclude test-modules with
&gt; Unix shell-style wildcards. Add the collect_ignore_glob for
&gt; conftest.py to exclude test-modules with Unix shell-style
&gt; wildcards.

Upon switching to pytest4 it will be possible to utilize this.
Anyway, tests for checking current basic facilities of
ipa-run-tests were added.

Fixes: https://pagure.io/freeipa/issue/8007
Signed-off-by: Stanislav Levin &lt;slev@altlinux.org&gt;
Reviewed-By: Alexander Bokovoy &lt;abokovoy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a sort of rollback to the pre #93c158b05 state with
several improvements.

For now, the nodeids calculation by ipa-run-tests is not stable,
since it depends on current working directory. Nodeids (tests
addresses) are utilized by the other plugins, for example.

Unfortunately, the `pytest_load_initial_conftests` hook doesn't
correctly work with pytest internal paths, since it is called
after the calculation of rootdir was performed, for example.

Eventually, it's simpler to follow the default convention for
Python test discovery.

There is at least one drawback of new "old" implementation.
The ignore rules don't support globs, because pytest 4.3.0+
has the same facility via `--ignore-glob`:

&gt; Add the `--ignore-glob` parameter to exclude test-modules with
&gt; Unix shell-style wildcards. Add the collect_ignore_glob for
&gt; conftest.py to exclude test-modules with Unix shell-style
&gt; wildcards.

Upon switching to pytest4 it will be possible to utilize this.
Anyway, tests for checking current basic facilities of
ipa-run-tests were added.

Fixes: https://pagure.io/freeipa/issue/8007
Signed-off-by: Stanislav Levin &lt;slev@altlinux.org&gt;
Reviewed-By: Alexander Bokovoy &lt;abokovoy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipa-run-tests: add support of globs for test targets and ignores</title>
<updated>2019-05-28T06:55:51+00:00</updated>
<author>
<name>Alexander Bokovoy</name>
<email>abokovoy@redhat.com</email>
</author>
<published>2019-05-18T19:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=6a2c356da0c603f209f2310c013ef085e0c11eda'/>
<id>6a2c356da0c603f209f2310c013ef085e0c11eda</id>
<content type='text'>
ipa-run-tests expands arguments passed with their full paths. However,
it doesn't support expanding globs, so targets like 'test_ipa*' cannot
be specified.

Expand the code that replaces '--ignore foo' and 'foo' positional
arguments with support for '--ignore foo*' and 'foo*'.

This allows to reduce a number of additional steps in the CI pipeline
preparation.

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ipa-run-tests expands arguments passed with their full paths. However,
it doesn't support expanding globs, so targets like 'test_ipa*' cannot
be specified.

Expand the code that replaces '--ignore foo' and 'foo' positional
arguments with support for '--ignore foo*' and 'foo*'.

This allows to reduce a number of additional steps in the CI pipeline
preparation.

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compatibility with latest pytest</title>
<updated>2018-03-23T12:08:39+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2018-03-23T09:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=48fb6d2c87aee50eb81a1678a33cecd89a4ea3d6'/>
<id>48fb6d2c87aee50eb81a1678a33cecd89a4ea3d6</id>
<content type='text'>
pytest removed copy() method from its Namespace class. Use the copy
module to make a copy of early options.

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Stanislav Laznicka &lt;slaznick@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pytest removed copy() method from its Namespace class. Use the copy
module to make a copy of early options.

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Stanislav Laznicka &lt;slaznick@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Have all the scripts run in python 3 by default</title>
<updated>2018-02-15T17:43:12+00:00</updated>
<author>
<name>Stanislav Laznicka</name>
<email>slaznick@redhat.com</email>
</author>
<published>2017-08-31T08:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=f31797c70ac6d1fe4a651def1f87350bec16d194'/>
<id>f31797c70ac6d1fe4a651def1f87350bec16d194</id>
<content type='text'>
The Python 3 refactoring effort is finishing, it should be safe
to turn all scripts to run in Python 3 by default.

https://pagure.io/freeipa/issue/4985

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Python 3 refactoring effort is finishing, it should be safe
to turn all scripts to run in Python 3 by default.

https://pagure.io/freeipa/issue/4985

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipa-run-tests: make --ignore absolute, too</title>
<updated>2018-01-12T12:47:06+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2018-01-10T13:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=0cab090f4d8a5ed0e4afd9fcc2a14efa442c9d46'/>
<id>0cab090f4d8a5ed0e4afd9fcc2a14efa442c9d46</id>
<content type='text'>
ipa-run-tests now applies the same logic to --ignore then to included
paths.

https://pagure.io/freeipa/issue/7355

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Michal Reznik &lt;mreznik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ipa-run-tests now applies the same logic to --ignore then to included
paths.

https://pagure.io/freeipa/issue/7355

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Michal Reznik &lt;mreznik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipa-run-tests: replace chdir with plugin</title>
<updated>2018-01-04T18:36:27+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2018-01-04T15:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=93c158b05812b55383043e320cac89550993b8b2'/>
<id>93c158b05812b55383043e320cac89550993b8b2</id>
<content type='text'>
The ipa-run-tests command used os.chdir() to change into the ipatests/
directory. The approach works for simple cases but breaks some pytest
features. For example it makes it impossible to selects tests by their
fully qualified test name.

Further more, coverage statistics break because path and module names
get messed up by chdir.

A name plugin takes care of adjusting paths relative to ipatests and to
add ipatests as base. It's now possible to run tests with qualified test
names, e.g.

  ipa-run-tests ipatests/test_ipalib/test_base.py::test_ReadOnly::test_lock

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Felipe Volpone &lt;fbarreto@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ipa-run-tests command used os.chdir() to change into the ipatests/
directory. The approach works for simple cases but breaks some pytest
features. For example it makes it impossible to selects tests by their
fully qualified test name.

Further more, coverage statistics break because path and module names
get messed up by chdir.

A name plugin takes care of adjusting paths relative to ipatests and to
add ipatests as base. It's now possible to run tests with qualified test
names, e.g.

  ipa-run-tests ipatests/test_ipalib/test_base.py::test_ReadOnly::test_lock

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Felipe Volpone &lt;fbarreto@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable additional warnings (BytesWarning, DeprecationWarning)</title>
<updated>2017-02-10T15:16:44+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2017-02-10T13:19:07+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=a33b25dea988aa34844869a8adc57d5cd396d3aa'/>
<id>a33b25dea988aa34844869a8adc57d5cd396d3aa</id>
<content type='text'>
Closes: https://fedorahosted.org/freeipa/ticket/6631
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Martin Basti &lt;mbasti@redhat.com&gt;
Reviewed-By: Alexander Bokovoy &lt;abokovoy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes: https://fedorahosted.org/freeipa/ticket/6631
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Martin Basti &lt;mbasti@redhat.com&gt;
Reviewed-By: Alexander Bokovoy &lt;abokovoy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use pytest conftest.py and drop pytest.ini</title>
<updated>2017-01-05T16:37:02+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2017-01-03T17:04:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=1e06a5195bafe0224d77371987f2509f5508ca2f'/>
<id>1e06a5195bafe0224d77371987f2509f5508ca2f</id>
<content type='text'>
Let's replace some ugly hacks with proper pytest conftest.py hooks.
Test initialization of ipalib.api is now handled in
pytest_cmdline_main(). Pytest plugins, markers and ignores are also
moved into conftest.py. Additional guards make it possible to run tests
without ipaserver installed.

I added confcutdir to ensure that pytest does not leave our project
space. Pytest used pytest.ini or setup.py before but pytest.ini is gone.

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Milan Kubik &lt;mkubik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's replace some ugly hacks with proper pytest conftest.py hooks.
Test initialization of ipalib.api is now handled in
pytest_cmdline_main(). Pytest plugins, markers and ignores are also
moved into conftest.py. Additional guards make it possible to run tests
without ipaserver installed.

I added confcutdir to ensure that pytest does not leave our project
space. Pytest used pytest.ini or setup.py before but pytest.ini is gone.

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Milan Kubik &lt;mkubik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch ipa-run-tests to pytest</title>
<updated>2014-11-21T11:14:44+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2014-10-13T12:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=eaad0a9ced1e989d5c64a7432995b1a679aab77c'/>
<id>eaad0a9ced1e989d5c64a7432995b1a679aab77c</id>
<content type='text'>
https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use /usr/bin/python2</title>
<updated>2014-01-03T08:46:05+00:00</updated>
<author>
<name>Xiao-Long Chen</name>
<email>chenxiaolong@cxl.epac.to</email>
</author>
<published>2013-11-27T13:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=5e96fbc22afa02f08f71513e7b59d3d5c6a1f9dc'/>
<id>5e96fbc22afa02f08f71513e7b59d3d5c6a1f9dc</id>
<content type='text'>
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori@redhat.com
</pre>
</div>
</content>
</entry>
</feed>
