Skip to content

Instantly share code, notes, and snippets.

@elyezer
Created April 22, 2015 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elyezer/fd5210c7452d5478b89b to your computer and use it in GitHub Desktop.
Save elyezer/fd5210c7452d5478b89b to your computer and use it in GitHub Desktop.
import re
import subprocess
from robottelo.common.helpers import bz_bug_is_open
OUTPUT_REGEX = re.compile(r'.*:\s+@.*, (\d+)\)')
skip_count = 0
output = subprocess.check_output([
'git', 'grep', '@skip_if_bug_open([\\"\']bugzilla[\'\\"]'
])
for line in output.split('\n'):
match = OUTPUT_REGEX.search(line)
if match is not None:
bug_id = int(match.group(1))
if bz_bug_is_open(bug_id):
skip_count += 1
print skip_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment