Hi, Nagappan,<br><br>Thanks for the quick reply.<br><br>I will use some temp solutions. I do hope to see possible improvement in the future LDTP release. Thanks for the already-very-helping effort!<br><br>Best Regards<br>Scott Wang<br>
<br><div class="gmail_quote">On Fri, Sep 18, 2009 at 10:55 AM, Nagappan Alagappan <span dir="ltr"><<a href="mailto:nagappan@gmail.com">nagappan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Scott,<br><br><div class="gmail_quote"><div class="im">On Thu, Sep 17, 2009 at 4:21 AM, Wang Qi, Scott <span dir="ltr"><<a href="mailto:wangqi.s@gmail.com" target="_blank">wangqi.s@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, Nagappan,<br><br>I followed the ldtp-tutorial and created a ldtprunner XML file named 'run.xml'. The XML file loaded a script named 'test.py' successfully. <br><br>In 'test.py', I loaded a ldtp Data XML file as follows. But I found that the 'data.xml' must reside in the same directory as 'run.xml'.<br>
<span style="font-family: courier new,monospace;"><br>dataXml = ldtputils.LdtpDataFileParser ('data.xml')</span><br><br>It causes some difficulites in arranging the ldtprunner xml files. We may have mutilple runner xml files comming from different directories to load the same 'test.py'. It forbid we write a hardcoded path for 'data.xml'. <br>
1) One solution is to use a flat directory structure. But it is too unnatural.<br></blockquote></div><div><br>Sorry, when I designed, just thought the files will be on current working directory :)<br><br> </div><div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) The other is to use os.getcwd() and os.chcwd() to change the working directory. But it seems I can't use '__file__' macro to get the current executing file's path information resolved.<br>
<br>Is there a better solution or hack available?<br></blockquote></div><div><br>The GNOME Desktop Testing team uses the LDTP API for automation and they have written their own version something similar or better than ldtprunner :) In the mean time, let me try to fix this as well.<br>
<br>Thanks<br>Nagappan <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>(It seems ldtp 1.7.1's ldtprunner implementation use 'execfile' to run the loaded script. I am not sure if there is another other standard method to solve the above issue)<br>
<br>Thanks<br><font color="#888888">Scott Wang<br><br><br>
</font><br></div>_______________________________________________<br>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org" target="_blank">LDTP-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a><br><a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a><br>
</font></blockquote></div><br>