diff mbox

[ovs-dev] tests: Skip vlog close and set if no python is installed

Message ID 1464959211-15684-1-git-send-email-pboca@cloudbasesolutions.com
State Changes Requested
Headers show

Commit Message

Paul Boca June 3, 2016, 1:06 p.m. UTC
AT_CAPTURE_FILE([log.old]) and AT_CAPTURE_FILE([log]) will fail in case no python
is installed on the system

Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
---
 tests/vlog.at | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ben Pfaff June 7, 2016, 4:16 a.m. UTC | #1
On Fri, Jun 03, 2016 at 01:06:51PM +0000, Paul Boca wrote:
> AT_CAPTURE_FILE([log.old]) and AT_CAPTURE_FILE([log]) will fail in case no python
> is installed on the system
> 
> Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>

I don't understand this.  AT_CAPTURE_FILE doesn't rely on Python.  Also,
AT_CAPTURE_FILE only has a visible effect when a test fails.

The documentation for AT_CAPTURE_FILE says:

 -- Macro: AT_CAPTURE_FILE (FILE)
     If the current test group fails, log the contents of FILE.  Several
     identical calls within one test group have no additional effect.

Maybe you see some other problem?

Thanks,

Ben.
diff mbox

Patch

diff --git a/tests/vlog.at b/tests/vlog.at
index b793611..c66c84a 100644
--- a/tests/vlog.at
+++ b/tests/vlog.at
@@ -273,6 +273,8 @@  VLOG_CANT_REOPEN_PYN([Python2], [$HAVE_PYTHON], [$PYTHON])
 VLOG_CANT_REOPEN_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
 
 AT_SETUP([vlog - vlog/close - C])
+AT_SKIP_IF([test $HAVE_PYTHON = no])
+AT_SKIP_IF([test $HAVE_PYTHON3 = no])
 on_exit 'kill `cat test-unixctl.pid`'
 
 AT_CAPTURE_FILE([log])
@@ -351,6 +353,8 @@  VLOG_CLOSE_PYN([Python2], [$HAVE_PYTHON], [$PYTHON])
 VLOG_CLOSE_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
 
 AT_SETUP([vlog - vlog/set and vlog/list - C])
+AT_SKIP_IF([test $HAVE_PYTHON = no])
+AT_SKIP_IF([test $HAVE_PYTHON3 = no])
 on_exit 'kill `cat test-unixctl.pid`'
 
 AT_CAPTURE_FILE([log])