Permalink
Browse files

Adjustments in helper scripts

  • Loading branch information...
1 parent d6cfe46 commit e495d15c5ccea0190b06ed6e799bcbdb52ebca14 @choller2 choller2 committed Aug 21, 2012
Showing with 42 additions and 3 deletions.
  1. +4 −0 ionmonkey.py
  2. +4 −0 langfuzz.py
  3. +11 −2 marked.py
  4. +23 −1 secbugfixed.py
View
@@ -17,6 +17,7 @@
import sys
import os
+import subprocess
from bugzilla.agents import BMOAgent
from bugzilla.utils import get_credentials
@@ -54,3 +55,6 @@
# Print command
print " ".join(cmd)
+
+# Run command
+sys.exit(subprocess.call(cmd))
View
@@ -17,6 +17,7 @@
import sys
import os
+import subprocess
from bugzilla.agents import BMOAgent
from bugzilla.utils import get_credentials
@@ -55,3 +56,6 @@
# Print command
print " ".join(cmd)
+
+# Run command
+sys.exit(subprocess.call(cmd))
View
@@ -17,6 +17,7 @@
import sys
import os
+import subprocess
from bugzilla.agents import BMOAgent
from bugzilla.utils import get_credentials
@@ -40,17 +41,25 @@
# Get the bugs from the api
buglist = bmo.get_bug_list(options)
-print "Found %s bugs" % (len(buglist))
+if len(buglist) == 0:
+ print "No bugs found."
+ sys.exit(0)
+
+print "Found %s bugs:" % (len(buglist))
# Basic arguments
-cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-C", "-G" ]
+cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-p", "-G" ]
# Propagate all extra arguments
cmd.extend(sys.argv[1:])
# Append bug numbers
for bug in buglist:
+ print bug
cmd.append(str(bug.id))
# Print command
print " ".join(cmd)
+
+# Run command
+sys.exit(subprocess.call(cmd))
View
@@ -17,6 +17,7 @@
import sys
import os
+import subprocess
from bugzilla.agents import BMOAgent
from bugzilla.utils import get_credentials
@@ -29,24 +30,41 @@
# Search for all fixed JS engine bugs that have a security impact
options = {
+ # Must be a JS Engine bug which is RESOLVED FIXED
'component': 'JavaScript Engine',
'product': 'Core',
'bug_status': 'RESOLVED',
'resolution': 'FIXED',
+ # Ignore old bugs, should be fixed at most 30 days ago
+ 'chfieldto': 'Now',
+ 'chfieldfrom': '-30d',
+ 'chfield': 'resolution',
+ 'chfieldvalue': 'FIXED',
+ # Advanced search criteria
'query_format': 'advanced',
+ # Should either be a core-security bug
'field0-0-0': 'bug_group',
'type0-0-0': 'substring',
'value0-0-0': 'core-security',
+ # or have an [sg: tag in whiteboard
'type0-0-1': 'regexp',
'field0-0-1': 'status_whiteboard',
'value0-0-1': '\[sg:(critical|high|moderate|low)',
+ # or have a sec- keyword
+ 'type0-0-2': 'regexp',
+ 'field0-0-2': 'keywords',
+ 'value0-0-2': '(sec-critical|sec-high|sec-moderate|sec-low)',
'include_fields': '_default',
}
# Get the bugs from the api
buglist = bmo.get_bug_list(options)
-print "Found %s bugs" % (len(buglist))
+if len(buglist) == 0:
+ print "No bugs found."
+ sys.exit(0)
+
+print "Found %s bugs:" % (len(buglist))
# Basic arguments
cmd = ['python', os.path.join(sys.path[0], 'bugmon.py'), '-r', os.path.join(sys.path[0], 'repos/'), "-V", "-G" ]
@@ -56,7 +74,11 @@
# Append bug numbers
for bug in buglist:
+ print bug
cmd.append(str(bug.id))
# Print command
print " ".join(cmd)
+
+# Run command
+sys.exit(subprocess.call(cmd))

0 comments on commit e495d15

Please sign in to comment.