Permalink
Browse files

[test suite] minor 're-run make' bug fix for perl FKO module installa…

…tion
  • Loading branch information...
1 parent 5f598bb commit 59fe04787b81d49aacde5ced63c55b42bd40b2c0 @mrash committed Dec 9, 2012
Showing with 14 additions and 6 deletions.
  1. +14 −6 test/test-fwknop.pl
View
@@ -2863,15 +2863,23 @@ ()
chdir '../perl/FKO' or die $!;
- &run_cmd("make clean", $cmd_out_tmp,
- "../../test/$curr_test_file");
+ &run_cmd("make clean", $cmd_out_tmp, "../../test/$curr_test_file")
+ if -e 'Makefile' or -e 'Makefile.old';
+
&run_cmd("perl Makefile.PL PREFIX=../../test/$perl_mod_fko_dir " .
"LIB=../../test/$perl_mod_fko_dir", $cmd_out_tmp,
"../../test/$curr_test_file");
- &run_cmd('make', $cmd_out_tmp,
- "../../test/$curr_test_file");
- &run_cmd('make install', $cmd_out_tmp,
- "../../test/$curr_test_file");
+
+ &run_cmd('make', $cmd_out_tmp, "../../test/$curr_test_file");
+
+ if (&file_find_regex([qr/rerun\sthe\smake\scommand/],
+ $MATCH_ALL, "../../test/$curr_test_file")) {
+ &run_cmd('touch Makefile.PL', $cmd_out_tmp, "../../test/$curr_test_file");
+ &run_cmd('touch Makefile', $cmd_out_tmp, "../../test/$curr_test_file");
+ &run_cmd('make', $cmd_out_tmp, "../../test/$curr_test_file");
+ }
+
+ &run_cmd('make install', $cmd_out_tmp, "../../test/$curr_test_file");
chdir $curr_pwd or die $!;

0 comments on commit 59fe047

Please sign in to comment.