<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hardware_replicant_libsamsung-ipc/tools/nv_data-md5.py, branch main</title>
<subtitle>external/libsamsung-ipc
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/'/>
<entry>
<title>tools: move the tests in their own directory</title>
<updated>2022-03-28T18:50:47+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2022-03-24T13:37:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=ce855d6cdbbabfacd574610d8374b134faeb7362'/>
<id>ce855d6cdbbabfacd574610d8374b134faeb7362</id>
<content type='text'>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: nv_data-md5: fix test with out of tree builds</title>
<updated>2022-01-24T22:56:34+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2022-01-24T22:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=939cf5a8ef159b52faa171c719f7c56afae20543'/>
<id>939cf5a8ef159b52faa171c719f7c56afae20543</id>
<content type='text'>
When running the tests in an out of tree build directory (here in
scripts/src/), without that fix, we have the following error in
src/samsung-ipc/tests/test-suite.log when running 'make check':
    FAIL: nv_data-md5
    =================

    Traceback (most recent call last):
      File "[...]/scripts/src/tools/../../../tools/nv_data-md5.py", line 69, in &lt;module&gt;
        rc = main()
      File "[...]/scripts/src/tools/../../../tools/nv_data-md5.py", line 64, in main
        nv_data_md5 = NvDataMD5()
      File "[...]/scripts/src/tools/../../../tools/nv_data-md5.py", line 39, in __init__
        self.nv_data_md5 = sh.Command(srcdir + os.sep + 'nv_data-md5')
      File "/usr/lib/python3.9/site-packages/sh.py", line 1342, in __init__
        raise CommandNotFound(path)
    sh.CommandNotFound: ../../../tools/nv_data-md5
    FAIL nv_data-md5.py (exit status: 1)

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running the tests in an out of tree build directory (here in
scripts/src/), without that fix, we have the following error in
src/samsung-ipc/tests/test-suite.log when running 'make check':
    FAIL: nv_data-md5
    =================

    Traceback (most recent call last):
      File "[...]/scripts/src/tools/../../../tools/nv_data-md5.py", line 69, in &lt;module&gt;
        rc = main()
      File "[...]/scripts/src/tools/../../../tools/nv_data-md5.py", line 64, in main
        nv_data_md5 = NvDataMD5()
      File "[...]/scripts/src/tools/../../../tools/nv_data-md5.py", line 39, in __init__
        self.nv_data_md5 = sh.Command(srcdir + os.sep + 'nv_data-md5')
      File "/usr/lib/python3.9/site-packages/sh.py", line 1342, in __init__
        raise CommandNotFound(path)
    sh.CommandNotFound: ../../../tools/nv_data-md5
    FAIL nv_data-md5.py (exit status: 1)

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: python: unify string quotes as per PEP 8</title>
<updated>2022-01-24T22:09:14+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2022-01-24T21:51:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=34a3e1fd501f20c55d41ec9aaa982d79a499bf41'/>
<id>34a3e1fd501f20c55d41ec9aaa982d79a499bf41</id>
<content type='text'>
Having a code style makes the code easier to read.

As for which code style to use, the code style defined by the
PEP 8 [1] is used in the python standard library and in the main
Python distribution.

Its official nature (it's standardized by python) probably makes it
the most well known and used code style adopted by python programmers.

In it we have a section about string quotes:
    String Quotes
    -------------
    In Python, single-quoted strings and double-quoted strings are the
    same. This PEP does not make a recommendation for this. Pick a rule
    and stick to it. When a string contains single or double quote
    characters, however, use the other one to avoid backslashes in the
    string. It improves readability.

    For triple-quoted strings, always use double quote characters to be
    consistent with the docstring convention in PEP 257.

Since "if __name__ == '__main__':" is widely used, we choose to use the
single quotes.

[1]https://www.python.org/dev/peps/pep-0008/

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having a code style makes the code easier to read.

As for which code style to use, the code style defined by the
PEP 8 [1] is used in the python standard library and in the main
Python distribution.

Its official nature (it's standardized by python) probably makes it
the most well known and used code style adopted by python programmers.

In it we have a section about string quotes:
    String Quotes
    -------------
    In Python, single-quoted strings and double-quoted strings are the
    same. This PEP does not make a recommendation for this. Pick a rule
    and stick to it. When a string contains single or double quote
    characters, however, use the other one to avoid backslashes in the
    string. It improves readability.

    For triple-quoted strings, always use double quote characters to be
    consistent with the docstring convention in PEP 257.

Since "if __name__ == '__main__':" is widely used, we choose to use the
single quotes.

[1]https://www.python.org/dev/peps/pep-0008/

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: nv_data-md5: Add tests</title>
<updated>2020-12-03T00:42:29+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-12-01T15:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/commit/?id=01491b14fd20917990d401ac21df2d861bb307d7'/>
<id>01491b14fd20917990d401ac21df2d861bb307d7</id>
<content type='text'>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
