[Rprotobuf-commits] r573 - in pkg: . vignettes

Murray Stokely mstokely at google.com
Thu Dec 19 03:04:39 CET 2013


great.  I'm working on section 3 of rprotobuf-intro now.   - Murray


On Wed, Dec 18, 2013 at 6:02 PM, <noreply at r-forge.r-project.org> wrote:

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


More information about the Rprotobuf-commits mailing list