Back to index

enigmail  1.4.3
Classes | Functions | Variables
build.xpccheck Namespace Reference

Classes

class  srcManifestParser

Functions

def getIniTests
def verifyDirectory
def verifyIniFile
def verifyMasterIni

Variables

list topsrcdir = sys.argv[1]
tuple initests = getIniTests(d)

Function Documentation

def build.xpccheck.getIniTests (   testdir)

Definition at line 60 of file xpccheck.py.

00060 
00061 def getIniTests(testdir):
00062   mp = manifestparser.ManifestParser(strict=False)
00063   mp.read(os.path.join(testdir, 'xpcshell.ini'))
00064   return mp.tests

def build.xpccheck.verifyDirectory (   initests,
  directory 
)

Definition at line 65 of file xpccheck.py.

00065 
00066 def verifyDirectory(initests, directory):
00067   files = glob(os.path.join(os.path.abspath(directory), "test_*"))
00068   for f in files:
00069     if (not os.path.isfile(f)):
00070       continue
00071 
00072     name = os.path.basename(f)
00073     if name.endswith('.in'):
00074       name = name[:-3]
00075 
00076     if not name.endswith('.js'):
00077       continue
00078 
00079     found = False
00080     for test in initests:
00081       if os.path.join(os.path.abspath(directory), name) == test['path']:
00082         found = True
00083         break
00084    
00085     if not found:
00086       print >>sys.stderr, "TEST-UNEXPECTED-FAIL | xpccheck | test %s is missing from test manifest %s!" % (name, os.path.join(directory, 'xpcshell.ini'))
00087       sys.exit(1)

Here is the call graph for this function:

def build.xpccheck.verifyIniFile (   initests,
  directory 
)

Definition at line 88 of file xpccheck.py.

00088 
00089 def verifyIniFile(initests, directory):
00090   files = glob(os.path.join(os.path.abspath(directory), "test_*"))
00091   for test in initests:
00092     name = test['path'].split('/')[-1]
00093 
00094     found = False
00095     for f in files:
00096 
00097       fname = f.split('/')[-1]
00098       if fname.endswith('.in'):
00099         fname = '.in'.join(fname.split('.in')[:-1])
00100 
00101       if os.path.join(os.path.abspath(directory), fname) == test['path']:
00102         found = True
00103         break
00104 
00105     if not found:
00106       print >>sys.stderr, "TEST-UNEXPECTED-FAIL | xpccheck | found %s in xpcshell.ini and not in directory '%s'" % (name, directory)
00107       sys.exit(1)

Here is the call graph for this function:

def build.xpccheck.verifyMasterIni (   mastername,
  topsrcdir,
  directory 
)

Definition at line 108 of file xpccheck.py.

00108 
00109 def verifyMasterIni(mastername, topsrcdir, directory):
00110   mp = srcManifestParser(strict=False, testroot=topsrcdir)
00111   mp.read(mastername)
00112   tests = mp.tests
00113 
00114   found = False
00115   for test in tests:
00116     if test['manifest'] == os.path.abspath(os.path.join(directory, 'xpcshell.ini')):
00117       found = True
00118       break
00119 
00120   if not found:
00121     print >>sys.stderr, "TEST-UNEXPECTED-FAIL | xpccheck | directory %s is missing from master xpcshell.ini file %s" % (directory, mastername)
00122     sys.exit(1)
00123 


Variable Documentation

Definition at line 136 of file xpccheck.py.

list build.xpccheck.topsrcdir = sys.argv[1]

Definition at line 129 of file xpccheck.py.