From 43f1cac9668760ca762f6828d35e1d9e401d2215 Mon Sep 17 00:00:00 2001
From: Mick Jordan <mick.jordan@oracle.com>
Date: Fri, 6 May 2016 18:38:12 -0700
Subject: [PATCH] pkgtest: fix for count.daily; revert ci.hocon

---
 ci.hocon                                      | 36 -------------------
 .../r/install.cran.packages.R                 |  2 +-
 2 files changed, 1 insertion(+), 37 deletions(-)

diff --git a/ci.hocon b/ci.hocon
index bc83226e04..bb288b35ea 100644
--- a/ci.hocon
+++ b/ci.hocon
@@ -51,44 +51,8 @@ gateStyle : ${common} {
 
 # currently disabled gate commands: FindBugs,Checkheaders,Distribution Overlap Check,BuildJavaWithEcj
 
-# tests a (default) number of packages known to install correctly
-pkgtest: ${common} ${java8Downloads} {
-  timelimit : "3:00:00"
-  setup : [
-    ["git", "clone", "--depth", "1", ${repoBase}"gnur.git",  "../gnur"]
-  ]
-  run : [
-    ["mx", "-v", "--dynamicimport", "gnur", "build", "--serial"]
-    ["mx", "--dynamicimport", "gnur", "pkgtest", "--print-ok-installs", "--ok-only"]
-  ]
-}
-
-# tests a (default) number of packages known to install correctly
-pkgtestDaily: ${common} ${java8Downloads} {
-  timelimit : "3:00:00"
-  setup : [
-    ["git", "clone", "--depth", "1", ${repoBase}"gnur.git",  "../gnur"]
-  ]
-  run : [
-    ["mx", "-v", "--dynamicimport", "gnur", "build", "--serial"]
-    ["mx", "--dynamicimport", "gnur", "pkgtest", "--print-ok-installs", "--count-daily", "100"]
-  ]
-}
-
-# tries to install a (default) number of packages previously known not to install
-pkginstall: ${common} ${java8Downloads} {
-  timelimit : "6:00:00"
-  run : [
-    ["mx", "build"]
-    ["mx", "pkgtest", "--invert-pkgset", "--ok-only", "--install-only", "--print-ok-installs", "--install-dependents-first", "--pkg-count", "1000"]
-  ]
-}
-
 builds = [
   ${gateTest}       {capabilities : [linux, amd64, gate, post-merge],   name: "gate-test-linux-amd64"}
   ${gateStyle}      {capabilities : [linux, amd64, gate, post-merge],   name: "gate-style-linux-amd64"}
 #  ${gateTest}       {capabilities : [linux, sparcv9, gate, post-merge], name: "gate-test-linux-sparcv9"}
-#  ${pkgtest}        {capabilities : [linux, amd64, gate], name: "pkgtest-linux-amd64"}
-  ${pkgtestDaily}        {capabilities : [linux, amd64, gate], name: "pkgtest-daily-linux-amd64"}
-#  ${pkginstall}        {capabilities : [linux, amd64, gate], name: "pkginstall-linux-amd64"}
 ]
diff --git a/com.oracle.truffle.r.test.cran/r/install.cran.packages.R b/com.oracle.truffle.r.test.cran/r/install.cran.packages.R
index 1748c9f267..70c0ee7918 100644
--- a/com.oracle.truffle.r.test.cran/r/install.cran.packages.R
+++ b/com.oracle.truffle.r.test.cran/r/install.cran.packages.R
@@ -499,7 +499,7 @@ do.it <- function() {
 			yday <- as.POSIXlt(Sys.Date())$yday
 			chunk <- as.integer(npkgs / count.daily)
 			start <- (yday %% chunk) * count.daily
-			end <- ifelse(start + count.daily > npkgs, npkgs, start + count.daily)
+			end <- ifelse(start + count.daily > npkgs, npkgs, start + count.daily - 1)
 			test.pkgnames <- test.pkgnames[start:end]
 		}
 	}
-- 
GitLab