<div dir="ltr">great. I'm working on section 3 of rprotobuf-intro now. - Murray</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 18, 2013 at 6:02 PM, <span dir="ltr"><<a href="mailto:noreply@r-forge.r-project.org" target="_blank">noreply@r-forge.r-project.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: edd<br>
Date: 2013-12-19 03:02:22 +0100 (Thu, 19 Dec 2013)<br>
New Revision: 573<br>
<br>
Removed:<br>
pkg/vignettes/unitTests/<br>
Modified:<br>
pkg/ChangeLog<br>
pkg/cleanup<br>
pkg/vignettes/RProtoBuf-unitTests.Rnw<br>
Log:<br>
rewritten / simplified unitTests vignette<br>
<br>
<br>
Modified: pkg/ChangeLog<br>
===================================================================<br>
--- pkg/ChangeLog 2013-12-19 01:23:37 UTC (rev 572)<br>
+++ pkg/ChangeLog 2013-12-19 02:02:22 UTC (rev 573)<br>
@@ -2,6 +2,8 @@<br>
<br>
* vignettes/RProtoBuf-intro.Rnw: Use with vignette builder<br>
* vignettes/RProtoBuf-quickref.Rnw: Idem<br>
+ * vignettes/RProtoBuf-unitTests.Rnw: Rewritten / simplified<br>
+<br>
* DESCRIPTION: Increased dependency to R (>= 3.0.0)<br>
<br>
* <a href="http://configure.in" target="_blank">configure.in</a>: No longer create vignettes/Makefile<br>
<br>
Modified: pkg/cleanup<br>
===================================================================<br>
--- pkg/cleanup 2013-12-19 01:23:37 UTC (rev 572)<br>
+++ pkg/cleanup 2013-12-19 02:02:22 UTC (rev 573)<br>
@@ -4,9 +4,11 @@<br>
src/<a href="http://addressbook.pb.cc" target="_blank">addressbook.pb.cc</a> src/addressbook.pb.h \<br>
src/<a href="http://protobufrpc.pb.cc" target="_blank">protobufrpc.pb.cc</a> src/protobufrpc.pb.h \<br>
src/*.o src/*.d src/*.a src/*.dll src/*.so src/*.rc */*~ *~ \<br>
- src/symbols.rds<br>
+ src/symbols.rds \<br>
+ vignettes/RProtoBuf*.aux vignettes/RProtoBuf*.log \<br>
+ vignettes/RProtoBuf*.out vignettes/RProtoBuf*.toc \<br>
+ vignettes/RProtoBuf*.tex<br>
+<br>
rm -rf inst/doc/auto<br>
<br>
-( cd vignettes; rm -f RProtoBuf*.aux RProtoBuf*.log \<br>
- RProtoBuf*.out RProtoBuf*.toc )<br>
<br>
<br>
Modified: pkg/vignettes/RProtoBuf-unitTests.Rnw<br>
===================================================================<br>
--- pkg/vignettes/RProtoBuf-unitTests.Rnw 2013-12-19 01:23:37 UTC (rev 572)<br>
+++ pkg/vignettes/RProtoBuf-unitTests.Rnw 2013-12-19 02:02:22 UTC (rev 573)<br>
@@ -1,21 +1,63 @@<br>
\documentclass[10pt]{article}<br>
%\VignetteIndexEntry{RProtoBuf-unitTests}<br>
+%\VignetteKeywords{RProtoBuf, Protocol Buffers, package}<br>
+%\VignetteDepends{RProtoBuf}<br>
+<br>
\usepackage{vmargin}<br>
\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}<br>
<br>
+<<echo=FALSE,print=FALSE>>=<br>
+require(RProtoBuf)<br>
+prettyVersion <- packageDescription("RProtoBuf")$Version<br>
+prettyDate <- format(Sys.Date(), "%B %e, %Y")<br>
+library(RUnit)<br>
+@<br>
+<br>
\usepackage[colorlinks]{hyperref}<br>
\author{Romain Fran\c{c}ois \and Dirk Eddelbuettel \and Murray Stokely}<br>
\title{RProtoBuf : Unit testing results}<br>
+\date{RProtoBuf version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}<br>
+<br>
\begin{document}<br>
\maketitle<br>
<br>
+\section*{Test Execution}<br>
+<br>
+<<unitTesting,echo=FALSE,print=FALSE>>=<br>
+pkg <- "RProtoBuf"<br>
+<br>
+if (file.exists("unitTests-results")) unlink("unitTests-results", recursive = TRUE)<br>
+dir.create("unitTests-results")<br>
+pathRcppTests <<- system.file("unitTests", package = pkg)<br>
+path <- system.file("unitTests", package=pkg)<br>
+testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs=path)<br>
+tests <- runTestSuite(testSuite)<br>
+err <- getErrors(tests)<br>
+if (err$nFail > 0) cat(sprintf("unit test problems: %d failures", err$nFail))<br>
+if (err$nErr > 0) cat(sprintf("unit test problems: %d errors", err$nErr))<br>
+printHTMLProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.html", pkg))<br>
+printTextProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.txt" , pkg))<br>
+<br>
+if (file.exists("/tmp")) {<br>
+ invisible(sapply(c("txt", "html"), function(ext) {<br>
+ fname <- sprintf("unitTests-results/%s-unitTests.%s", pkg, ext)<br>
+ file.copy(fname, "/tmp", overwrite=TRUE)<br>
+ }))<br>
+}<br>
+@<br>
+<br>
+\section*{Test Results}<br>
+<br>
\begin{verbatim}<br>
-<<echo=FALSE,results=tex>>=<br>
-results <- "unitTests-results/RProtoBuf-unitTests.txt"<br>
-if( file.exists( results ) ){<br>
- writeLines( readLines( results ) )<br>
+<<importResults,echo=FALSE,results=tex>>=<br>
+results <- sprintf("unitTests-results/%s-unitTests.txt", pkg)<br>
+if (file.exists(results)) {<br>
+ writeLines(readLines(results))<br>
+} else{<br>
+ writeLines("Unit test results not available")<br>
}<br>
@<br>
+<br>
\end{verbatim}<br>
<br>
\end{document}<br>
<br>
_______________________________________________<br>
Rprotobuf-commits mailing list<br>
<a href="mailto:Rprotobuf-commits@lists.r-forge.r-project.org">Rprotobuf-commits@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rprotobuf-commits" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rprotobuf-commits</a><br>
</blockquote></div><br></div>