Backport patch to fix tests without network.
This commit is contained in:
parent
9ab6ff5725
commit
dab23284dd
44
4e3715af514b0187bd47d87e8fd99e17ad1d341c.patch
Normal file
44
4e3715af514b0187bd47d87e8fd99e17ad1d341c.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 4e3715af514b0187bd47d87e8fd99e17ad1d341c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= <csardi.gabor@gmail.com>
|
||||
Date: Tue, 11 Feb 2020 11:47:46 +0000
|
||||
Subject: [PATCH] Skip curl fd poll test if offline
|
||||
|
||||
Closes #226.
|
||||
---
|
||||
tests/testthat/test-poll-curl.R | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/testthat/test-poll-curl.R b/tests/testthat/test-poll-curl.R
|
||||
index f0be69c..dff055e 100644
|
||||
--- a/tests/testthat/test-poll-curl.R
|
||||
+++ b/tests/testthat/test-poll-curl.R
|
||||
@@ -2,10 +2,12 @@
|
||||
context("poll-curl")
|
||||
|
||||
## To resolve....
|
||||
-httpbin()
|
||||
+online <- curl::has_internet()
|
||||
+if (online) httpbin()
|
||||
|
||||
test_that("curl fds", {
|
||||
skip_on_cran()
|
||||
+ if (!online) skip("Offline")
|
||||
|
||||
resp <- list()
|
||||
errm <- character()
|
||||
@@ -55,6 +57,7 @@ test_that("curl fds", {
|
||||
|
||||
test_that("curl fds before others", {
|
||||
skip_on_cran()
|
||||
+ if (!online) skip("Offline")
|
||||
|
||||
pool <- curl::new_pool()
|
||||
url <- httpbin("/delay/1")
|
||||
@@ -86,6 +89,7 @@ test_that("curl fds before others", {
|
||||
|
||||
test_that("process fd before curl fd", {
|
||||
skip_on_cran()
|
||||
+ if (!online) skip("Offline")
|
||||
|
||||
pool <- curl::new_pool()
|
||||
url <- httpbin("/delay/1")
|
@ -10,6 +10,8 @@ Summary: Execute and Control System Processes
|
||||
License: MIT
|
||||
URL: https://CRAN.R-project.org/package=%{packname}
|
||||
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz
|
||||
# Fix curl test with no network.
|
||||
Patch0001: https://github.com/r-lib/processx/commit/4e3715af514b0187bd47d87e8fd99e17ad1d341c.patch
|
||||
|
||||
# Here's the R view of the dependencies world:
|
||||
# Depends:
|
||||
@ -44,8 +46,12 @@ with a timeout. It can also poll several processes at once.
|
||||
%prep
|
||||
%setup -q -c -n %{packname}
|
||||
|
||||
pushd %{packname}
|
||||
%patch0001 -p1
|
||||
|
||||
# Don't need coverage; it's not packaged either.
|
||||
sed -i 's/covr, //g' %{packname}/DESCRIPTION
|
||||
sed -i 's/covr, //g' DESCRIPTION
|
||||
popd
|
||||
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user