<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Alex,<b><br>
<br>
</b>I actually got some email problem, email from the list don't
reach me anymore, I'm investigating.<br>
I'm grabbing your answer from the webarchive in the meantime.<br>
So you may try to CC to me too, if you think about it. 😉<br>
<br>
So sorry I didn't explain: secure Item is a feature I introduced in
clipman from a personal need, the goal is to hide item content in
clipman history when sending password to the clipboard. All details
are explained in the gitlab fork <a moz-do-not-send="true"
href="https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/blob/dev-refactor-indexes/README.md">README</a>.
The open issue that relates to my need was: <a
href="https://gitlab.xfce.org/panel-plugins/xfce4-clipman-plugin/-/issues/25"
data-original="xfce issue #25" data-link="true"
data-link-reference="true" data-project="42" data-issue="617"
data-reference-type="issue" data-container="body"
data-placement="top" title="Support timeout while copying to
clipboard" class="gfm gfm-issue has-tooltip">xfce issue #25.</a><br>
The secure item are them removed automatically from clipman. Though,
for more versatility it's done outside clipman code from the cli in
bash example script I wrote. <br>
<br>
To achieve my goal I had to hack much more that I though initially,
and probably I also took much pleasure hacking opensource code too.
;-)<br>
Especially I did introduce dbus remote process call code, for
changing in memory data from a command line tool.<br>
<br>
<br>
I would love to discuss more about it, but in another email thread.<br>
Going back to unit testing and automated testing more generally.<br>
<br>
<blockquote type="cite">Though it might be relevant to your
investigations that "make check" in<br>
the test-folder generated some binaries which can be executed</blockquote>
<br>
Thanks, about this Makefile target, I saw it plus the individual
binaries target too. But I can't figure out yet how to test it
afterward.<br>
I mean if I've to run it manually, it's not the idea I've about an
automated test suite.<br>
<br>
But, I also arrived to the same conclusion: « most xfce components
dont have tests »<br>
So I suppose I can start anywhere...<br>
<br>
What I found:<br>
<br>
gtk testing: <a moz-do-not-send="true"
href="https://docs.gtk.org/glib/testing.html">https://docs.gtk.org/glib/testing.html</a><br>
Which in turn talks about meson or automake configuration to link it
to the build tool chain, here it seems that the project (and
probably most xfce projects) is using automake.<br>
<br>
So I will try to hack into it.<br>
I found the related documentation in GNU automake doc: <a
moz-do-not-send="true"
href="https://www.gnu.org/software/automake/manual/html_node/Use-TAP-with-the-Automake-test-harness.html">https://www.gnu.org/software/automake/manual/html_node/Use-TAP-with-the-Automake-test-harness.html</a><br>
<br>
It will take me some time to setup my first test, but I can go for
it.<br>
I will document everything, so interested developer could reuse my
job on automating tests.<br>
<br>
I also found: xfce-test and behave, but I don't know yet how to use
it.<br>
I did successfully start xfce-test and rebuild my clipman version
from the docker instance, but the GUI Xephyr freeze quite rapidly
when it's not used.<br>
And the xfce-test behave failed for now. May be a incompatible
container version.<br>
<br>
Thanks for your feedback, I will progressively read all that doc and
learn what to do, in order to setup a test suite. <br>
<br>
Regards,<br>
Sylvain. <br>
<b></b><b><br>
<br>
Alex</b> <a
href="mailto:xfce4-dev%40xfce.org?Subject=Re%3A%20unit%20test%20/%20run%20test%20in%20xfce%20code%20%28here%20clipman%29%3F&In-Reply-To=%3C0a7aa712-167e-3feb-2247-b9495dc4cf8d%40gmx.de%3E"
title="unit test / run test in xfce code (here clipman)?">acs82 at
gmx.de </a><br>
<i>Sun Dec 26 23:13:32 CET 2021</i>
<ul>
<li>Previous message (by thread): <a
href="https://mail.xfce.org/pipermail/xfce4-dev/2021-December/032888.html">unit
test / run test in xfce code (here clipman)?
</a></li>
<li> <b>Messages sorted by:</b> <a
href="https://mail.xfce.org/pipermail/xfce4-dev/2021-December/date.html#32889">[
date ]</a> <a
href="https://mail.xfce.org/pipermail/xfce4-dev/2021-December/thread.html#32889">[
thread ]</a> <a
href="https://mail.xfce.org/pipermail/xfce4-dev/2021-December/subject.html#32889">[
subject ]</a> <a
href="https://mail.xfce.org/pipermail/xfce4-dev/2021-December/author.html#32889">[
author ]</a> </li>
</ul>
<hr>
<pre>Hi Sylvain,
I have not much idea of clipman, nor do I know much about
default-structures for tests (afaik most xfce components dont have tests)
Though it might be relevant to your investigations that "make check" in
the test-folder generated some binaries which can be executed.
It's not clear to me what "secure item feature" is .. is there an open
issue for it ?
Cheers,
Alex
Am 26.12.21 um 08:28 schrieb Sylvain Viart:
><i> Hi,
</i>><i>
</i>><i> I've produced a consequent code modification in clipman to add secure
</i>><i> item feature
</i>><i> <<a href="https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/tree/dev-refactor-indexes">https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/tree/dev-refactor-indexes</a>>.
</i>><i> I now test it personally at full time since September 2021, it's
</i>><i> useful and doesn't crash.
</i>><i>
</i>><i> I would like to add test, or more tests, because there's a tests folder.
</i>><i> But I'm not sure how it should be done, nor how to automate test.
</i>><i>
</i>><i> I didn't find Makefile target like: make test
</i>><i>
</i>><i> Could you explain me how you add test to the code structure?
</i>><i>
</i>><i> What I already get, which doesn't explain about unit-testing strategy.
</i>><i>
</i>><i> <a href="https://wiki.xfce.org/dev/howto/panel_plugins#testing_and_releasing_the_plugin">https://wiki.xfce.org/dev/howto/panel_plugins#testing_and_releasing_the_plugin</a>
</i>><i> <<a href="https://wiki.xfce.org/dev/howto/panel_plugins#testing_and_releasing_the_plugin">https://wiki.xfce.org/dev/howto/panel_plugins#testing_and_releasing_the_plugin</a>>
</i>><i>
</i>><i>
</i>><i>
</i>><i> Basically I produced a new data structure to handle index of element,
</i>><i> an indexed double linked list:
</i>><i>
</i>><i> index: [ 0 , 1 , 2 ]
</i>><i> | | |
</i>><i> list: | | |
</i>><i> | | |
</i>><i> | | |
</i>><i> head -> [item1] <=> [item2] <=> [item3]
</i>><i>
</i>><i> Which allow me to access any element by id, and I also maintain a
</i>><i> circular indexes, reusing freed index and clipman history resizing.
</i>><i> I would like to refactor the code and extract the data structure from
</i>><i> the history and to keep it under tests, because pointer and indexes
</i>><i> already gave me some strong
</i>><i> debugging sessions. So I learned remote debugging 😁
</i>><i>
</i>><i> Do you have some rules about testing to follow, or could I introduce
</i>><i> any Makefile target I want?
</i>><i> Do you have to project example to give me that introduces testing in
</i>><i> its code base? So I could borrow the code structure.</i></pre>
<pre class="moz-signature" cols="72">--
Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France</pre>
</body>
</html>