diff --git a/tests/scripts/run-test-suites.pl b/tests/scripts/run-test-suites.pl index e0ee3f515c..408deaf13b 100755 --- a/tests/scripts/run-test-suites.pl +++ b/tests/scripts/run-test-suites.pl @@ -59,8 +59,15 @@ my $skip_re = ')(\z|\.)' ); # in case test suites are linked dynamically -$ENV{'LD_LIBRARY_PATH'} = '../library'; -$ENV{'DYLD_LIBRARY_PATH'} = '../library'; +if (-d '../../tf-psa-crypto') { + $ENV{'LD_LIBRARY_PATH'} = '../../library'; + $ENV{'DYLD_LIBRARY_PATH'} = '../../library'; +} +else +{ + $ENV{'LD_LIBRARY_PATH'} = '../library'; + $ENV{'DYLD_LIBRARY_PATH'} = '../library'; +} my $prefix = $^O eq "MSWin32" ? '' : './';