From bffcafbc0d14f6143322faf1b3cf881ed51396b7 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Apr 03 2018 11:48:36 +0000 Subject: skip Jenkinsfile and fixed qcow2 for py3 support --- diff --git a/inventory/standard-inventory-qcow2 b/inventory/standard-inventory-qcow2 index 1879b8e..740c304 100755 --- a/inventory/standard-inventory-qcow2 +++ b/inventory/standard-inventory-qcow2 @@ -105,7 +105,7 @@ def inv_list(subjects): def start_qemu(image, cloudinit, log, portrange=(2222, 5555)): - for port in xrange(*portrange): + for port in range(*portrange): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: @@ -177,7 +177,7 @@ def inv_host(image): proc = None # for failure detection cpe = None # for exception scoping - for _ in xrange(0, 5): + for _ in range(0, 5): try: proc, port = start_qemu(image, cloudinit, log) break @@ -188,7 +188,7 @@ def inv_host(image): raise RuntimeError("Could not launch VM for qcow2 image" " '{0}':{1}".format(image, cpe.output)) - for _ in xrange(0, 30): + for _ in range(0, 30): try: # The variables variables = { diff --git a/tests/python-syntax.sh b/tests/python-syntax.sh index 7d8438c..1134cf6 100755 --- a/tests/python-syntax.sh +++ b/tests/python-syntax.sh @@ -28,6 +28,11 @@ all_files=$(find $source_dir -type f -not -path "*.git*") python_files="" # Check what files are python scripts for my_file in $all_files; do + if [[ ${my_file} =~ .*Jenkinsfile ]]; then + # Skip due BZ#1562135 + continue + fi + file -i ${my_file} | grep -q x-python if [[ $? -eq 0 || ${my_file: -3} == ".py" ]]; then python_files+="${my_file} " @@ -43,7 +48,7 @@ if [[ -z $virt_env_dir ]]; then fi virtualenv-3 ${virt_env_dir} -source ${virt_env_dir}/bin/activate --system-site-packages +source ${virt_env_dir}/bin/activate pip3 install inspektor if [[ $? -ne 0 ]]; then