<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py/test.py, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>test: remove unused import from pkg_resources</title>
<updated>2024-04-12T14:53:31+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-04-03T11:11:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9b6d415eeaa244ab0f8c500b88d421fd3aab7641'/>
<id>9b6d415eeaa244ab0f8c500b88d421fd3aab7641</id>
<content type='text'>
load_entry_point is not used.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
load_entry_point is not used.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pytest: Shorten traceback length by default</title>
<updated>2021-10-14T23:45:07+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-10-06T02:18:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b04f64aa48eeaf099fe52c28c512f956690f5eec'/>
<id>b04f64aa48eeaf099fe52c28c512f956690f5eec</id>
<content type='text'>
This produces a lot of code output which is not very helpful and is quite
annoying to wade through. Use the short format by default.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This produces a lot of code output which is not very helpful and is quite
annoying to wade through. Use the short format by default.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: correct entry point to pytest</title>
<updated>2021-01-29T15:36:49+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-01-28T11:46:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=89d52afa5d0b643bddbedd840cea98ea7cba84f9'/>
<id>89d52afa5d0b643bddbedd840cea98ea7cba84f9</id>
<content type='text'>
With Pytest 6.0.2 'make tests' fails:

sandbox: Traceback (most recent call last):
  File "./test/py/test.py", line 20, in &lt;module&gt;
    sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))
TypeError: console_main() takes 0 positional arguments but 1 was given

The definition of console_scripts has changed as follows:

Pytest 4.6.1:

[options.entry_points]
console_scripts =
        pytest=pytest:main
        py.test=pytest:main
        
Pytest 6.0.2:
        
[options.entry_points]
console_scripts =
    pytest=pytest:console_main
    py.test=pytest:console_main

The new function console_main() has a comment:
"This function is not meant for programmable use; use `main()`"

Hence let's call pytest.main() directly.
Move args processing into the __main__ paragraph.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Tested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With Pytest 6.0.2 'make tests' fails:

sandbox: Traceback (most recent call last):
  File "./test/py/test.py", line 20, in &lt;module&gt;
    sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))
TypeError: console_main() takes 0 positional arguments but 1 was given

The definition of console_scripts has changed as follows:

Pytest 4.6.1:

[options.entry_points]
console_scripts =
        pytest=pytest:main
        py.test=pytest:main
        
Pytest 6.0.2:
        
[options.entry_points]
console_scripts =
    pytest=pytest:console_main
    py.test=pytest:console_main

The new function console_main() has a comment:
"This function is not meant for programmable use; use `main()`"

Hence let's call pytest.main() directly.
Move args processing into the __main__ paragraph.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Tested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Rework test.py to be a different kind of wrapper</title>
<updated>2019-10-30T21:48:47+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2019-10-24T15:59:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8add4fa4177bf697ad892497fe65259dad642366'/>
<id>8add4fa4177bf697ad892497fe65259dad642366</id>
<content type='text'>
Now that we have moved to being based on pytest for python3 we need to
make our test.py wrapper more robust in terms of only calling python3
rather than possibly finding and using python2.  To do this, change from
execvp()'ing pytest to invoking the package itself via python.  In the
event that pytest is unavailable we still get a user-friendly error:

pkg_resources.DistributionNotFound: The 'pytest' distribution was not found and is required by the application

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt; [on sandbox]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have moved to being based on pytest for python3 we need to
make our test.py wrapper more robust in terms of only calling python3
rather than possibly finding and using python2.  To do this, change from
execvp()'ing pytest to invoking the package itself via python.  In the
event that pytest is unavailable we still get a user-friendly error:

pkg_resources.DistributionNotFound: The 'pytest' distribution was not found and is required by the application

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt; [on sandbox]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Automated conversion to Python 3</title>
<updated>2019-10-30T21:48:47+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2019-10-24T15:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fe1193e254faccc4e6629f1cfbc99d5ceb34428a'/>
<id>fe1193e254faccc4e6629f1cfbc99d5ceb34428a</id>
<content type='text'>
Use the 2to3 tool to perform numerous automatic conversions from Python
2 syntax to Python 3.  Also fix whitespace problems that Python 3
catches that Python 2 did not.

Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt; [on sandbox]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the 2to3 tool to perform numerous automatic conversions from Python
2 syntax to Python 3.  Also fix whitespace problems that Python 3
catches that Python 2 did not.

Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt; [on sandbox]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Make print statements python 3.x safe</title>
<updated>2018-07-10T20:50:50+00:00</updated>
<author>
<name>Paul Burton</name>
<email>paul.burton@imgtec.com</email>
</author>
<published>2017-09-14T21:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dffd56d1d270e4797e43272a6c9000b8b8aeaf29'/>
<id>dffd56d1d270e4797e43272a6c9000b8b8aeaf29</id>
<content type='text'>
In python 3.x print must be called as a function rather than used as a
statement. Update uses of print to the function call syntax in order to
be python 3.x safe.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In python 3.x print must be called as a function rather than used as a
statement. Update uses of print to the function call syntax in order to
be python 3.x safe.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>host-tools: use python2 explicitly for shebang</title>
<updated>2018-01-28T17:27:30+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-01-21T09:34:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=94b13bbae90bfb94204b8fe9c531bc163e746a9f'/>
<id>94b13bbae90bfb94204b8fe9c531bc163e746a9f</id>
<content type='text'>
All of these host tools are apparently written for Python2,
not Python3.

Use 'python2' in the shebang line according to PEP 394
(https://www.python.org/dev/peps/pep-0394/).

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All of these host tools are apparently written for Python2,
not Python3.

Use 'python2' in the shebang line according to PEP 394
(https://www.python.org/dev/peps/pep-0394/).

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: exit(1) if there are problems running py.test</title>
<updated>2016-02-09T22:41:19+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2016-02-03T17:42:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac99831b7d0f4e00c8dd32b604c2448260dd2776'/>
<id>ac99831b7d0f4e00c8dd32b604c2448260dd2776</id>
<content type='text'>
The test/py/test.py wrapper script catches exceptions thrown when
exec()ing py.test in order to print a helpful error message. However,
the exception handling code squashes the exception and so the script
exits with a non-zero exit code, leading callers to believe that it
passed. Fix this.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test/py/test.py wrapper script catches exceptions thrown when
exec()ing py.test in order to print a helpful error message. However,
the exception handling code squashes the exception and so the script
exits with a non-zero exit code, leading callers to believe that it
passed. Fix this.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Quote consistency</title>
<updated>2016-01-29T04:01:24+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2016-01-26T20:41:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a2ec560647e90250183e379799db957970cb260e'/>
<id>a2ec560647e90250183e379799db957970cb260e</id>
<content type='text'>
When converting test/py from " to ', I missed a few places (or added a
few inconsistencies later). Fix these.

Note that only quotes in code are converted; double-quotes in comments
and HTML are left as-is, since English and HTML use " not '.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When converting test/py from " to ', I missed a few places (or added a
few inconsistencies later). Fix these.

Note that only quotes in code are converted; double-quotes in comments
and HTML are left as-is, since English and HTML use " not '.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
