rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
parameters.report_type_phrase = "report_type IN ('%s', '%s', '%s')" % (adu_codes.CRASH_BROWSER, adu_codes.HANGS_NORMALIZED, adu_codes.OOP_PLUGIN) | parameters.report_type_phrase = "report_type IN ('%s', '%s')" % (adu_codes.CRASH_BROWSER, adu_codes.HANGS_NORMALIZED) | def fetchCrashHistory (self, parameters): if parameters.listOfOs_names and parameters.listOfOs_names != ['']: localOsList = [x[0:3] for x in parameters.listOfOs_names] osNameListPhrase = (','.join("'%s'" % x for x in localOsList)) parameters.os_phrase = "os_short_name in (%s)" % osNameListPhrase else: parameters.os_phr... |
tu = dcm.createDefaultExecUpdater(os.path.join(testDir,'dynamicTestConfig.py')) | tu = dcm.createDefaultExecUpdater(os.path.join(testDir,'dynamicTestconfig.py')) | def testDefaultExecUpdater(self): testDir = os.path.dirname(__file__) tu = dcm.createDefaultExecUpdater(os.path.join(testDir,'dynamicTestConfig.py')) assert 'testOption0' not in self.config assert 'testOption1' not in self.config assert 'logFilePathname' in self.config priorLogPath = self.config['logFilePathname'] c2 =... |
fakeReportData = [ (( "uuid1", None, dt.datetime(2009, 05, 04), "bogus", "1.0", "xxx", '', "http://cnn.com", 100, 14, 10, None, None, None, "bogus", "", "", ",", None, None, None... | fakeReportData = [ (( "uuid1", None, dt.datetime(2009, 05, 04), "bogus", "1.0", "xxx", '', "http://cnn.com", 100, 14, 10, None, None, None, None, None, None, None, None, None, "bogus", "", "", ",... | def makeBogusReports (connection, cursor, logger): # make some bogus data in the reports table reportsTable = sch.ReportsTable(logger) reportsTable.createPartitions(me.cur, sch.mondayPairsIteratorFactory(dt.datetime(2009,05,04),dt.datetime(2009,05,04))) # ( uuid, client_crash_date, date_processed, prod... |
try: altconn = me.database.connection() altcur = altconn.cursor() except Exception, x: print "Exception at line 40:",type(x),x raise | altconn = me.database.connection() altcur = altconn.cursor() | def makeBogusReports (connection, cursor, logger): # make some bogus data in the reports table reportsTable = sch.ReportsTable(logger) reportsTable.createPartitions(me.cur, sch.mondayPairsIteratorFactory(dt.datetime(2009,05,04),dt.datetime(2009,05,04))) # ( uuid, client_crash_date, date_processed, prod... |
try: reportsTable.insert(cursor, rep, cursorFunction, date_processed=rep[2]) connection.commit() cursor.execute("update reports set signature=%s where date_processed = %s and uuid = %s", (sig, rep[2], rep[0])) connection.commit() except Exception, x: print "Exception at line 51", type(x),x connection.rollback() | reportsTable.insert(cursor, rep, cursorFunction, date_processed=rep[2]) connection.commit() cursor.execute("update reports set signature=%s where date_processed = %s and uuid = %s", (sig, rep[2], rep[0])) connection.commit() | def cursorFunction(): return altconn, altcur |
try: me.conn = me.database.connection() me.cur = me.conn.cursor() except Exception, x: print "Exception at line 107",type(x),x socorro.lib.util.reportExceptionAndAbort(me.fileLogger) | me.conn = me.database.connection() me.cur = me.conn.cursor() | def setup_module(): global me if me: return me = Me() me.config = configurationManager.newConfiguration(configurationModule = testConfig, applicationName='Testing bugzilla') tutil.nosePrintModule(__file__) myDir = os.path.split(__file__)[0] if not myDir: myDir = '.' replDict = {'testDir':'%s'%myDir} for i in me.config:... |
jsonContents = sourceStorage.get_meta(ooid) | try: jsonContents = sourceStorage.get_meta(ooid) except ValueError: logger.warning('the json for %s is degenerate and cannot be loaded' \ ' - saving empty json', ooid) jsonContents = {} | def doSubmission(ooidTuple): logger.debug('received: %s', str(ooidTuple)) try: sourceStorage = crashStoragePoolForSource.crashStorage() destStorage = crashStoragePoolForDest.crashStorage() ooid = ooidTuple[0] jsonContents = sourceStorage.get_meta(ooid) dumpContents = sourceStorage.get_raw_dump(ooid) logger.debug('pushi... |
CREATE INDEX top_crashes_by_signature_productdims_key ON top_crashes_by_signature (productdims_id); | CREATE INDEX top_crashes_by_signature_productdims_window_end_idx ON top_crashes_by_signature (productdims_id, window_end DESC); | def __init__(self, logger, **kwargs): super(TopCrashesBySignatureTable, self).__init__(name='top_crashes_by_signature', logger=logger, creationSql= """ CREATE TABLE top_crashes_by_signature ( id serial NOT NULL PRIMARY KEY, count integer NOT NULL DEFAULT 0, uptime real DEFAULT 0.0, signature TEXT, productdims_id intege... |
CREATE INDEX top_crashes_by_signature_window_end_idx on top_crashes_by_signature (window_end desc); | def __init__(self, logger, **kwargs): super(TopCrashesBySignatureTable, self).__init__(name='top_crashes_by_signature', logger=logger, creationSql= """ CREATE TABLE top_crashes_by_signature ( id serial NOT NULL PRIMARY KEY, count integer NOT NULL DEFAULT 0, uptime real DEFAULT 0.0, signature TEXT, productdims_id intege... | |
CONSTRAINT day_product_os_report_type_unique UNIQUE (adu_day, productdims_id, os_short_name, report_type); | CONSTRAINT day_product_os_report_type_unique UNIQUE (adu_day, productdims_id, os_short_name, report_type)); | def __init__ (self, logger, **kwargs): super(DailyCrashesTable, self).__init__(name = "daily_crashes", logger=logger, creationSql = """ CREATE TABLE daily_crashes ( id serial NOT NULL PRIMARY KEY, count INTEGER DEFAULT 0 NOT NULL, report_type CHAR(1) NOT NULL DEFAULT 'C', productdims_id INTEGER REFERENCES productdims(i... |
logger.debug('%s %s', row.version, row.build) | def tallyPVpairs(self, rows, columns, startDateAsCompactString, previousDateAsCompactString, summaryCrashes, idCache): """ This function iterates through the results of the database query in the extractDataForPeriod function. Each row represents a single crash. """ for r in rows: row = lib_util.DotDict((key, value) for... | |
x[0][:100], x[1]), | addonName, addonVersion), | def insertAddons(self, crash_json, reportId): threadLocalDbConnection = self.databasePool.connection() cursor = threadLocalDbConnection.cursor() date_processed = crash_json['date_processed'] for i, x in enumerate(crash_json['addons']): self.extensionsTable.insert(cursor, (reportId, date_processed, i, x[0][:100], # limi... |
cursor = threadLocalDbConnection.cursor() | def insertReport(self, crash_json): threadLocalDbConnection = self.databasePool.connection() cursor = threadLocalDbConnection.cursor() rowTuple = tuple((crash_json[x] for x in self.reportsTable.columns)) # TODO: debug - remove this #items = dict(zip(self.reportsTable.columns, rowTuple)) #for key, value in items.iterite... | |
logger.debug('insert for %s', crash_json['uuid']) | logger.debug('insert for %s', ooid) | def insertReport(self, crash_json): threadLocalDbConnection = self.databasePool.connection() cursor = threadLocalDbConnection.cursor() rowTuple = tuple((crash_json[x] for x in self.reportsTable.columns)) # TODO: debug - remove this #items = dict(zip(self.reportsTable.columns, rowTuple)) #for key, value in items.iterite... |
self.reportsTable.insert(cursor, rowTuple, self.databasePool.connectionCursorPair, date_processed=date_processed) | try: cursor = threadLocalDbConnection.cursor() self.reportsTable.insert(cursor, rowTuple, self.databasePool.connectionCursorPair, date_processed=date_processed) except sdb.databaseModule.IntegrityError: logger.info('%s - already in the database, replacing', ooid) threadLocalDbConnection.rollback() r = sdb.execute(threa... | def insertReport(self, crash_json): threadLocalDbConnection = self.databasePool.connection() cursor = threadLocalDbConnection.cursor() rowTuple = tuple((crash_json[x] for x in self.reportsTable.columns)) # TODO: debug - remove this #items = dict(zip(self.reportsTable.columns, rowTuple)) #for key, value in items.iterite... |
except sdb.databaseModule.IntegrityError: logger.info('skipping %s - already in the database', ooid) | def databaseInsert (self, crash_json_tuple): threadLocalDbConnection = self.databasePool.connection() crash_json = crash_json_tuple[0] ooid = crash_json['uuid'] crashStorage = self.crashStoragePool.crashStorage() raw_crash = crashStorage.get_meta(ooid) crash_json['url'] = raw_crash.setdefault('URL', '') crash_json['ema... | |
"Expected long for %s, actual type is %s" % (param, type(databaseParameters[param])) | "Expected %s for %s, actual type is %s" % (assertPairs[param], param, type(databaseParameters[param])) | def getListOfTopCrashersBySignature(aCursor, databaseParameters, totalNumberOfCrashesForPeriodFunc=totalNumberOfCrashesForPeriod): """ """ databaseParameters["totalNumberOfCrashes"] = totalNumberOfCrashesForPeriodFunc(aCursor, databaseParameters) if databaseParameters["totalNumberOfCrashes"] == None: return [] assert... |
dumpAnalysisAsString = (''.join(dumpAnalysisLineIterator.cache)) | dumpAnalysisAsString = ('\n'.join(dumpAnalysisLineIterator.cache)) | def doBreakpadStackDumpAnalysis (self, reportId, uuid, dumpfilePathname, databaseCursor, date_processed, processorErrorMessages): """ This function overrides the base class version of this function. This function coordinates the six steps of running the breakpad_stackdump process and analyzing the textual output for i... |
result = adu.get('Firefox', '3.5.5', 'Windows', '2009-12-15', '2009-12-31') | result = adu.get('Firefox', '3.5.5', '', 'Windows', '2009-12-15', '2009-12-31') | def aduByDay(self, parameters): return parameters |
result = adu.get('Firefox', '3.5.5;3.5.4', 'Windows;Linux', '2009-12-15', '2009-12-31') | result = adu.get('Firefox', '3.5.5;3.5.4', '', 'Windows;Linux', '2009-12-15', '2009-12-31') | def aduByDay(self, parameters): return parameters |
case when product_os_platform = 'Mac OS/X' then 'Mac' else product_os_platform end as product_os_platform, | substring(product_os_platform, 1, 3) as product_os_platform, | def testAduByDay_fetchAduHistory1(): parameters = util.DotDict({ 'start_date': dt.datetime(2009, 12, 1), 'end_date': dt.datetime(2009, 12, 15), 'product': 'Firefox', 'version': '3.5.5', 'listOfOs_names': ['Windows', 'Mac'], }) sql = """ select date, case when product_os_platform = 'Mac OS/X' then 'Mac' else product_os_... |
case when product_os_platform = 'Mac OS/X' then 'Mac' else product_os_platform end as product_os_platform, | substring(product_os_platform, 1, 3) as product_os_platform, | def testAduByDay_fetchAduHistory2(): parameters = util.DotDict({ 'start_date': dt.datetime(2009, 12, 1), 'end_date': dt.datetime(2009, 12, 15), 'product': 'Firefox', 'version': '3.5.5', 'listOfOs_names': [''], }) # the odd literal \n in the string below is to prevent the Wing Python IDE from eliminating # trailing whit... |
select CAST(ceil(EXTRACT(EPOCH FROM (window_end - timestamp without time zone %(start_date)s - interval %(socorroTimeToUTCInterval)s)) / 86400) AS INT) * interval '24 hours' + timestamp without time zone %(start_date)s as day, case when os.os_name = 'Windows NT' then 'Windows' when os.os_name = 'Mac OS X' then 'Mac' el... | SELECT adu_day, os_short_name, SUM(count) FROM daily_crashes WHERE timestamp without time zone %(start_date)s < adu_day AND adu_day <= timestamp without time zone %(end_date)s AND productdims_id = %(productdims_id)s AND os_short_name in ('Win','Mac') AND report_type IN ('C', 'H') GROUP BY adu_day, os_short_name | def testAduByDay_fetchCrashHistory(): parameters = util.DotDict({ 'start_date': dt.datetime(2009, 12, 1), 'end_date': dt.datetime(2009, 12, 15), 'product': 'Firefox', 'version': '3.5.5', 'listOfOs_names': ['Windows', 'Mac'], 'socorroTimeToUTCInterval':'8 hours', 'productdims_id':171, }) sql = """ select CAST(ceil(EXTRA... |
value.uptime += row.uptime | if row.uptime: value.uptime += row.uptime | def tallyPVpairs(self, rows, columns, startDateAsCompactString, previousDateAsCompactString, summaryCrashes, idCache): """ This function iterates through the results of the database query in the extractDataForPeriod function. Each row represents a single crash. """ for r in rows: row = lib_util.DotDict((key, value) for... |
is_oob_signature = false | is_oob_signature = False | def put_processed_json(self,ooid,processed_json): """ Create a crash report from the cooked json output of the processor """ row_id = ooid_to_row_id(ooid) |
is_oob_signature = true | is_oob_signature = True | def put_processed_json(self,ooid,processed_json): """ Create a crash report from the cooked json output of the processor """ row_id = ooid_to_row_id(ooid) |
for line in dumpAnalysisLineIterator: line = line.strip() | for lineNumber, line in enumerate(dumpAnalysisLineIterator): try: line = unicode(line.strip()) except UnicodeDecodeError, x: processorErrorMessages.append('Cannot parse header line continue | def analyzeHeader(self, reportId, dumpAnalysisLineIterator, databaseCursor, date_processed, processorErrorMessages): """ Scan through the lines of the dump header: - # deprecated: extract the information for populating the 'modules' table - extract data to update the record for this crash in 'reports', including the id... |
items = dict(zip(self.reportsTable.columns, rowTuple)) for key, value in items.iteritems(): logger.debug('%s: "%s", %s', key, value, str(type(value))) | def insertReport(self, crash_json): threadLocalDbConnection = self.databasePool.connection() rowTuple = tuple((crash_json[x] for x in self.reportsTable.columns)) ooid = crash_json['uuid'] # TODO: debug - remove this items = dict(zip(self.reportsTable.columns, rowTuple)) for key, value in items.iteritems(): logger.debug... | |
print psy.connectionStatus(databaseConnection) | def dailyUrlDump(config): databaseConnectionPool = psy.DatabaseConnectionPool(config.databaseHost, config.databaseName, config.databaseUserName, config.databasePassword, logger) try: # outer try/except: level 0 try: # mid try/finally: level 1 databaseConnection, databaseCursor = databaseConnectionPool.connectionCursorP... | |
rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_legacy'])[0]) else: | try: rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_legacy'])[0]) else: inserts_unprocessed_legacy = 0 if rawQueueS... | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... |
if rawQueueStats.get('counters:deletes_unprocessed_legacy'): deletes_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_legacy'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:inserts_unprocessed_priority'): inserts_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_priority'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:deletes_unprocessed_priority'): deletes_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_priority'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:inserts_unprocessed'): inserts_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:deletes_unprocessed'): deletes_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:inserts_processed_legacy'): inserts_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_legacy'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:deletes_processed_legacy'): deletes_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_legacy'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:inserts_processed_priority'): inserts_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_priority'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
if rawQueueStats.get('counters:deletes_processed_priority'): deletes_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_priority'])[0]) else: | def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = lo... | |
logger.info("For %s, handling %s crashes",nowAsString,len(crashData)) | if crashData: logger.info("For %s, handling %s crashes",nowAsString,len(crashData)) else: logger.info("No crash data found for dates between %s and %s",yesterdayAsString,nowAsString) | def dailyUrlDump(config): databaseConnectionPool = psy.DatabaseConnectionPool(config.databaseHost, config.databaseName, config.databaseUserName, config.databasePassword, logger) try: try: databaseConnection, databaseCursor = databaseConnectionPool.connectionCursorPair() now = config.day + dt.timedelta(1) nowAsString =... |
def deleting_iterator_for_table(self, table_name,limit=10**6): | def deleting_iterator_for_table(self, table_name, queue_type, limit=10**6): | def deleting_iterator_for_table(self, table_name,limit=10**6): #self.logger.debug('deleting_iterator_for_table %s' % table_name) for row in self.limited_iteration(self.merge_scan_with_prefix(table_name, '', ['ids:ooid']), limit): yield row['ids:ooid'] # Delete the row after the feeder has returned from processing it. s... |
return self.deleting_iterator_for_table('crash_reports_index_legacy_processed',limit) | return self.deleting_iterator_for_table('crash_reports_index_legacy_processed', 'deletes_processed_legacy', limit) | def iterator_for_legacy_db_feeder_queue(self,limit=10**6): return self.deleting_iterator_for_table('crash_reports_index_legacy_processed',limit) |
return self.deleting_iterator_for_table('crash_reports_index_priority_processed',limit) | return self.deleting_iterator_for_table('crash_reports_index_priority_processed', 'deletes_processed_priority', limit) | def iterator_for_priority_db_feeder_queue(self,limit=10**6): return self.deleting_iterator_for_table('crash_reports_index_priority_processed',limit) |
counterIncrementList = [ 'counters:submitted_crash_reports' ] counterIncrementList.append("counters:submitted_crash_reports_legacy_throttle_%d" % legacy_processing) | counterIncrementList = [ 'counters:submitted_crash_reports', ("counters:submitted_crash_reports_legacy_throttle_%d" % legacy_processing) ] queueTypes = ['inserts_unprocessed'] if legacy_processing == 0: queueTypes.append('inserts_unprocessed_legacy') | def update_metrics_counters_for_submit(self, submitted_timestamp, legacy_processing, process_type,is_hang): """ Increments a series of counters in the 'metrics' table related to CR submission """ timeLevels = [ submitted_timestamp[:16], # minute yyyy-mm-ddTHH:MM submitted_timestamp[:13], # hour yyyy-mm-ddTHH submitte... |
except urllib2.HTTPError: | except url2.HTTPError: | def get_processed(self, ooid, crashStorage): if not sooid.isValid(ooid): raise web.webapi.BadRequest() try: return crashStorage.get_processed(ooid) except cs.OoidNotFoundException: try: crashStorage.get_meta(ooid) except cs.OoidNotFoundException: raise web.webapi.NotFound(message="ooid '%s' is not in the system" % ooid... |
"processedToFailedRatio", | "processedToFailedRatioThreshold", | def sanitizeForJson(something): if type(something) in [int, str, float]: return something if isinstance(something, collections.Mapping): return dict((k, ProcessorIntrospectionService.sanitizeForJson(v)) for k, v in something.iteritems()) if isinstance(something, collections.Iterable): return [ProcessorIntrospectionServ... |
assert type(databaseParameters["totalNumberOfCrashes"]) is long, \ "Expected long for totalNumberOfCrashes, actual type is %s" % type(databaseParameters["totalNumberOfCrashes"]) assert type(databaseParameters["startDate"]) is datetime.datetime, \ "Expected datetime.datetime for startDate, actual type is %s" % type(data... | assertPairs = { 'totalNumberOfCrashes': long, 'startDate': datetime.datetime, 'endDate': datetime.datetime, 'productdims_id': int, 'listSize': int } for param in assertPairs.keys(): assert type(databaseParameters[param]) is assertPairs[param], \ "Expected long for %s, actual type is %s" % (param, type(databaseParameter... | def getListOfTopCrashersBySignature(aCursor, databaseParameters, totalNumberOfCrashesForPeriodFunc=totalNumberOfCrashesForPeriod): """ """ databaseParameters["totalNumberOfCrashes"] = totalNumberOfCrashesForPeriodFunc(aCursor, databaseParameters) if databaseParameters["totalNumberOfCrashes"] == None: return [] assert... |
def iterator_for_legacy_db_feeder_queue(self): for row in self.limited_iteration(self.merge_scan_with_prefix('crash_reports_index_legacy_processed', | def deleting_iterator_for_table(self, table_name,limit=10**6): for row in self.limited_iteration(self.merge_scan_with_prefix(table_name, | def iterator_for_legacy_db_feeder_queue(self): #self.logger.debug('iterator_for_all_legacy_processed') for row in self.limited_iteration(self.merge_scan_with_prefix('crash_reports_index_legacy_processed', '', ['ids:ooid', 'processed_data:json'])): |
['ids:ooid', 'processed_data:json'])): self.delete_from_legacy_db_feeder_queue(row['_rowkey']) yield row['processed_data:json'] @optional_retry_wrapper def delete_from_legacy_db_feeder_queue(self, index_row_key): self.client.deleteAllRow('crash_reports_index_legacy_processed', index_row_key) @optional_retry_wrapp... | ['ids:ooid']), limit): yield row['ids:ooid'] self.client.deleteAllRow(table_name, row['_rowkey']) def iterator_for_legacy_db_feeder_queue(self,limit=10**6): return self.deleting_iterator_for_table('crash_reports_index_legacy_processed',limit) def insert_to_legacy_db_feeder_queue(self,ooid,timestamp): self.put_crash_... | def iterator_for_legacy_db_feeder_queue(self): #self.logger.debug('iterator_for_all_legacy_processed') for row in self.limited_iteration(self.merge_scan_with_prefix('crash_reports_index_legacy_processed', '', ['ids:ooid', 'processed_data:json'])): |
self.insert_to_priority_db_feeder_queue(ooid,submitted_timestamp,processed_json) | self.insert_to_priority_db_feeder_queue(ooid,submitted_timestamp) | def put_processed_json(self,ooid,processed_json): """ Create a crash report from the cooked json output of the processor """ row_id = ooid_to_row_id(ooid) |
self.insert_to_legacy_db_feeder_queue(ooid,submitted_timestamp,processed_json) | self.insert_to_legacy_db_feeder_queue(ooid,submitted_timestamp) | def put_processed_json(self,ooid,processed_json): """ Create a crash report from the cooked json output of the processor """ row_id = ooid_to_row_id(ooid) |
dumpData = dump.file.read() | def handler(req): beforeHandler = time.time() global persistentStorage try: x = persistentStorage except NameError: persistentStorage = socorro.collector.initializer.createPersistentInitialization(configModule) logger = persistentStorage["logger"] config = persistentStorage["config"] collectObject = persistentStorage[... | |
collectObject.storeDump(dumpData, dumpFileHandle) | collectObject.storeDump(dump.file, dumpFileHandle) | def handler(req): beforeHandler = time.time() global persistentStorage try: x = persistentStorage except NameError: persistentStorage = socorro.collector.initializer.createPersistentInitialization(configModule) logger = persistentStorage["logger"] config = persistentStorage["config"] collectObject = persistentStorage[... |
msg = MIMETextClass(personalized_body.encode('utf-7'), _charset='utf-7') | msg = MIMETextClass(personalized_body.encode('utf-8'), _charset='utf-8') | def send_all_emails(self, contacts, subject, body): """ returns a list of email addresses which were successfully contacted """ contacted_emails = [] # this can raise SMTPHeloError, SMTPAuthenticationError, SMTPException # Error handeling... This Service Call will either work or fail. Failure comes from # SMTP, Databas... |
SELECT adu_day, os_short_name, count | SELECT adu_day, os_short_name, SUM(count) | def fetchCrashHistory (self, parameters): if parameters.listOfOs_names and parameters.listOfOs_names != ['']: localOsList = [x[0:3] for x in parameters.listOfOs_names] osNameListPhrase = (','.join("'%s'" % x for x in localOsList)) parameters.os_phrase = "os_short_name in (%s)" % osNameListPhrase else: parameters.os_phr... |
if cmd == 'get_report': | if cmd == 'get_queue_statistics': if len(args) != 0: usage() sys.exit(1) pp.pprint(connection.get_queue_statistics()) elif cmd == 'get_report': | def usage(): print """ |
elif cmd == 'get_queue_statistics': if len(args) != 0: usage() sys.exit(1) pp.pprint(connection.get_queue_statistics()) | def usage(): print """ | |
CREATE INDEX %(partitionName)s_signature_key ON %(partitionName)s (signature); | def __init__ (self, logger, **kwargs): super(ReportsTable, self).__init__(name='reports', logger=logger, creationSql=""" CREATE TABLE reports ( id serial NOT NULL, client_crash_date timestamp with time zone, date_processed timestamp without time zone, uuid character varying(50) NOT NULL, product character varying(30), ... | |
CREATE INDEX %(partitionName)s_signature_date_processed_key ON %(partitionName)s (signature, date_processed); | CREATE INDEX %(partitionName)s_signature_date_processed_build_key ON %(partitionName)s (signature, date_processed, build); | def __init__ (self, logger, **kwargs): super(ReportsTable, self).__init__(name='reports', logger=logger, creationSql=""" CREATE TABLE reports ( id serial NOT NULL, client_crash_date timestamp with time zone, date_processed timestamp without time zone, uuid character varying(50) NOT NULL, product character varying(30), ... |
if type(self.config.processorSymbolsPathnameList) is not list: self.config.symbol_path = [x for x in self.config.processorSymbolsPathnameList.split()] self.config.commandLine = [config.stackwalk_serverPathname] + self.config.symbol_path | self.config.commandLine = [x for x in self.config.stackwalkCommandLine.split()] | def __init__(self, config): super(StackWalkerPool, self).__init__() self.config = config self.logger = config.logger self.logger.debug("creating stackWalkerPool") if type(self.config.processorSymbolsPathnameList) is not list: self.config.symbol_path = [x for x in self.config.processorSymbolsPathnameList.split()] self.c... |
assert type(databaseParameters["totalNumberOfCrashes"]) is long, type(databaseParameters["totalNumberOfCrashes"]) assert type(databaseParameters["startDate"]) is datetime.datetime, type(databaseParameters["startDate"]) assert type(databaseParameters["endDate"]) is datetime.datetime, type(databaseParameters["endDate"]) ... | assert type(databaseParameters["totalNumberOfCrashes"]) is long, \ "Expected int for totalNumberOfCrashes, actual type is %s" % type(databaseParameters["totalNumberOfCrashes"]) assert type(databaseParameters["startDate"]) is datetime.datetime, \ "Expected int for startDate, actual type is %s" % type(databaseParameters[... | def getListOfTopCrashersBySignature(aCursor, databaseParameters, totalNumberOfCrashesForPeriodFunc=totalNumberOfCrashesForPeriod): """ """ databaseParameters["totalNumberOfCrashes"] = totalNumberOfCrashesForPeriodFunc(aCursor, databaseParameters) if databaseParameters["totalNumberOfCrashes"] == None: return [] assert... |
version = Processor.getJsonOrWarn(jsonDocument,'Version', processorErrorMessages,None,16) | version = Processor.getJsonOrWarn(jsonDocument,'Version', processorErrorMessages,None) | def insertReportIntoDatabase(self, threadLocalCursor, uuid, jsonDocument, jobPathname, date_processed, processorErrorMessages): """ This function is run only by a worker thread. Create the record for the current job in the 'reports' table input parameters: threadLocalCursor: a database cursor for exclusive use by the c... |
_DEFAULT_BASEDIR = 'third_party/java_src/jgments/java' _TEMPLATES_DIR = 'google3/third_party/java_src/jgments/java/com/google/jgments' | if google3: _DEFAULT_BASEDIR = 'third_party/java_src/jgments/java' _TEMPLATES_DIR = 'google3/third_party/java_src/jgments/java/com/google/jgments' else: _DEFAULT_BASEDIR = 'build/java' _TEMPLATES_DIR = 'java/com/google/jgments' | def _MonkeypatchTokenizerHelpers(module, func_names): """Replaces preprocessor functions. Pygments defines some functions that are called when a lexer is constructed, returning opaque objects that we can't inspect. We must replace those objects with ones that simply note the name of the function called. For example, i... |
if iterlib.All(isinstance(arg, string) for arg in args): | if iterlib.All(isinstance(arg, str) for arg in args): | def _ProcessTokenAction(self, action): """Convert a token action into Java syntax.""" if isinstance(action, pygments.lexer._TokenType): return 'TokenActions.singleToken(%s)' % (self._TokenRef(action,)) elif isinstance(action, pygments.lexer.RegexLexer): return _JavaLexerName(LEXERS_BY_CLASS(action)) elif isinstance(act... |
_record_only = True | __metaclass__ = _RecordingLexerMeta | def ExtractStates(lexer_cls): """Extracts the state dictionary from a pygments lexer class.""" class RecordingLexer(lexer_cls): _record_only = True # Instantiating the lexer takes the tokens attribute, preprocesses it, # and produces a _tokens attribute that we can munge. lexer = RecordingLexer() states = {} for sta... |
if u.db[0][0].dbid() >= 0: | if u.db(0, 0).dbid() >= 0: | def pick_subdevice(u): if u.db[0][0].dbid() >= 0: return (0, 0) if u.db[1][0].dbid() >= 0: return (1, 0) return (0, 0) |
if u.db[1][0].dbid() >= 0: | if u.db(1, 0).dbid() >= 0: | def pick_subdevice(u): if u.db[0][0].dbid() >= 0: return (0, 0) if u.db[1][0].dbid() >= 0: return (1, 0) return (0, 0) |
self.ursp.set_fpga_master_clock_freq(options.clock_frequency) | def setup_usrp(self): options = self.options #set resonable defaults if no user prefs set if options.realtime: if options.fusb_block_size == 0: options.fusb_block_size = gr.prefs().get_long('fusb', 'rt_block_size', 1024) if options.fusb_nblocks == 0: options.fusb_nblocks = gr.prefs().get_long('fusb', 'rt_nblocks', ... | |
clock_rate = 64e6 | clock_rate = options.clock_frequency | def setup_timing(self): options = self.options clock_rate = 64e6 |
clock_rate = 64e6 + options.clock_offset | clock_rate = clock_rate + options.clock_offset | def setup_timing(self): options = self.options clock_rate = 64e6 |
${VSIM} -modelsimini %(ini)s ${params} %(entry)s -do 'run;exit' | ${VSIM} -modelsimini %(ini)s ${params} %(entry)s -do 'run -all;exit' | def modelsim_vlog(self, node): """Create a vlog_task on each v file and ensure the order""" if 'modelsim' in self.features and Options.options.modelsim: tsks = [n for n in self.tasks if n.name in ['vcom', 'vlog']] tsk = self.create_task('vlog', [node]) if tsks: tsk.run_after.add(tsks[-1]) tsk.dep_nodes += self.mdeps |
ctx.find_program('vlib', var='VLIB', mandatory=True) | ctx.find_program('vlib', var='VLIB', mandatory=True, okmsg="ok") | def configure(ctx): """Detect modelsim executables and set default flags""" ctx.find_program('vlib', var='VLIB', mandatory=True) ctx.env['VLIBFLAGS'] = [] ctx.find_program('vsim', var='VSIM', mandatory=True) ctx.env['VSIMFLAGS'] = ['-quiet'] ctx.find_program('sccom', var='SCCOM', mandatory=True) ctx.env['SCCOMFLAGS']... |
ctx.find_program('vsim', var='VSIM', mandatory=True) | ctx.find_program('vsim', var='VSIM', mandatory=True, okmsg="ok") | def configure(ctx): """Detect modelsim executables and set default flags""" ctx.find_program('vlib', var='VLIB', mandatory=True) ctx.env['VLIBFLAGS'] = [] ctx.find_program('vsim', var='VSIM', mandatory=True) ctx.env['VSIMFLAGS'] = ['-quiet'] ctx.find_program('sccom', var='SCCOM', mandatory=True) ctx.env['SCCOMFLAGS']... |
ctx.find_program('sccom', var='SCCOM', mandatory=True) | ctx.find_program('sccom', var='SCCOM', mandatory=True, okmsg="ok") | def configure(ctx): """Detect modelsim executables and set default flags""" ctx.find_program('vlib', var='VLIB', mandatory=True) ctx.env['VLIBFLAGS'] = [] ctx.find_program('vsim', var='VSIM', mandatory=True) ctx.env['VSIMFLAGS'] = ['-quiet'] ctx.find_program('sccom', var='SCCOM', mandatory=True) ctx.env['SCCOMFLAGS']... |
ctx.find_program('scgenmod', var='SCGENMOD', mandatory=True) | ctx.find_program('scgenmod', var='SCGENMOD', mandatory=True, okmsg="ok") | def configure(ctx): """Detect modelsim executables and set default flags""" ctx.find_program('vlib', var='VLIB', mandatory=True) ctx.env['VLIBFLAGS'] = [] ctx.find_program('vsim', var='VSIM', mandatory=True) ctx.env['VSIMFLAGS'] = ['-quiet'] ctx.find_program('sccom', var='SCCOM', mandatory=True) ctx.env['SCCOMFLAGS']... |
ctx.find_program('vcom', var='VCOM', mandatory=True) | ctx.find_program('vcom', var='VCOM', mandatory=True, okmsg="ok") | def configure(ctx): """Detect modelsim executables and set default flags""" ctx.find_program('vlib', var='VLIB', mandatory=True) ctx.env['VLIBFLAGS'] = [] ctx.find_program('vsim', var='VSIM', mandatory=True) ctx.env['VSIMFLAGS'] = ['-quiet'] ctx.find_program('sccom', var='SCCOM', mandatory=True) ctx.env['SCCOMFLAGS']... |
ctx.find_program('vlog', var='VLOG', mandatory=True) | ctx.find_program('vlog', var='VLOG', mandatory=True, okmsg="ok") | def configure(ctx): """Detect modelsim executables and set default flags""" ctx.find_program('vlib', var='VLIB', mandatory=True) ctx.env['VLIBFLAGS'] = [] ctx.find_program('vsim', var='VSIM', mandatory=True) ctx.env['VSIMFLAGS'] = ['-quiet'] ctx.find_program('sccom', var='SCCOM', mandatory=True) ctx.env['SCCOMFLAGS']... |
read = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) write = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) | read = ConfigParser() write = ConfigParser() | def run(self): from ConfigParser import ConfigParser read = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) write = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) oname = self.outputs[0].get_bld().abspath() if isinstance(self.config, str): read.readfp(io.BytesI... |
for key, val in read.items(sec): | for key, val in read.items(sec, False, {"root": self.root, "path" : self.path, "target": self.target}): | def run(self): from ConfigParser import ConfigParser read = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) write = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) oname = self.outputs[0].get_bld().abspath() if isinstance(self.config, str): read.readfp(io.BytesI... |
vlib_task = Task.simple_task_type('vlib', 'test -d ${TGT} || vlib ${TGT}', color='BLUE', before=['vcom', 'vlog', 'sccom', 'sclink'], shell=True) | vlib_task = Task.simple_task_type('vlib', 'test -f ${TGT}/_info || vlib ${TGT} 2>&1 > /dev/null', color='BLUE', before=['vcom', 'vlog', 'sccom', 'sclink'], shell=True) | def run(self): from ConfigParser import ConfigParser read = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) write = ConfigParser({"root": self.root, "path" : self.path, "target": self.target}) oname = self.outputs[0].get_bld().abspath() if isinstance(self.config, str): read.readfp(io.BytesI... |
vsim_before = Task.simple_task_type('vsim_before', '${VSIM} ${VSIMFLAGS} ${VSIMBEFORE}', color='RED', after=['vlib'], before=['vcom', 'vlog', 'sccom'], vars=['VSIM', 'VSIMFLAGS', 'VSIMBEFORE']) | vsim_before = Task.simple_task_type('vsim_before', '${VSIM} ${_VSIMFLAGS} ${_VSIMBEFORE}', color='RED', after=['vlib'], before=['vcom', 'vlog', 'sccom'], vars=['VSIM', '_VSIMFLAGS', '_VSIMBEFORE']) | def vlib_task_str(self): return "vlib: %s\n" % self.target |
vsim_after = Task.simple_task_type('vsim_after', '${VSIM} ${VSIMFLAGS} ${VSIMAFTER}', color='RED', after=['vcom', 'vlog', 'sccom', 'sclink'], vars=['VSIM', 'VSIMFLAGS', 'VSIMAFTER']) | vsim_after = Task.simple_task_type('vsim_after', '${VSIM} ${_VSIMFLAGS} ${_VSIMAFTER}', color='RED', after=['vcom', 'vlog', 'sccom', 'sclink'], vars=['VSIM', '_VSIMFLAGS', '_VSIMAFTER']) | def vlib_task_str(self): return "vlib: %s\n" % self.target |
vcom_task = Task.simple_task_type('vcom', '${VCOM} ${VCOMFLAGS} ${SRC}', color='GREEN', before='cxx', ext_in=".vhd", vars=['VCOM', 'VCOMFLAGS']) | vcom_task = Task.simple_task_type('vcom', '${VCOM} ${_VCOMFLAGS} ${SRC}', color='GREEN', before='cxx', ext_in=".vhd", vars=['VCOM', '_VCOMFLAGS']) | def vsim_task_str(self): return "vsim: do %s -> %s\n" % (self.dotask, self.target) |
vlog_task = Task.simple_task_type('vlog', '${VLOG} ${VLOGFLAGS} ${SRC}', color='GREEN', before='cxx', ext_in=".v") | vlog_task = Task.simple_task_type('vlog', '${VLOG} ${_VLOGFLAGS} ${SRC}', color='GREEN', before='cxx', ext_in=".v", vars=['VLOG', '_VLOGFLAGS']) | def vcom_task_str(self): ins = [] for inf in self.inputs: ins.append(inf.name) return "vcom: %s -> %s\n" % (', '.join(ins), self.target) |
scgenmod_task = Task.simple_task_type('scgenmod', '${SCGENMOD} ${SCGENMODFLAGS} ${SCGENMODMAP} ${src} > ${TGT}', color='BLUE', after=['vlib', 'vlog', 'vcom'], before=['sccom'], ext_out=".h", vars=['SCGENMOD', 'SCGENMODFLAGS', 'SCGENMAP']) | scgenmod_task = Task.simple_task_type('scgenmod', '${SCGENMOD} ${_SCGENMODFLAGS} ${SCGENMODMAP} ${src} > ${TGT}', color='BLUE', after=['vlib', 'vlog', 'vcom'], before=['sccom'], ext_out=".h", vars=['SCGENMOD', '_SCGENMODFLAGS', 'SCGENMAP']) | def vlog_task_str(self): ins = [] for inf in self.inputs: ins.append(inf.name) return "vlog: %s -> %s\n" % (', '.join(ins), self.target) |
sccom_task = Task.simple_task_type('sccom', '${SCCOM} ${SCCOMFLAGS} ${SRC}', color='BLUE', ext_in=".cpp", after=['vlib', 'vcom', 'vlog', 'scgenmod'], before=['sclink'], vars=['SCCOM', 'SCCOMFLAGS', 'CPPFLAGS', 'CXXFLAGS', 'INCLUDES']) | sccom_task = Task.simple_task_type('sccom', '${SCCOM} ${_SCCOMFLAGS} ${SRC}', color='BLUE', ext_in=".cpp", after=['vlib', 'vcom', 'vlog', 'scgenmod'], before=['sclink'], vars=['SCCOM', '_SCCOMFLAGS', 'CPPFLAGS', 'CXXFLAGS', 'INCLUDES']) | def vlog_task_str(self): ins = [] for inf in self.inputs: ins.append(inf.name) return "vlog: %s -> %s\n" % (', '.join(ins), self.target) |
sclink_task = Task.simple_task_type('sclink', '${SCCOM} ${SCLINKFLAGS} -link', color='YELLOW', after=['vlib', 'vcom', 'vlog', 'sccom'], vars=['SCCOM', 'SCLINKFLAGS', 'LIBRARIES']) | sclink_task = Task.simple_task_type('sclink', '${SCCOM} ${_SCLINKFLAGS} -link', color='YELLOW', after=['vlib', 'vcom', 'vlog', 'sccom'], vars=['SCCOM', '_SCLINKFLAGS']) sclink_task.nocache = True | def sccom_task_str(self): ins = [] for inf in self.inputs: ins.append(inf.name) return "sccom: %s -> %s\n" % (', '.join(ins), self.target) |
env = self.env.derive() | self.env = self.env.derive() self.env["_VCOMFLAGS"] = list(self.env["VCOMFLAGS"]) self.env["_VLOGFLAGS"] = list(self.env["VLOGFLAGS"]) self.env["_SCCOMFLAGS"] = list(self.env["SCCOMFLAGS"]) self.env["_SCGENMODFLAGS"] = list(self.env["SCGENMODFLAGS"]) self.env["_VSIMFLAGS"] = list(self.env["VSIMFLAGS"]) s... | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["VCOMFLAGS"] += ['-work', 'work'] self.env["VLOGFLAGS"] += ['-work', 'work'] self.env["SCCOMFLAGS"] += ['-work', 'work'] self.env["SCGENMODFLAGS"] += ['-lib', 'work'] self.env["VSIMFLAGS"] += ['-c', '-lib', 'work'] self.env["SCLINKFLAGS"] += ['-work', 'work'] | self.env["_VCOMFLAGS"] += ['-work', 'work'] self.env["_VLOGFLAGS"] += ['-work', 'work'] self.env["_SCCOMFLAGS"] += ['-work', 'work'] self.env["_SCGENMODFLAGS"] += ['-lib', 'work'] self.env["_VSIMFLAGS"] += ['-c', '-lib', 'work'] self.env["_SCLINKFLAGS"] += ['-work', 'work'] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["SCCOMFLAGS"] += ['-D%s' % define] self.env["VLINKFLAGS"] += ['-D%s' % define] | self.env["_SCCOMFLAGS"] += ['-D%s' % define] self.env["_VLINKFLAGS"] += ['-D%s' % define] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["SCCOMFLAGS"] += ['-I%s' % i.abspath()] | self.env["_SCCOMFLAGS"] += ['-I%s' % i.abspath()] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["SCCOMFLAGS"] += ['-I%s' % path] | self.env["_SCCOMFLAGS"] += ['-I%s' % path] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["VLINKFLAGS"] += ['-L%s' % path] | self.env["_VLINKFLAGS"] += ['-L%s' % path] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["VLINKFLAGS"] += ['-l%s' % lib] | self.env["_VLINKFLAGS"] += ['-l%s' % lib] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["SCCOMFLAGS"] += ['-I%s' % tgt.parent.bldpath()] | self.env["_SCCOMFLAGS"] += ['-I%s' % tgt.parent.bldpath()] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["VSIMFLAGS"] += ['-modelsimini', ini] self.env["VCOMFLAGS"] += ['-modelsimini', ini] self.env["VLOGFLAGS"] += ['-modelsimini', ini] self.env["SCCOMFLAGS"] += ['-modelsimini', ini] self.env["SCGENMODFLAGS"] += ['-modelsimini', ini] self.env["SCLINKFLAGS"] += ['-modelsimini', ini] | self.inifile = ini self.env["_VSIMFLAGS"] += ['-modelsimini', ini] self.env["_VCOMFLAGS"] += ['-modelsimini', ini] self.env["_VLOGFLAGS"] += ['-modelsimini', ini] self.env["_SCCOMFLAGS"] += ['-modelsimini', ini] self.env["_SCGENMODFLAGS"] += ['-modelsimini', ini] self.env["_SCLINKFLAGS"] += ['-modelsimini', ini] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["VSIMBEFORE"] += ['-do', do] | self.env["_VSIMBEFORE"] += ['-do', do] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
self.env["VSIMAFTER"] += ['-do', do] | self.env["_VSIMAFTER"] += ['-do', do] | def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work... |
names = set([]) for x in bld.all_task_gen: | nlibs = set([]) ntests = set([]) napps = set([]) for x in bld.all_task_gen: | def target_list(ctx): """returns a list of all targets""" bld = Build.BuildContext() proj = Environment.Environment(Options.lockfile) bld.load_dirs(proj['srcdir'], proj['blddir']) bld.load_envs() bld.add_subdirs([os.path.split(Utils.g_module.root_path)[0]]) names = set([]) for x in bld.all_task_gen: try: names.add(x... |
names.add(x.name or x.target) | if "test" in x.features: ntests.add(x.name or x.target) elif "cprogram" in x.features: napps.add(x.name or x.target) elif "cstaticlib" in x.features: nlibs.add(x.name or x.target) | def target_list(ctx): """returns a list of all targets""" bld = Build.BuildContext() proj = Environment.Environment(Options.lockfile) bld.load_dirs(proj['srcdir'], proj['blddir']) bld.load_envs() bld.add_subdirs([os.path.split(Utils.g_module.root_path)[0]]) names = set([]) for x in bld.all_task_gen: try: names.add(x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.