From 7a7e8a7cdd7110f4b6ad06727e9e3290ea8319fb Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 1 Dec 2023 00:05:53 +0100 Subject: [PATCH] Revert "rephrase nixlib test compilation messages" This reverts commit a7eb7d5c9d765d2a5e5f13f07aa42932601b5056. --- r/tools/nixlibs.R | 12 ++++++------ r/tools/test-nixlibs.R | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 2cc7bd53bf00b..161cea3abd823 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -295,7 +295,7 @@ determine_binary_from_stderr <- function(errs) { if (is.null(attr(errs, "status"))) { # There was no error in compiling: so we found libcurl and OpenSSL >= 1.1, # openssl is < 3.0 - lg("Found headers for libcurl and OpenSSL >= 1.1") + lg("Found libcurl and OpenSSL >= 1.1") return("openssl-1.1") # Else, check for dealbreakers: } else if (!on_macos && any(grepl("Using libc++", errs, fixed = TRUE))) { @@ -303,13 +303,13 @@ determine_binary_from_stderr <- function(errs) { lg("Linux binaries incompatible with libc++") return(NULL) } else if (header_not_found("curl/curl", errs)) { - lg("Headers for libcurl not found") + lg("libcurl not found") return(NULL) } else if (header_not_found("openssl/opensslv", errs)) { - lg("Headers for OpenSSL not found") + lg("OpenSSL not found") return(NULL) } else if (any(grepl("OpenSSL version too old", errs))) { - lg("Headers for OpenSSL found but version >= 1.0.2 is required for some features") + lg("OpenSSL found but version >= 1.0.2 is required for some features") return(NULL) # Else, determine which other binary will work } else if (any(grepl("Using OpenSSL version 1.0", errs))) { @@ -317,10 +317,10 @@ determine_binary_from_stderr <- function(errs) { lg("OpenSSL 1.0 is not supported on macOS") return(NULL) } - lg("Found headers for libcurl and OpenSSL < 1.1") + lg("Found libcurl and OpenSSL < 1.1") return("openssl-1.0") } else if (any(grepl("Using OpenSSL version 3", errs))) { - lg("Found headers for libcurl and OpenSSL >= 3.0.0") + lg("Found libcurl and OpenSSL >= 3.0.0") return("openssl-3.0") } NULL diff --git a/r/tools/test-nixlibs.R b/r/tools/test-nixlibs.R index db25153b5f28f..ed5192d806990 100644 --- a/r/tools/test-nixlibs.R +++ b/r/tools/test-nixlibs.R @@ -52,7 +52,7 @@ test_that("determine_binary_from_stderr", { determine_binary_from_stderr(compile_test_program("int a;")), "openssl-1.1" ), - "Found headers for libcurl and OpenSSL >= 1.1" + "Found libcurl and OpenSSL >= 1.1" ) nixlibs_env$on_macos <- FALSE @@ -61,7 +61,7 @@ test_that("determine_binary_from_stderr", { determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 1.0")), "openssl-1.0" ), - "Found headers for libcurl and OpenSSL < 1.1" + "Found libcurl and OpenSSL < 1.1" ) nixlibs_env$on_macos <- TRUE expect_output( @@ -75,7 +75,7 @@ test_that("determine_binary_from_stderr", { determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 3")), "openssl-3.0" ), - "Found headers for libcurl and OpenSSL >= 3.0.0" + "Found libcurl and OpenSSL >= 3.0.0" ) expect_output( expect_null( @@ -92,21 +92,21 @@ test_that("select_binary() with test program", { select_binary("linux", "x86_64", "int a;"), "linux-openssl-1.1" ), - "Found headers for libcurl and OpenSSL >= 1.1" + "Found libcurl and OpenSSL >= 1.1" ) expect_output( expect_identical( select_binary("linux", "x86_64", "#error Using OpenSSL version 1.0"), "linux-openssl-1.0" ), - "Found headers for libcurl and OpenSSL < 1.1" + "Found libcurl and OpenSSL < 1.1" ) expect_output( expect_identical( select_binary("linux", "x86_64", "#error Using OpenSSL version 3"), "linux-openssl-3.0" ), - "Found headers for libcurl and OpenSSL >= 3.0.0" + "Found libcurl and OpenSSL >= 3.0.0" ) nixlibs_env$on_macos <- TRUE expect_output( @@ -114,28 +114,28 @@ test_that("select_binary() with test program", { select_binary("darwin", "x86_64", "int a;"), "darwin-x86_64-openssl-1.1" ), - "Found headers for libcurl and OpenSSL >= 1.1" + "Found libcurl and OpenSSL >= 1.1" ) expect_output( expect_identical( select_binary("darwin", "x86_64", "#error Using OpenSSL version 3"), "darwin-x86_64-openssl-3.0" ), - "Found headers for libcurl and OpenSSL >= 3.0.0" + "Found libcurl and OpenSSL >= 3.0.0" ) expect_output( expect_identical( select_binary("darwin", "arm64", "int a;"), "darwin-arm64-openssl-1.1" ), - "Found headers for libcurl and OpenSSL >= 1.1" + "Found libcurl and OpenSSL >= 1.1" ) expect_output( expect_identical( select_binary("darwin", "arm64", "#error Using OpenSSL version 3"), "darwin-arm64-openssl-3.0" ), - "Found headers for libcurl and OpenSSL >= 3.0.0" + "Found libcurl and OpenSSL >= 3.0.0" ) expect_output( expect_null(