<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/101790/">http://git.reviewboard.kde.org/r/101790/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 4th, 2011, 8:48 a.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Here is what we need to do -

1. The strigi tests should be in their own directory, like the filewatch tests.

2. I don&#39;t think kde people will approve of adding binary files like images in the kde-runtime repository. So, we might need to put this code in another repository (nepomuk-tests?). Or create a separate kde-runtime-tests. A separate repository wouldn&#39;t work right now, cause you&#39;re linking to the source files of the indexer. But I don&#39;t think that is required.

We should ideally run the strigi service, and then tell it exactly what do to via dbus. The present dbus interface for the strigi service is quite adequate. It just lacks a signal to inform us when a file has finished indexing. That can easily be added. Do you want me to do it?

---

Btw, thank you very much for working on this. Testing is really important and we&#39;ve been lacking a formal testing environment for quite some time.


 </pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I really don&#39;t think testing should be restricted by infrastructure - ie. what is possible to commit where etc. I would rather leave this as is, not using D-Bus explicitly. It will be useful to have this kind of code when it&#39;s possible to mock remote communication. See also a nice example in Soprano tests - base multithreadingtest.cpp/h and subclass with D-Bus communication for createModel etc. That way you can develop tests quickly with mocks and still have full integration cycle with D-Bus simply by smart subclassing.

As for binary stuff - I don&#39;t know what is the policy, will try to find out.</pre>
<br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 4th, 2011, 8:48 a.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101790/diff/2/?file=25636#file25636line10" style="color: black; font-weight: bold; text-decoration: underline;">nepomuk/CMakeLists.txt</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">10</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">  ${nepomuk_SOURCE_DIR}/services/storage/lib</pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don&#39;t think contaminating the global CMakeLists.txt is a good idea. Whatever includes are required should be in the local CMakeLists.txt</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">IIRC, those includes are needed for various different source folders, that&#39;s why I moved it to the root. In general include paths are a mess. I will revisit this and try to move them to more specific places...</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 4th, 2011, 8:48 a.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101790/diff/2/?file=25638#file25638line50" style="color: black; font-weight: bold; text-decoration: underline;">nepomuk/services/strigi/nepomukindexer.h</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">namespace Nepomuk {</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">50</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">class</span> <span class="n">Indexer</span> <span class="o">:</span> <span class="n">public</span> <span class="n">KJob</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">50</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">class</span> <span class="n">Indexer<span class="hl">Launcher</span></span> <span class="o">:</span> <span class="n">public</span> <span class="n">KJob</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;ve would prefer something like IndexingJob, which makes it obvious it is an asynchronous process implemented via KJob.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think more important is that it launches nepomukindexer binary using KProcess but if you insist I can change it.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 4th, 2011, 8:48 a.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101790/diff/2/?file=25645#file25645line56" style="color: black; font-weight: bold; text-decoration: underline;">nepomuk/tests/indexertests.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void IndexerTests::testSimpleIndexing() {</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">56</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">Nepomuk</span><span class="o">::</span><span class="n">Indexer</span> <span class="n">indexer</span><span class="p">;</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It would be better if you started the strigi service using startService( .. ), and then tell it to index files over dbus.

Or you could just call the &quot;nepomukindexer&quot; process on the file you want to index, and avoid linking the source files.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No, this is specifically what I wanted to do here.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 4th, 2011, 8:48 a.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101790/diff/2/?file=25645#file25645line77" style="color: black; font-weight: bold; text-decoration: underline;">nepomuk/tests/indexertests.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void IndexerTests::testSimpleIndexing() {</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">77</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">IndexerTests</span><span class="o">::</span><span class="n">testDirectoryIndexing</span><span class="p">()</span> <span class="p">{</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Does this test pass? Cause from what I remember, it shouldn&#39;t pass.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes it does, why wouldn&#39;t it?</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 4th, 2011, 8:48 a.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101790/diff/2/?file=25657#file25657line1" style="color: black; font-weight: bold; text-decoration: underline;">nepomuk/tests/test/filewatch/filewatch.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">/*</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I wrote this test really long ago. From what I remember it never worked. Could you remove it?

Maybe I&#39;ll fix it and add it later.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, I will remove it, I added it to the commit by mistake.</pre>
<br />




<p>- Paweł</p>


<br />
<p>On June 28th, 2011, 7:31 a.m., Paweł Paprota wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Nepomuk.</div>
<div>By Paweł Paprota.</div>


<p style="color: grey;"><i>Updated June 28, 2011, 7:31 a.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is a little ground work for writing integration tests in order to test Nepomuk components in the &quot;real&quot; setup - with D-Bus/socket communication, Virtuoso repository, KConfig configuration running etc.

Also included are simple tests for indexing of files (see indexertests.cpp).

See README for details.

The code is also available here:

https://github.com/ppawel/kde-runtime/tree/integration-tests</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tests should execute with simple &quot;make test&quot;. I did however have some problems (segfaults) with sendEvents method that notifies the user that &quot;indexing started for fast search&quot; - I had to disable it locally, I will try to track down the cause of this if it is reproducible.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>nepomuk/CMakeLists.txt <span style="color: grey">(c6a1879)</span></li>

 <li>nepomuk/services/strigi/indexscheduler.cpp <span style="color: grey">(56914a7)</span></li>

 <li>nepomuk/services/strigi/nepomukindexer.h <span style="color: grey">(08abb2a)</span></li>

 <li>nepomuk/services/strigi/nepomukindexer.cpp <span style="color: grey">(d796983)</span></li>

 <li>nepomuk/services/strigi/strigiservice.h <span style="color: grey">(2eb7eac)</span></li>

 <li>nepomuk/services/strigi/strigiservice.cpp <span style="color: grey">(0189679)</span></li>

 <li>nepomuk/tests/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/README <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/indexertests.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/indexertests.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/NepomukTestLibMacros.cmake <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/nepomuk-repository-with-ontologies.tgz <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/nepomukserverrc.in <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/nepomuktest_export.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/testbase.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/lib/testbase.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/runNepomukTest.sh <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/test/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/test/filewatch/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/test/filewatch/filewatch.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/test/filewatch/filewatch.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/test/identificationtest.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/test/identificationtest.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/testdata/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/testdata/klogo.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>nepomuk/tests/testdata/trollface.jpg <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101790/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>