Permalink
Browse files

[test suite] Bug fix to account for libfko.dylib extension

Richard Haas reported the test suite failing on Mac OS X systems with the
existence check for the libfko library.  Damien Stuart advised that the library
has a different extention '.dylib' on Mac OS X, so this change accounts for the
difference.
  • Loading branch information...
1 parent 86fde0d commit e250776107d09352765b04cc74113c0bfe3a17de @mrash committed Jul 13, 2012
Showing with 12 additions and 6 deletions.
  1. +12 −6 test/test-fwknop.pl
View
@@ -1510,15 +1510,21 @@ ()
return 0 unless $test_hr->{'binary'};
### account for different libfko.so paths (e.g. libfko.so.0.3 with no
- ### libfko.so link on OpenBSD)
+ ### libfko.so link on OpenBSD, and libfko.dylib path on Mac OS X)
if ($test_hr->{'binary'} =~ /libfko/) {
unless (-e $test_hr->{'binary'}) {
- for my $file (glob("$lib_dir/libfko.so*")) {
- if (-e $file and -x $file) {
- $test_hr->{'binary'} = $file;
- $libfko_bin = $file;
- last;
+ my $file = "$lib_dir/libfko.dylib";
+ if (-e $file) {
+ $test_hr->{'binary'} = $file;
+ $libfko_bin = $file;
+ } else {
+ for my $f (glob("$lib_dir/libfko.so*")) {
+ if (-e $f and -x $f) {
+ $test_hr->{'binary'} = $f;
+ $libfko_bin = $f;
+ last;
+ }
}
}
}

0 comments on commit e250776

Please sign in to comment.