Changeset: d0935cbc0c50 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d0935cbc0c50 Added Files: clients/R/Tests/deps-install.R clients/R/Tests/deps-install.stable.err clients/R/Tests/deps-install.stable.out clients/R/Tests/deps-test.R clients/R/Tests/deps-test.stable.err clients/R/Tests/deps-test.stable.out clients/R/Tests/deps-test.timeout clients/R/Tests/dplyr-flights.reqtests clients/R/Tests/install.R clients/R/Tests/install.reqtests sql/test/BugTracker-2015/Tests/backslash_predecing_separator.Bug-3775.sql Removed Files: clients/R/Tests/dplyr-flights.reqtest clients/R/Tests/install-dependencies.sh clients/R/Tests/install.sh Modified Files: clients/R/Tests/All clients/R/Tests/dbapply.reqtests clients/R/Tests/dplyr.reqtests clients/R/Tests/install.stable.err clients/R/Tests/install.stable.out clients/R/Tests/survey.reqtests Branch: default Log Message:
Merge to default. diffs (truncated from 408 to 300 lines): diff --git a/clients/R/Tests/All b/clients/R/Tests/All --- a/clients/R/Tests/All +++ b/clients/R/Tests/All @@ -1,3 +1,5 @@ +HAVE_LIBR?deps-install +HAVE_LIBR?deps-test HAVE_LIBR?install HAVE_LIBR?dbi HAVE_LIBR?survey diff --git a/clients/R/Tests/dbapply.reqtests b/clients/R/Tests/dbapply.reqtests --- a/clients/R/Tests/dbapply.reqtests +++ b/clients/R/Tests/dbapply.reqtests @@ -1,2 +1,1 @@ -install dbi diff --git a/clients/R/Tests/deps-install.R b/clients/R/Tests/deps-install.R new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-install.R @@ -0,0 +1,14 @@ +# create lib folder if it should be missing to avoid the prompt +dir.create(unlist(strsplit(Sys.getenv("R_LIBS_USER"), .Platform$path.sep))[1L], recursive = TRUE, showWarnings=F) + +# autoinstall DBI and digest, we need those to install MonetDB.R +dd <- capture.output( suppressMessages ( { + (function(lp) { + np <- lp[!(lp %in% installed.packages()[,"Package"])] + repos <- "http://cran.rstudio.com/" + if(length(np)) install.packages(np,repos=repos, type="source", quiet=T) + update.packages(repos=repos, ask=F, oldPkgs=lp, type="source", quiet=T) + x <- lapply(lp,function(x){library(x,character.only=TRUE,quietly=T)}) + })(c("DBI", "digest")) +})) + diff --git a/clients/R/Tests/deps-install.stable.err b/clients/R/Tests/deps-install.stable.err new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-install.stable.err @@ -0,0 +1,37 @@ +stderr of test 'deps-install` in directory 'clients/R` itself: + + +# 16:13:02 > +# 16:13:02 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=35560" "--set" "mapi_usock=/var/tmp/mtest-78488/.s.monetdb.35560" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_clients_R" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 16:13:02 > + +# builtin opt gdk_dbpath = /Users/hannes/monetdb-install/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 35560 +# cmdline opt mapi_usock = /var/tmp/mtest-78488/.s.monetdb.35560 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /Users/hannes/monetdb-install/var/MonetDB/mTests_clients_R +# cmdline opt mal_listing = 0 +# cmdline opt embedded_r = yes +# cmdline opt gdk_debug = 536870922 + +# 16:13:02 > +# 16:13:02 > "R" "--vanilla" "--slave" "--args" "35560" +# 16:13:02 > + + +# 16:13:03 > +# 16:13:03 > "Done." +# 16:13:03 > + diff --git a/clients/R/Tests/deps-install.stable.out b/clients/R/Tests/deps-install.stable.out new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-install.stable.out @@ -0,0 +1,34 @@ +stdout of test 'deps-install` in directory 'clients/R` itself: + + +# 16:13:02 > +# 16:13:02 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=35560" "--set" "mapi_usock=/var/tmp/mtest-78488/.s.monetdb.35560" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_clients_R" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 16:13:02 > + +# MonetDB 5 server v11.22.0 +# This is an unreleased version +# Serving database 'mTests_clients_R', using 4 threads +# Compiled for x86_64-apple-darwin14.4.0/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 16.000 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://dakar.da.cwi.nl:35560/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-78488/.s.monetdb.35560 +# MonetDB/GIS module loaded +# Start processing logs sql/sql_logs version 52200 +# Finished processing logs sql/sql_logs +# MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. + +# 16:13:02 > +# 16:13:02 > "R" "--vanilla" "--slave" "--args" "35560" +# 16:13:02 > + + +# 16:13:03 > +# 16:13:03 > "Done." +# 16:13:03 > + diff --git a/clients/R/Tests/deps-test.R b/clients/R/Tests/deps-test.R new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-test.R @@ -0,0 +1,11 @@ +# autoinstall stuff to test sqlsurvey and dplyr +dd <- capture.output( suppressMessages ( { + (function(lp) { + np <- lp[!(lp %in% installed.packages()[,"Package"])] + repos <- c('http://download.r-forge.r-project.org','http://cran.rstudio.com/') + if(length(np)) install.packages(np,repos=repos, type="source", quiet=T) + update.packages(repos=repos, ask=F, oldPkgs=lp, type="source", quiet=T) + x <- lapply(lp,function(x){library(x,character.only=TRUE,quietly=T)}) + })(c('Rcpp', 'dplyr','survey','sqlsurvey','Lahman','nycflights13')) +})) + diff --git a/clients/R/Tests/deps-test.stable.err b/clients/R/Tests/deps-test.stable.err new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-test.stable.err @@ -0,0 +1,37 @@ +stderr of test 'deps-test` in directory 'clients/R` itself: + + +# 16:19:08 > +# 16:19:08 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=32688" "--set" "mapi_usock=/var/tmp/mtest-78704/.s.monetdb.32688" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_clients_R" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 16:19:08 > + +# builtin opt gdk_dbpath = /Users/hannes/monetdb-install/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 32688 +# cmdline opt mapi_usock = /var/tmp/mtest-78704/.s.monetdb.32688 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /Users/hannes/monetdb-install/var/MonetDB/mTests_clients_R +# cmdline opt mal_listing = 0 +# cmdline opt embedded_r = yes +# cmdline opt gdk_debug = 536870922 + +# 16:19:08 > +# 16:19:08 > "R" "--vanilla" "--slave" "--args" "32688" +# 16:19:08 > + + +# 16:19:09 > +# 16:19:09 > "Done." +# 16:19:09 > + diff --git a/clients/R/Tests/deps-test.stable.out b/clients/R/Tests/deps-test.stable.out new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-test.stable.out @@ -0,0 +1,34 @@ +stdout of test 'deps-test` in directory 'clients/R` itself: + + +# 16:19:08 > +# 16:19:08 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=32688" "--set" "mapi_usock=/var/tmp/mtest-78704/.s.monetdb.32688" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_clients_R" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 16:19:08 > + +# MonetDB 5 server v11.22.0 +# This is an unreleased version +# Serving database 'mTests_clients_R', using 4 threads +# Compiled for x86_64-apple-darwin14.4.0/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 16.000 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://dakar.da.cwi.nl:32688/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-78704/.s.monetdb.32688 +# MonetDB/GIS module loaded +# Start processing logs sql/sql_logs version 52200 +# Finished processing logs sql/sql_logs +# MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. + +# 16:19:08 > +# 16:19:08 > "R" "--vanilla" "--slave" "--args" "32688" +# 16:19:08 > + + +# 16:19:09 > +# 16:19:09 > "Done." +# 16:19:09 > + diff --git a/clients/R/Tests/deps-test.timeout b/clients/R/Tests/deps-test.timeout new file mode 100644 --- /dev/null +++ b/clients/R/Tests/deps-test.timeout @@ -0,0 +1,1 @@ +300 diff --git a/clients/R/Tests/dplyr-flights.reqtest b/clients/R/Tests/dplyr-flights.reqtests rename from clients/R/Tests/dplyr-flights.reqtest rename to clients/R/Tests/dplyr-flights.reqtests --- a/clients/R/Tests/dplyr-flights.reqtest +++ b/clients/R/Tests/dplyr-flights.reqtests @@ -1,3 +1,1 @@ -install -dbi dplyr diff --git a/clients/R/Tests/dplyr.reqtests b/clients/R/Tests/dplyr.reqtests --- a/clients/R/Tests/dplyr.reqtests +++ b/clients/R/Tests/dplyr.reqtests @@ -1,2 +1,2 @@ -install dbi +deps-test diff --git a/clients/R/Tests/install-dependencies.sh b/clients/R/Tests/install-dependencies.sh deleted file mode 100755 --- a/clients/R/Tests/install-dependencies.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -R --vanilla --quiet -e 'dir.create(unlist(strsplit(Sys.getenv("R_LIBS_USER"), .Platform$path.sep))[1L], recursive = TRUE, showWarnings=F)' -R --vanilla --quiet -e "install.packages(c('dplyr','survey','sqlsurvey','DBI','digest','Lahman','nycflights13'),repos=c('http://download.r-forge.r-project.org','http://cran.rstudio.com/'),type='source')" diff --git a/clients/R/Tests/install.R b/clients/R/Tests/install.R new file mode 100644 --- /dev/null +++ b/clients/R/Tests/install.R @@ -0,0 +1,17 @@ +basedir <- Sys.getenv("TSTTRGDIR") +srcdir <- Sys.getenv("TSTSRCDIR") +if (basedir == "" || srcdir == "") { + stop("Need TSTTRGDIR and TSTSRCDIR environment vars") +} + +builddir <- file.path(basedir, "rbuilddir") +installdir <- file.path(basedir, "rlibdir") +dir.create(builddir) +dir.create(installdir) +file.copy(from=file.path(srcdir, "..", "MonetDB.R"), to=builddir, recursive=T) +dd <- capture.output(suppressMessages( { + sink(file=file(tempfile(), open = "wt"), type = "message") + install.packages(file.path(builddir, "MonetDB.R"), repos=NULL, lib=installdir, quiet=T) + sink(type = "message") +})) +library(MonetDB.R,quietly=T,lib.loc=installdir) diff --git a/clients/R/Tests/install.reqtests b/clients/R/Tests/install.reqtests new file mode 100644 --- /dev/null +++ b/clients/R/Tests/install.reqtests @@ -0,0 +1,1 @@ +deps-install diff --git a/clients/R/Tests/install.sh b/clients/R/Tests/install.sh deleted file mode 100755 --- a/clients/R/Tests/install.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# install local version -RLIBDIR=$TSTTRGDIR/rlibdir -mkdir -p $RLIBDIR -out1=$(R CMD INSTALL $TSTSRCDIR/../MonetDB.R -l $RLIBDIR 2>&1) - -# try loading the required packages -out2=$(R --vanilla --quiet -e "library(MonetDB.R,lib.loc=\"$RLIBDIR\"); library(dplyr); library(sqlsurvey)" 2>&1) -RRET=$? - - -if [ $RRET -eq 0 ]; -then - echo "All right, packages installed" -else - echo "Something went wrong" - echo "$out1" - echo - echo "$out2" -fi diff --git a/clients/R/Tests/install.stable.err b/clients/R/Tests/install.stable.err --- a/clients/R/Tests/install.stable.err +++ b/clients/R/Tests/install.stable.err @@ -1,12 +1,37 @@ stderr of test 'install` in directory 'clients/R` itself: _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list