From 9ce5ad47c055c4930ad59e457ef2253ac3ce23de Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sat, 13 Jun 2015 06:31:11 -0700 Subject: [PATCH] [test suite] disable python tests if Python.h is missing --- test/test-fwknop.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test-fwknop.pl b/test/test-fwknop.pl index b6eb3ceb..f6ea257e 100755 --- a/test/test-fwknop.pl +++ b/test/test-fwknop.pl @@ -2615,6 +2615,15 @@ sub python_fko_compile_install() { &run_cmd("$python_path setup.py install --prefix=../test/$python_fko_dir", $cmd_out_tmp, "../test/$curr_test_file"); + if (&file_find_regex( + [qr/fatal\serror.*Python\.h/], + $MATCH_ALL, $APPEND_RESULTS, "../test/$curr_test_file")) { + ### python-devel is missing, disable all python tests + push @tests_to_exclude, qr/python/; + $rv = 0; + } + + chdir $curr_pwd or die $!; return $rv;