From b93cb1657a55caa7d2c1c4e7c83025954dcdae87 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 4 Nov 2016 15:26:57 +0100 Subject: [PATCH] Correct internal tests sources The sources for internal tests were sometimes badly formed, assuming perl variables such as $target{cpuid_asm_src} contains only one file name. This change correctly massages all file names in such a variable. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1850) --- test/build.info | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/test/build.info b/test/build.info index 46403ea08b..719ae44920 100644 --- a/test/build.info +++ b/test/build.info @@ -1,3 +1,11 @@ +{- + use File::Spec::Functions; + sub rebase_files + { + my ($base, $files) = @_; + return join(" ", map { "$base/$_" } split(/\s+/, $files)); + } +-} IF[{- !$disabled{tests} -}] PROGRAMS_NO_INST=\ aborttest \ @@ -325,8 +333,8 @@ IF[{- !$disabled{tests} -}] SOURCE[poly1305_internal_test]=poly1305_internal_test.c testutil.c IF[{- !$disabled{shared} -}] SOURCE[poly1305_internal_test]= ../crypto/poly1305/poly1305.c \ - {- $target{poly1305_asm_src} ? "../crypto/poly1305/".$target{poly1305_asm_src} : "" -} \ - {- $target{cpuid_asm_src} ? "../crypto/".$target{cpuid_asm_src} : "" -} \ + {- rebase_files("../crypto/poly1305", $target{poly1305_asm_src}) -} \ + {- rebase_files("../crypto", $target{cpuid_asm_src}) -} \ ../crypto/cryptlib.c ENDIF INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include @@ -345,9 +353,8 @@ IF[{- !$disabled{tests} -}] SOURCE[modes_internal_test]=modes_internal_test.c testutil.c IF[{- !$disabled{shared} -}] - SOURCE[modes_internal_test]= {- $target{cpuid_asm_src} - ? "../crypto/".$target{cpuid_asm_src} - : "" -} \ + SOURCE[modes_internal_test]= \ + {- rebase_files("../crypto", $target{cpuid_asm_src}); -} \ ../crypto/cryptlib.c ENDIF INCLUDE[modes_internal_test]=.. ../include -- 2.25.1