From 2004cf039e7096a7a5f2f436565b5ee88a074bd5 Mon Sep 17 00:00:00 2001 From: Slobodan Predolac Date: Thu, 28 May 2026 18:02:59 -0700 Subject: [PATCH] Speculative fix for Windows tasks that sometime fail on aligned_alloc --- test/test.sh.in | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/test/test.sh.in b/test/test.sh.in index dc13bc28..8eca840a 100644 --- a/test/test.sh.in +++ b/test/test.sh.in @@ -2,15 +2,30 @@ case @abi@ in macho) - export DYLD_FALLBACK_LIBRARY_PATH="@objroot@lib" + export DYLD_FALLBACK_LIBRARY_PATH="@abs_objroot@lib" ;; pecoff) - export PATH="${PATH}:@objroot@lib" + export PATH="@abs_objroot@lib:${PATH}" ;; *) ;; esac +prepare_test_exec() { + case @abi@ in + pecoff) + test_dir=`dirname "$1"` + for dll in @abs_objroot@lib/*.dll ; do + if [ -f "${dll}" ] ; then + cp -f "${dll}" "${test_dir}/" + fi + done + ;; + *) + ;; + esac +} + # Make a copy of the @JEMALLOC_CPREFIX@MALLOC_CONF passed in to this script, so # it can be repeatedly concatenated with per test settings. export MALLOC_CONF_ALL=${@JEMALLOC_CPREFIX@MALLOC_CONF} @@ -45,10 +60,12 @@ for t in $@; do enable_prof=@enable_prof@ \ disable_large_size_classes=@disable_large_size_classes@ \ . @srcroot@${t}.sh && \ + prepare_test_exec ${t}@exe@ && \ export_malloc_conf && \ $JEMALLOC_TEST_PREFIX ${t}@exe@ @abs_srcroot@ @abs_objroot@ else export MALLOC_CONF= && \ + prepare_test_exec ${t}@exe@ && \ export_malloc_conf && \ $JEMALLOC_TEST_PREFIX ${t}@exe@ @abs_srcroot@ @abs_objroot@ fi