[rkward-devel] rkwardtests package: done :-)

meik michalke Meik.Michalke at uni-duesseldorf.de
Wed Oct 13 13:04:53 UTC 2010


Am Dienstag, 12. Oktober 2010, um 20:17:56 schrieb Thomas Friedrichsmeier:
> Hm, it's certainly less dangerous, now. However, some tests/suites create
> files other than messages, output, and commands, esp.
> import_export_plugins.R, and may potentially be thrown off track, if those
> files already exist.

yeah, i thought myself it wasn't perfect yet. if it's really causing tests to 
fail now, as a temporary solution we could list those files, too.

> One safe approach might be for rktest.runRKTestSuite() to take a snapshot,
> which files are present in the test directory, and to remove all others
> on.exit().

hm, that could work.

> However, sometimes it is quite useful to have those files around
> for inspection, which is why rktest.cleanRKTestSuite() is currently called
> before running the suite, instead of afterwards.

how about adding a new option to the function, like "cleanup=TRUE"?

> Well, I don't know. No good idea on how to resolve this, ATM.

perhaps we could somehow move all file creation to a temporary directory. the 
only problem would be to keep it long enough for stuff like setting test 
standards, i guess.

let's say, we're using an object in globalenv() called ".rktest.temp.dir" to 
store the path name, and if this object doesn't exist (or "cleanup=TRUE"), a 
new tempdir and according object will be created. you could then use the same 
tempdir as long as needed. something like that. that way, you wouldn't have to 
unlink anything in potentially uncertain environemnts.

> > are there still unresolved issues with this package?
> 
> Besides this one, none that I know of, right now. Thanks!

good :-) i'll work on some helper function to test external plugins next. i'll 
assume the contents of a (set of) plugin(s) looks something like this:

 plugins_name/
   plugins/
     plugin_name.xml
     plugin_name.js
     plugin_name.rkh
     ...
   tests/
     testsuite.R
     RKTestStandards.sometest.rkcommands.R
     RKTestStandards.sometest.rkout
     ...
   plugin_name.pluginmap
   ChangeLog
   README
   AUTHORS
   LICENSE
   ...

where the file/dir structure below plugins/ could be anything that matches the 
included .pluginmap and anything except .pluginmap, plugins/ and the plugin 
files is optional. agreed?


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20101013/a3021a64/attachment.sig>


More information about the Rkward-devel mailing list