From d96e294bf8c4c8373a09765931987d759380a789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Wed, 27 Oct 2021 14:00:04 +0200 Subject: [PATCH] Only check OPENSSL_BUILT_ON if it is not empty Some distributions (e.g. openSUSE) patch out OPENSSL_BUILT_ON to be empty as this breaks reproducibility of the build. With this commit, we only check that this value starts with "built on" if it is not empty, thereby not loosing any test coverage. --- openssl/src/version.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openssl/src/version.rs b/openssl/src/version.rs index 7e3ee288c..20bad516b 100644 --- a/openssl/src/version.rs +++ b/openssl/src/version.rs @@ -127,6 +127,9 @@ fn test_versions() { assert!(number() > 0); assert!(version().starts_with(expected_name())); assert!(c_flags().starts_with("compiler:")); - assert!(built_on().starts_with("built on:")); + // some distributions patch out dates out of openssl so that the builds are reproducible + if !built_on().is_empty() { + assert!(built_on().starts_with("built on:")); + } assert!(dir().starts_with("OPENSSLDIR:")); } -- GitLab