<div><div>Hi Markus,</div><div>Thanks for your reply.</div><div><br></div><div>Actually I did make right entry in the makefile('test/Package_unittest.mk') and also added a test-profile at appropriate location('test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml').But this <a href="http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/gsoc-impresslayout&id=a837a7c573c5f35fbcf7b9375725282496b0f4c9" target="_blank">commit</a> had only partially solved the problem(for the unit-test). Because as per my discussion with Thorsten,it seems that there is some problem with how "brandbasedir"(i.e vnd.sun.star.expand:$BRAND_BASE_DIR) is expanded for the "<b>unit-test</b>".</div>

<div><br></div><div>Can you please suggest me appropriate pointer to the makefile,so I can either change how "brandbasedir" is expanded for "unit tests" or may be I could stick the xml files into a different directory. </div>

<div><br></div><div>Thanks and Regards,</div><div>Vishv</div></div><br><div class="gmail_quote">On Fri, Jul 5, 2013 at 9:26 PM, Markus Mohrhard <span dir="ltr"><<a href="mailto:markus.mohrhard@googlemail.com" target="_blank">markus.mohrhard@googlemail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Vishv,<br>
<br>
2013/7/5 Vishv Brahmbhatt <<a href="mailto:vishvbrahmbhatt19@gmail.com" target="_blank">vishvbrahmbhatt19@gmail.com</a>>:<br>
<div>> Hi,<br>
><br>
> I am working on "Slide Layout Extendibility" project for GSOC. As for one of<br>
> my initial task,I had to set up XML file and parser which reads information<br>
> from that XML file.So as of now the parser is working perfectly and even<br>
> compilation works perfectly.But the "unit test" fails.I have been stuck on<br>
> this error for last 4 days and it seems that,there is a bug in the<br>
> "unit-test" process(for XML configuration files in Impress). And I am<br>
> sharing this problem as per the advice of my mentor Thorsten(Please refer to<br>
> my commit & Error links at the end):<br>
><br>
> (1) So for setting up the configuration path of "layoutlist.xml" ,I have<br>
> made an entry of "LayoutListFiles",similar to that of "EffectFiles" in<br>
> "Impress.xcs:457".<br>
><br>
> (2) The code processing of XML is similar to that in<br>
> "core/sd/source/core/CustomAnimationPreset.cxx:300".<br>
><br>
> (3) After using xNameAccess->getByName( "LayoutListFiles" ) >>= aFiles and<br>
> expandMacros() function.The configuration file-path<br>
> "vnd.sun.star.expand:$BRAND_BASE_DIR/share/config/soffice.cfg/simpress/layoutlist.xml"<br>
> expands to<br>
> "/home/vishv/Libre_Git/core/solver/unxlngx6/installation/opt/program/../share/config/soffice.cfg/simpress/layoutlist.xml"<br>
> for "installation" process.<br>
><br>
> But for "Unit-Test" ,it expands to<br>
> "/home/vishv/Libre_Git/core/solver/unxlngx6/unittest/install/share/config/soffice.cfg/simpress/layoutlist.xml".<br>
<br>
</div>Ok so some background knowdlege about why our unittests work<br>
differently than a normal start. For unit tests we use a clean minimal<br>
user profile that contains exactly the few entries that are necessary<br>
to run the tests during a build.<br>
<div><br>
><br>
> I am using the above generated string in parseURI(string filepath) to get<br>
> DOM structure and then traverse through XML for information.<br>
><br>
> (4)So in-spite of unit-test errors, XML parser works perfectly,because<br>
> correct path goes into the parseURI() in the installation process(i.e<br>
> .install/program/simpress works well without any crashes).<br>
><br>
> (5)The problem here is that path generated for unit-test check is wrong:<br>
><br>
> Correct path should be:<br>
> "/home/vishv/Libre_Git/core/solver/unxlngx6/unittest/install/../user/share/config/soffice.cfg/simpress/layoutlist.xml"<br>
> , because at this place a new "layoutlist.xml" is generated after packaging.<br>
> But the wrong path generated as stated above is<br>
> :"/home/vishv/Libre_Git/core/solver/unxlngx6/unittest/install/share/config/soffice.cfg/simpress/layoutlist.xml"<br>
> It leads to errors (i.e failed to load external entity  at "filepath..." )<br>
><br>
> Also this scenario happens for the current configuration "effects.xml" file<br>
> as well.<br>
><br>
> It would be great ,if someone can guide in correcting the "unit-test" path<br>
> and indeed removing the error.Also please correct me,if I am wrong in my<br>
> observations.<br>
<br>
</div>So if you need these files for the unit tests you need to tell the<br>
tests that they should be copied to the tests profile. You can find<br>
the test profile at test/user-template/ and the makefile copying them<br>
to their destination folder at test/Package_unittest.mk. You might<br>
just want to add some code to the makefile that takes your xml files<br>
and copies them to the correct location.<br>
<br>
Regards,<br>
Markus<br>
</blockquote></div><br>