SCM

SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/R/test.R
ViewVC logotype

Diff of /pkg/inlinedocs/R/test.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 238, Mon Mar 28 15:03:35 2011 UTC revision 239, Mon Mar 28 16:07:28 2011 UTC
# Line 15  Line 15 
15    suppressWarnings(sys.source(f,e))    suppressWarnings(sys.source(f,e))
16    ## these are the items to check for, in no particular order    ## these are the items to check for, in no particular order
17    .result <- e$.result    .result <- e$.result
18    result <- extract.docs.file(f,e$.parsers)    parsers <- e$.parsers
19      result <- extract.docs.file(f,parsers)
20    for(FUN in names(.result)){    for(FUN in names(.result)){
21      if(verbose)cat(FUN,"")      if(verbose)cat(FUN,"")
22      fun <- result[[FUN]]      fun <- result[[FUN]]
# Line 47  Line 48 
48    ## finally make a package using this file and see if it passes    ## finally make a package using this file and see if it passes
49    ## without warnings    ## without warnings
50    if(!is.null(e$.dontcheck))return()    if(!is.null(e$.dontcheck))return()
51      make.package.and.check(f,parsers)
52      if(verbose)cat("\n")
53    }
54    
55    ### Make a package by processing f with a standard DESCRIPTION, and
56    ### stop if there are errors or warnings.
57    make.package.and.check <- function(f,parsers=default.parsers){
58    pkgname <- sub(".[rR]$","",basename(f))    pkgname <- sub(".[rR]$","",basename(f))
59    pkgdir <- file.path(tempdir(),pkgname)    pkgdir <- file.path(tempdir(),pkgname)
60    if(file.exists(pkgdir))unlink(pkgdir,recursive=TRUE)    if(file.exists(pkgdir))unlink(pkgdir,recursive=TRUE)
# Line 55  Line 63 
63    desc <- file.path(system.file(package="inlinedocs"),"silly","DESCRIPTION")    desc <- file.path(system.file(package="inlinedocs"),"silly","DESCRIPTION")
64    file.copy(desc,pkgdir)    file.copy(desc,pkgdir)
65    file.copy(f,rdir)    file.copy(f,rdir)
66    package.skeleton.dx(pkgdir,e$.parsers)    print(pkgdir)
67      package.skeleton.dx(pkgdir,parsers)
68    cmd <- sprintf("%s CMD check %s",file.path(R.home("bin"), "R"),pkgdir)    cmd <- sprintf("%s CMD check %s",file.path(R.home("bin"), "R"),pkgdir)
69    if(verbose)cat(cmd,"\n")    if(verbose)cat(cmd,"\n")
70    checkLines <- system(cmd,intern=TRUE)    checkLines <- system(cmd,intern=TRUE)
# Line 64  Line 73 
73      print(warnLines)      print(warnLines)
74      stop("WARNING encountered in package check!")      stop("WARNING encountered in package check!")
75    }    }
   if(verbose)cat("\n")  
76  }  }
77    
78  save.test.result <- function  save.test.result <- function

Legend:
Removed from v.238  
changed lines
  Added in v.239

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge