Hi Andre, Thank you very much, now the script are working.
But there is another problem. When runing the script, it says: running framework/first/first.bas [Java framework] Error in function createSettingsDocument(elements.cxx). PID of Testtool: 7635 Successfully started [Java framework] Error in function createSettingsDocument(elements.cxx). PID of Testtool: 7635 Successfully started And in the first.res, there is warning: warning: Could not get the productKey value! Setting it to 'OpenOffice.org 2.0' and trying to run the tests! Warning: Error in GetIniValue(...):/opt/openoffice3.0/program/bootstraprc not found Error out side of testcase /qa/qatesttool/global/tools/inc/t_tools2.inc: FindBuildID$() /qa/qatesttool/global/system/inc/master.inc: hStartTheOffice(Optional byref sProfPath$, Optional Byref sProfParameter$) ...... Why these warnings and errors occured? Thank you! Best regards, Lihua 2008-06-27 发件人: Andre Schnabel 发送时间: 2008-06-26 15:37:35 收件人: [email protected] 抄送: 主题: Re: [qa-dev] Batch file in Linux Hi, -------- Original-Nachricht -------- > Von: "Zhu Lihua" <[EMAIL PROTECTED]> > I was puzzled while I was running the batch file "ooo_releasetests.sh" in > linux. I'm not familar with linux batch file. > > my_dir=`dirname "$0"` > "$my_dir/run_tests.sh" < "$my_dir/../ooo_releasetests.lst" > > > The first line seems to assign the path name of the run_test.sh located to > the variable my_dir. correct > > and the 2nd line seems to input the list file in the parent directory to > the "run_tests.sh" batch file. correct > I replace the word dirname with the dirctory "/qa/qatestool/script/unix". > the following messages are given: > > /qa/qatesttool/script/unix: is a directory. > > /../ooo_releasetests.lst: no such file or directory. > > why this? And what does the "$0" mean? "$0" expands to the full file name (including path) of the script. The command dirname $0 will give the path of the current script. Note that "dirname" is considered as command in this case (enclosed in `). So if you replace the command "dirname" by the directory name, this will fail (a directory cannot be executed). This very small script is only there, because we once had a script "ooo_releasetests.sh" containing all testcases to run. I then separeted data (now ooo_releasetests.lst) from code (now ooo_releasetests.lst). The run_tests.sh script is still in place, just in case anyobody had this in her environment. To make it short - it is better to execute /qa/qatestool/script/unix/run_tests.sh </qa/qatestool/script/ooo_releasetests.lst Andr? -- Psssst! Schon vom neuen GMX MultiMessenger geh�rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
