[yast-devel] Weirdness in YaST testsuites
Hi, All of you have definitely already written some testsuite for your YaST module. That's right because writing testsuites (that are executed in the RPM-build-time) can prevent from getting more bugreports later. Anyway, sometimes there are some problems between chair and keyboard that need a small hint from some other developer (Mvidner for today ;)). Today's problem were constructors in imported modules. I was unable to make testsuite pass even if everything seemed to be all right: --- cut (shortened) --- include "testsuite.ycp"; import "Bootloader"; map EXECUTE = $[ "target" : $[ "bash_output" : $[] ] ] TESTSUITE_INIT ([READ, WRITE, EXECUTE], nil); TEST (``(Bootloader::Read()), [READ, WRITE, EXECUTE], nil); --- cut (shortened) --- make check kept returning: Encoding.ycp:33 Can't convert value '0' to type 'map' Encoding.ycp:33 contains: map m = (map) SCR::Execute( .target.bash_output, "locale -k charmap" ); So, has what helped? Just moving the >import "Bootloader";< after >TESTSUITE_INIT< call. --- cut (shortened) --- include "testsuite.ycp"; map EXECUTE = $[ "target" : $[ "bash_output" : $[] ] ] TESTSUITE_INIT ([READ, WRITE, EXECUTE], nil); import "Bootloader"; TEST (``(Bootloader::Read()), [READ, WRITE, EXECUTE], nil); --- cut (shortened) --- That's all for now. Next time "How to make your computer implement manager's FATE requests automagically -- Three steps to a better life". Have a nice day Lukas -- Lukas Ocilka, YaST Developer (xn--luk-gla45d) ----------------------------------------------------------------- SUSE LINUX, s. r. o., Lihovarska 1060/12, Praha 9, Czech Republic
On Thu, 1 Nov 2007, Lukas Ocilka wrote:
So, has what helped? Just moving the >import "Bootloader";< after >TESTSUITE_INIT< call.
--- cut (shortened) --- include "testsuite.ycp";
map EXECUTE = $[ "target" : $[ "bash_output" : $[] ] ] TESTSUITE_INIT ([READ, WRITE, EXECUTE], nil);
import "Bootloader";
It should be also possible to use the Testsuite module, if it's imported as the first one that should solve those problems too. BTW searching for "testsuite" at forge does not find anything at all, shouldn't there be the docu from testsuite/doc? Not that the testsuite/doc would be up to date ;) Michal -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Michal Svec napsal(a):
On Thu, 1 Nov 2007, Lukas Ocilka wrote:
So, has what helped? Just moving the >import "Bootloader";< after >TESTSUITE_INIT< call.
--- cut (shortened) --- include "testsuite.ycp";
map EXECUTE = $[ "target" : $[ "bash_output" : $[] ] ] TESTSUITE_INIT ([READ, WRITE, EXECUTE], nil);
import "Bootloader";
It should be also possible to use the Testsuite module, if it's imported as the first one that should solve those problems too.
BTW searching for "testsuite" at forge does not find anything at all, shouldn't there be the docu from testsuite/doc?
Frankly, was that a question :)? Forge contains documentation built from sources. Our sources have often a docbook documentation (XML format) and my 'build_docu*' script builds these parts and merges them into one documentation. In my opinion maintainer (father) of testsuite should write a docbook docu. Of course, I could do that as well. To be honest, writing a tutorial about 'howto write testsuites' is still in my TODO list.
Not that the testsuite/doc would be up to date ;)
It's open-source, you should have access to SVN to fix it :) ;) L.
On Fri, 2 Nov 2007, Lukas Ocilka wrote:
So, has what helped? Just moving the >import "Bootloader";< after >TESTSUITE_INIT< call.
--- cut (shortened) --- include "testsuite.ycp";
map EXECUTE = $[ "target" : $[ "bash_output" : $[] ] ] TESTSUITE_INIT ([READ, WRITE, EXECUTE], nil);
import "Bootloader";
It should be also possible to use the Testsuite module, if it's imported as the first one that should solve those problems too.
BTW searching for "testsuite" at forge does not find anything at all, shouldn't there be the docu from testsuite/doc?
Frankly, was that a question :)?
I expected the html is included, as there's quite a lot of documentation in (regular) html.
Forge contains documentation built from sources. Our sources have often a docbook documentation (XML format) and my 'build_docu*' script builds these parts and merges them into one documentation.
Any pointers to documentation how to write documentation?
In my opinion maintainer (father) of testsuite should write a docbook docu. Of course, I could do that as well. To be honest, writing a tutorial about 'howto write testsuites' is still in my TODO list.
Some docu is already there (quite nice ;), you could possibly use it. M. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Lukas Ocilka
-
Michal Svec