deleted all pyc and *.*~ files

This commit is contained in:
2010-04-13 14:52:17 -07:00
parent 74be39a565
commit 6bad3681dd
14 changed files with 0 additions and 885 deletions

View File

@@ -1,75 +0,0 @@
# Django settings for unittestweb project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Murali Nandigama', 'murali.nandigama@gmail.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'topfailsdb' # Or path to database file if using sqlite3.
DATABASE_USER = 'root' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Los_Angeles'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '0_020s+&-*5!y7yn@h9ubk#+4pnzq5$egrx)%5wq!11@)54gtu'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
ROOT_URLCONF = 'unittestweb.urls'
TEMPLATE_DIRS = (
'./templates'
)
INSTALLED_APPS = (
'django.contrib.contenttypes',
'unittestweb.viewer'
)

View File

@@ -1,96 +0,0 @@
<head>
<style type="text/css">
/*----------Text Styles----------*/
.ws6 {font-size: 8px;}
.ws7 {font-size: 9.3px;}
.ws8 {font-size: 11px;}
.ws9 {font-size: 12px;}
.ws10 {font-size: 13px;}
.ws11 {font-size: 15px;}
.ws12 {font-size: 16px;}
.ws14 {font-size: 19px;}
.ws16 {font-size: 21px;}
.ws18 {font-size: 24px;}
.ws20 {font-size: 27px;}
.ws22 {font-size: 29px;}
.ws24 {font-size: 32px;}
.ws26 {font-size: 35px;}
.ws28 {font-size: 37px;}
.ws36 {font-size: 48px;}
.ws48 {font-size: 64px;}
.ws72 {font-size: 96px;}
.wpmd {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;}
/*----------Para Styles----------*/
DIV,UL,OL /* Left */
{
margin-top: 0px;
margin-bottom: 0px;
}
</style>
<script language="JavaScript1.4" type="text/javascript">
<!--
function jsPlay(soundobj) {
var thissound= eval("document."+soundobj);
try {
thissound.Play();
}
catch (e) {
thissound.DoPlay();
}
}
//-->
</script>
<script language="javascript" type="text/javascript">
<!--
function MM_swapImgRestore() {
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) {
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() {
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body>
<div id="nav10d" style="position:absolute; left:5px; top:80px; z-index:0"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav10','','http://people.mozilla.com/~mnandigama/images/nav12971480a.gif',1)" href="latest" target="iFrame1"><img name="nav10" onLoad="MM_preloadImages('http://people.mozilla.com/~mnandigama/images/nav12971480a.gif')" alt="" border=0 src="http://people.mozilla.com/~mnandigama/images/nav12971480i.gif"></a></div>
<div id="nav11d" style="position:absolute; left:5px; top:113px; z-index:0"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav11','','http://people.mozilla.com/~mnandigama/images/nav12971481a.gif',1)" href="topfails" target="iFrame1"><img name="nav11" onLoad="MM_preloadImages('http://people.mozilla.com/~mnandigama/images/nav12971481a.gif')" alt="" border=0 src="http://people.mozilla.com/~mnandigama/images/nav12971481i.gif"></a></div>
<div id="nav12d" style="position:absolute; left:5px; top:146px; z-index:0"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav12','','http://people.mozilla.com/~mnandigama/images/nav12971482a.gif',1)" href="tests" target="iFrame1"><img name="nav12" onLoad="MM_preloadImages('http://people.mozilla.com/~mnandigama/images/nav12971482a.gif')" alt="" border=0 src="http://people.mozilla.com/~mnandigama/images/nav12971482i.gif"></a></div>
<div id="nav13d" style="position:absolute; left:5px; top:179px; z-index:0"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav13','','http://people.mozilla.com/~mnandigama/images/nav12971483a.gif',1)" href="failswindow?window=7d" target="iFrame1"><img name="nav13" onLoad="MM_preloadImages('http://people.mozilla.com/~mnandigama/images/nav12971483a.gif')" alt="" border=0 src="http://people.mozilla.com/~mnandigama/images/nav12971483i.gif"></a></div>
<div id="nav14d" style="position:absolute; left:5px; top:212px; z-index:0"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav14','','http://people.mozilla.com/~mnandigama/images/nav12971484a.gif',1)" href="Help" target="iFrame1"><img name="nav14" onLoad="MM_preloadImages('http://people.mozilla.com/~mnandigama/images/nav12971484a.gif')" alt="" border=0 src="http://people.mozilla.com/~mnandigama/images/nav12971484i.gif"></a></div>
<div id="iFrame1" style="position:absolute; left:187px; top:69px; z-index:1">
<iframe name="iFrame1" width="870" height="1978" src="Help" scrolling="no" frameborder="0"></iframe>
</div>
<div id="text1" style="position:absolute; overflow:hidden; left:305px; top:11px; width:690px; height:90px; z-index:2">
<div class="wpmd">
<div><font color="#CC6600" style="font-familyr:Helvetica,sans-serif" class="ws20"><B>Mozilla Firefox Tinderbox Topfails Dashboard</B></font></div>
</div></div>
<div id="image1" style="position:absolute; overflow:hidden; left:4px; top:15px; width:181px; height:61px; z-index:3"><img src="http://people.mozilla.com/~mnandigama/images/img5846075.png" alt="" title="" border=0 width=181 height=61></div>
</body>

Binary file not shown.

View File

@@ -1,18 +0,0 @@
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('unittestweb.viewer.views',
(r'^$', 'index'),
(r'^/$', 'index'),
(r'^trees$', 'trees'),
(r'^trees/(?P<tree>.+)$', 'tree'),
(r'^changesets$', 'changesets'),
(r'^changesets/(?P<changeset>[a-f0-9]+)$', 'changeset'),
(r'^tests$', 'tests'),
(r'^test$', 'test'),
(r'^timeline$', 'timeline'),
(r'^topfails$', 'topfails'),
)

View File

@@ -1,108 +0,0 @@
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or field names.
#
# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'
# into your database.
import re
from django.db import models, connection
from datetime import datetime
from time import ctime, sleep, time
class OS():
Windows = 0
Mac = 1
Linux = 2
Unknown = 3
OS_CHOICES = (
(OS.Windows, 'Windows'),
(OS.Mac, 'Mac'),
(OS.Linux, 'Linux'),
(OS.Unknown, 'Unknown')
)
class BuildStatus():
Success = 0
TestFailed = 1
Burning = 2
Exception = 3
Unknown = 4
BUILDSTATUS_CHOICES = (
(BuildStatus.Success, 'Success'),
(BuildStatus.TestFailed, 'Test Failed'),
(BuildStatus.Burning, 'Burning'),
(BuildStatus.Exception, 'Exception'),
(BuildStatus.Unknown, 'Unknown')
)
class Trees(models.Model):
id = models.IntegerField(primary_key=True)
name = models.TextField(blank=True)
def __unicode__(self):
return self.name
class Meta:
db_table = 'trees'
class Builds(models.Model):
id = models.IntegerField(primary_key=True)
tree = models.ForeignKey(Trees, db_column="treeid")
os = models.IntegerField(choices=OS_CHOICES)
starttime = models.IntegerField(null=True, blank=True)
status = models.IntegerField(choices=BUILDSTATUS_CHOICES)
logfile = models.TextField(blank=True)
changeset = models.TextField(blank=True)
def startdate(self):
return datetime.fromtimestamp(self.starttime)
def changeset_link(self):
return '<a href="%s/rev/%s">%s</a>' % ("http://hg.mozilla.org/mozilla-central", self.changeset, self.changeset)
def tinderbox_link(self):
if self.logfile:
return "http://tinderbox.mozilla.org/showlog.cgi?log=%s/%s" % (self.tree.name, self.logfile)
return "http://tinderbox.mozilla.org/showbuilds.cgi?tree=%s&maxdate=%d&hours=3" % (self.tree.name, self.starttime)
class Meta:
db_table = 'builds'
class Tests(models.Model):
id = models.IntegerField(primary_key=True)
build = models.ForeignKey(Builds, db_column="buildid")
name = models.TextField(blank=True)
description = models.TextField(blank=True)
class Meta:
db_table = 'tests'
def get_most_failing_tests():
cursor = connection.cursor()
cursor.execute("select count(*), name from (select builds.id, name from builds inner join tests on builds.id = tests.buildid group by builds.id, name) aaa group by name order by count(*) desc limit 25")
for row in cursor:
yield row
def get_fails_in_timerange(self):
# Get current time, in seconds.
endtime = int(time())
#print endtime
m = re.match("(\d+)([ymwdh])", self)
#print m.group(1), m.group(2)
if m is None:
print >>sys.stderr, "ERROR: bad timespan = '%s'!" % options.timespan
sys.exit(1)
timespan = int(m.group(1)) * {'y': 365 * 24 * 3600,
'm': 30 * 24 * 3600,
'w': 7 * 24 * 3600,
'd': 24 * 3600,
'h': 3600}[m.group(2)]
# Set current time to beginning of requested timespan ending now.
curtime = endtime - timespan
#print curtime, timespan, endtime-curtime
cursor = connection.cursor()
statement = "select count(*), name from (select builds.id, name from builds inner join tests on builds.id = tests.buildid where builds.starttime >"+str(curtime)+" group by builds.id, name) aaa group by name order by count(*) DESC"
cursor.execute(statement)
for row in cursor:
print row
yield row

View File

@@ -1,55 +0,0 @@
from django.shortcuts import render_to_response, get_list_or_404
from unittestweb.viewer.models import Builds, Trees, Tests, OS_CHOICES, get_most_failing_tests
def index(request):
failures = get_list_or_404(Tests.objects.all().order_by('-build__starttime')[:10])
return render_to_response('viewer/index.html', {'failures': failures})
def trees(request):
alltrees = Trees.objects.all().order_by('name')
return render_to_response('viewer/trees.html', {'trees': alltrees})
def tree(request, tree):
newestbuilds = get_list_or_404(Builds.objects.filter(tree__name__exact=tree).order_by('-starttime')[:5])
return render_to_response('viewer/tree.html', {'tree': tree, 'newestbuilds': newestbuilds})
def changesets(request):
build_csets = Builds.objects.values('changeset').distinct()
return render_to_response('viewer/changesets.html', {'changesets': [b['changeset'] for b in build_csets]})
def changeset(request, changeset):
builds = get_list_or_404(Builds, changeset__exact=changeset)
return render_to_response('viewer/changeset.html', {'changeset': changeset, 'builds': builds})
def tests(request):
test_names = Tests.objects.values('name').distinct()
return render_to_response('viewer/tests.html', {'tests': [t['name'] for t in test_names]})
def test(request):
failures = get_list_or_404(Tests.objects.filter(name__exact=request.GET['name']).order_by('-build__starttime'))
return render_to_response('viewer/test.html', {'test': request.GET['name'], 'failures': failures})
def topfails(request):
failures = get_most_failing_tests()
return render_to_response('viewer/topfails.html', {'failures': failures})
def timeline(request):
name = request.GET['name']
builds = get_list_or_404(Builds, tests__name__exact=name)
buildlist = []
desc_list = []
for b in builds:
descs = b.tests_set.filter(name__exact=name).order_by('ROWID')
desc = '\n'.join(descs.values_list('description', flat=True))
if desc not in desc_list:
desc_list.append(desc)
desc_i = desc_list.index(desc)
buildlist.append({'build': b,
'desctype': desc_i,
'description': desc,
'os': OS_CHOICES[b.os][1],
'time': b.startdate().isoformat() + "Z",
})
return render_to_response('viewer/timeline.html', {'test': name,
'descriptions': desc_list,
'builds': buildlist})