Repository: spark
Updated Branches:
  refs/heads/branch-2.0 28c015133 -> 076c2f6a1


[SPARK-22327][SPARKR][TEST][BACKPORT-2.0] check for version warning

## What changes were proposed in this pull request?

backporting to 2.0 (since it's the first branch "older than" 2.1.2)

## How was this patch tested?

manually
Jenkins, AppVeyor

Author: Felix Cheung <[email protected]>

Closes #19550 from felixcheung/rcranversioncheck20.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/076c2f6a
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/076c2f6a
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/076c2f6a

Branch: refs/heads/branch-2.0
Commit: 076c2f6a199974a3e30fe349cfc45f375007f081
Parents: 28c0151
Author: Felix Cheung <[email protected]>
Authored: Mon Oct 30 21:45:49 2017 -0700
Committer: Felix Cheung <[email protected]>
Committed: Mon Oct 30 21:45:49 2017 -0700

----------------------------------------------------------------------
 R/run-tests.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/076c2f6a/R/run-tests.sh
----------------------------------------------------------------------
diff --git a/R/run-tests.sh b/R/run-tests.sh
index 1a1e8ab..c7fbd1a 100755
--- a/R/run-tests.sh
+++ b/R/run-tests.sh
@@ -36,6 +36,7 @@ FAILED=$((PIPESTATUS[0]||$FAILED))
 NUM_CRAN_WARNING="$(grep -c WARNING$ $CRAN_CHECK_LOG_FILE)"
 NUM_CRAN_ERROR="$(grep -c ERROR$ $CRAN_CHECK_LOG_FILE)"
 NUM_CRAN_NOTES="$(grep -c NOTE$ $CRAN_CHECK_LOG_FILE)"
+HAS_PACKAGE_VERSION_WARN="$(grep -c "Insufficient package version" 
$CRAN_CHECK_LOG_FILE)"
 
 if [[ $FAILED != 0 ]]; then
     cat $LOGFILE
@@ -44,9 +45,10 @@ if [[ $FAILED != 0 ]]; then
     echo -en "\033[0m"  # No color
     exit -1
 else
-    # We have 2 existing NOTEs for new maintainer, attach()
-    # We have one more NOTE in Jenkins due to "No repository set"
-    if [[ $NUM_CRAN_WARNING != 0 || $NUM_CRAN_ERROR != 0 || $NUM_CRAN_NOTES 
-gt 3 ]]; then
+    # We have 2 NOTEs for RoxygenNote, attach(); and one in Jenkins only "No 
repository set"
+    # For non-latest version branches, one WARNING for package version
+    if [[ ($NUM_CRAN_WARNING != 0 || $NUM_CRAN_ERROR != 0 || $NUM_CRAN_NOTES 
-gt 3) &&
+          ($HAS_PACKAGE_VERSION_WARN != 1 || $NUM_CRAN_WARNING != 1 || 
$NUM_CRAN_ERROR != 0 || $NUM_CRAN_NOTES -gt 2) ]]; then
       cat $CRAN_CHECK_LOG_FILE
       echo -en "\033[31m"  # Red
       echo "Had CRAN check errors; see logs."


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to