I am trying to install R on CentOS (either 7 or 8, behavior is the same) in an environment behind a firewall and while I am able to run: R CMD make check I am unable to run: R CMD make check-devel These latter tests fail. The failure occurs in the internet access if() conditional statement in these two tests: https://svn.r-project.org/R/trunk/tests/internet.R https://svn.r-project.org/R/trunk/tests/internet2.R In my environment, nsl("cran.r-project.org") returns a valid, non-null value but subsequent commands in those test files do not successfully access the internet. I'd like to be able to run the full test suite given I am building from source. I'm wondering if it's possible to make these conditionals more strict so that the conditional tests internet access in a manner more similar to how internet access is used in the tests. Would this be possible? Or, make tests that require internet access into a distinct `check-internet` or similar? As an additional reference, the same conditional statement appears to also be used in these other tests: https://svn.r-project.org/R/trunk/tests/CRANtools.R https://svn.r-project.org/R/trunk/tests/libcurl.R Thanks, -Thomas Thomas J. Leeper
One way would be to comment out these tests, or really turn off the internet, and then these tests don't run. Indeed, a successful DNS query does not mean that you can connect to the internet in general. FWIW pingr::is_online [1] implements a method that works well. Apple's Captive Portal test page is the best method to determine if you are online, in my experience. [1] https://github.com/cran/pingr/blob/4594ce0cd40b6ba69f1bcc2379e0038c38dd710f/R/ping-package.r#L135 Gabor On Mon, Oct 5, 2020 at 5:49 PM Thomas J. Leeper <thosjleeper at gmail.com> wrote:> > I am trying to install R on CentOS (either 7 or 8, behavior is the > same) in an environment behind a firewall and while I am able to run: > > R CMD make check > > I am unable to run: > > R CMD make check-devel > > These latter tests fail. The failure occurs in the internet access > if() conditional statement in these two tests: > > https://svn.r-project.org/R/trunk/tests/internet.R > https://svn.r-project.org/R/trunk/tests/internet2.R > > In my environment, nsl("cran.r-project.org") returns a valid, non-null > value but subsequent commands in those test files do not successfully > access the internet. > > I'd like to be able to run the full test suite given I am building > from source. I'm wondering if it's possible to make these conditionals > more strict so that the conditional tests internet access in a manner > more similar to how internet access is used in the tests. Would this > be possible? Or, make tests that require internet access into a > distinct `check-internet` or similar? > > As an additional reference, the same conditional statement appears to > also be used in these other tests: > > https://svn.r-project.org/R/trunk/tests/CRANtools.R > https://svn.r-project.org/R/trunk/tests/libcurl.R > > Thanks, > -Thomas > > Thomas J. Leeper > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Thomas, In my experience, as pointed out also by Gabor, its often part of the devops build process to remove/comment out these tests or otherwise modify them so that they will pass (if they SHOULD pass) in your environment. That said, a quick look at the Makefile does suggest that failing on the internet tests should be "allowed" and not cause the whole process to return a non-zero value. I don't have time right this second to test this though. Is that not the behavior you're seeing in practice? Or do the tests hang so the process never completes, or...? Best, ~G On Mon, Oct 5, 2020 at 9:49 AM Thomas J. Leeper <thosjleeper at gmail.com> wrote:> I am trying to install R on CentOS (either 7 or 8, behavior is the > same) in an environment behind a firewall and while I am able to run: > > R CMD make check > > I am unable to run: > > R CMD make check-devel > > These latter tests fail. The failure occurs in the internet access > if() conditional statement in these two tests: > > https://svn.r-project.org/R/trunk/tests/internet.R > https://svn.r-project.org/R/trunk/tests/internet2.R > > In my environment, nsl("cran.r-project.org") returns a valid, non-null > value but subsequent commands in those test files do not successfully > access the internet. > > I'd like to be able to run the full test suite given I am building > from source. I'm wondering if it's possible to make these conditionals > more strict so that the conditional tests internet access in a manner > more similar to how internet access is used in the tests. Would this > be possible? Or, make tests that require internet access into a > distinct `check-internet` or similar? > > As an additional reference, the same conditional statement appears to > also be used in these other tests: > > https://svn.r-project.org/R/trunk/tests/CRANtools.R > https://svn.r-project.org/R/trunk/tests/libcurl.R > > Thanks, > -Thomas > > Thomas J. Leeper > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
Thanks, Gabe and Gabor. In my case it causes a non-zero status and fails the check-devel step. I?ll definitely fall back to modifying the code but it doesn?t seem like this is exactly the intended behavior of the tests. -Thomas El El lun, 5 oct 2020 a las 19:42, Gabriel Becker <gabembecker at gmail.com> escribi?:> Thomas, > > In my experience, as pointed out also by Gabor, its often part of the > devops build process to remove/comment out these tests or otherwise modify > them so that they will pass (if they SHOULD pass) in your environment. > > That said, a quick look at the Makefile does suggest that failing on the > internet tests should be "allowed" and not cause the whole process to > return a non-zero value. > > I don't have time right this second to test this though. Is that not the > behavior you're seeing in practice? Or do the tests hang so the process > never completes, or...? > > Best, > ~G > > On Mon, Oct 5, 2020 at 9:49 AM Thomas J. Leeper <thosjleeper at gmail.com> > wrote: > >> I am trying to install R on CentOS (either 7 or 8, behavior is the >> same) in an environment behind a firewall and while I am able to run: >> >> R CMD make check >> >> I am unable to run: >> >> R CMD make check-devel >> >> These latter tests fail. The failure occurs in the internet access >> if() conditional statement in these two tests: >> >> https://svn.r-project.org/R/trunk/tests/internet.R >> https://svn.r-project.org/R/trunk/tests/internet2.R >> >> In my environment, nsl("cran.r-project.org") returns a valid, non-null >> value but subsequent commands in those test files do not successfully >> access the internet. >> >> I'd like to be able to run the full test suite given I am building >> from source. I'm wondering if it's possible to make these conditionals >> more strict so that the conditional tests internet access in a manner >> more similar to how internet access is used in the tests. Would this >> be possible? Or, make tests that require internet access into a >> distinct `check-internet` or similar? >> >> As an additional reference, the same conditional statement appears to >> also be used in these other tests: >> >> https://svn.r-project.org/R/trunk/tests/CRANtools.R >> https://svn.r-project.org/R/trunk/tests/libcurl.R >> >> Thanks, >> -Thomas >> >> Thomas J. Leeper >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > --Thomas J. Leeper http://www.thomasleeper.com [[alternative HTML version deleted]]