[rkward-cvs] SF.net SVN: rkward:[3158] trunk/rkward/rkward/rbackend/rpackages/ rkwardtests
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Wed Oct 27 18:47:47 UTC 2010
Revision: 3158
http://rkward.svn.sourceforge.net/rkward/?rev=3158&view=rev
Author: m-eik
Date: 2010-10-27 18:47:46 +0000 (Wed, 27 Oct 2010)
Log Message:
-----------
rkwardtests: results now list only missing packages, if any.
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/RKTestResult-class.R
trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R
trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/RKTestResult-class.Rd
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/RKTestResult-class.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/RKTestResult-class.R 2010-10-27 13:37:50 UTC (rev 3157)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/RKTestResult-class.R 2010-10-27 18:47:46 UTC (rev 3158)
@@ -8,6 +8,7 @@
#' @slot output_match A character string indicating whether the resulting output matched the standard.
#' @slot message_match A character string indicating whether the resulting R messages matched the standard.
#' @slot error A character string indicating errors.
+#' @slot missing_libs A character string indicating missing libraries.
#' @slot passed Logical: Did the test pass?
#' @name RKTestResult
#' @import methods
@@ -17,9 +18,9 @@
#' @rdname RKTestResult-class
setClass ("RKTestResult",
- representation (id = "character", code_match = "character", output_match = "character", message_match = "character", error="character", passed="logical"),
- prototype(character(0), id = character (0), code_match = character (0), output_match = character (0), message_match = character (0), error = character (0), passed=FALSE),
+ representation (id = "character", code_match = "character", output_match = "character", message_match = "character", error="character", missing_libs="character", passed="logical"),
+ prototype(character(0), id = character (0), code_match = character (0), output_match = character (0), message_match = character (0), error = character (0), missing_libs = character (0), passed=FALSE),
validity=function (object) {
- return (all.equal (length (object at id), length (object at code_match), length (object at output_match), length (object at message_match), length (object at error), length (object at passed)))
+ return (all.equal (length (object at id), length (object at code_match), length (object at output_match), length (object at message_match), length (object at error), length (object at missing_libs), length (object at passed)))
}
)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R 2010-10-27 13:37:50 UTC (rev 3157)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R 2010-10-27 18:47:46 UTC (rev 3158)
@@ -54,10 +54,10 @@
print (allresults)
if (any (is.na (allresults at passed))) {
+ missing.libs <- unique(allresults at missing_libs[!is.na(allresults at missing_libs)])
cat ("\nNOTE: Skipped tests due to missing libaries are not an indication of problems.")
- cat ("\nCurrently, the following R packages are needed in order to run all available tests:")
- # TODO: Make this list dynamic and / or print only the missing libs
- cat ('\n"R2HTML", "tseries", "nortest", "outliers", "exactRankTests", "moments", "car", "hdrcde", "qcc", "xtable", "eRm", "ltm"')
+ cat ("\nThe following missing R packages are needed in order to run all tests:\n")
+ print(missing.libs)
}
sink()
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R 2010-10-27 13:37:50 UTC (rev 3157)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R 2010-10-27 18:47:46 UTC (rev 3158)
@@ -21,6 +21,7 @@
objecta at output_match[index+i] = objectb at output_match[i]
objecta at message_match[index+i] = objectb at message_match[i]
objecta at error[index+i] = objectb at error[i]
+ objecta at missing_libs[index+i] = objectb at missing_libs[i]
objecta at passed[index+i] = objectb at passed[i]
}
@@ -115,6 +116,7 @@
if (length (missing_libs) > 0) {
result at output_match <- result at message_match <- result at code_match <- NA_character_
result at error <- "missing lib(s)"
+ result at missing_libs <- missing_libs
result at passed <- NA
cat ("\nSkipping test \"", test at id, "\" due to missing libraries: \"", paste (missing_libs, collapse="\", \""), "\"\n", sep="")
return (result)
@@ -159,7 +161,7 @@
assign(".rktest.tmp.storage", new.env(), pos=globalenv())
} else{}
if (exists (backup.name, envir=.rktest.tmp.storage, inherits=FALSE)) {
- message ("Is looks like ", name, " has already been replaced. Not replacing it again.")
+ message ("It looks like ", name, " has already been replaced. Not replacing it again.")
} else {
assign (backup.name, get (name, envir), envir=.rktest.tmp.storage)
assign (name, replacement, envir)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/RKTestResult-class.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/RKTestResult-class.Rd 2010-10-27 13:37:50 UTC (rev 3157)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/RKTestResult-class.Rd 2010-10-27 18:47:46 UTC (rev 3158)
@@ -7,5 +7,5 @@
\details{This class is used internally by \code{\link[rkwardtests:rktest.makeplugintests]{rktest.makeplugintests}}.}
\keyword{classes}
\author{Thomas Friedrichsmeier \email{thomas.friedrichsmeier at ruhr-uni-bochum.de}}
-\section{Slots}{\describe{\item{\code{id}:}{}\item{\code{code_match}:}{}\item{\code{output_match}:}{}\item{\code{message_match}:}{}\item{\code{error}:}{}\item{\code{passed}:}{}}}
+\section{Slots}{\describe{\item{\code{id}:}{}\item{\code{code_match}:}{}\item{\code{output_match}:}{}\item{\code{message_match}:}{}\item{\code{error}:}{}\item{\code{missing_libs}:}{}\item{\code{passed}:}{}}}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list