blob: 9e695ea53a9d0aa3ad1e00a3395bc9fa2d1fbd1d [file] [log] [blame]
Joe Gregorio48d361f2010-08-18 13:19:21 -04001#!/usr/bin/env python
Joe Gregoriofe695fb2010-08-30 12:04:04 -04002import glob
Joe Gregorio8b4c1732011-12-06 11:28:29 -05003import imp
Joe Gregoriofe695fb2010-08-30 12:04:04 -04004import logging
5import os
6import sys
7import unittest
Joe Gregorio48d361f2010-08-18 13:19:21 -04008from trace import fullmodname
Joe Gregorio48d361f2010-08-18 13:19:21 -04009
Joe Gregorioe84c9442012-03-12 08:45:57 -040010logging.basicConfig(level=logging.CRITICAL)
11
Joe Gregorio432f17e2011-05-22 23:18:00 -040012APP_ENGINE_PATH='../google_appengine'
13
ade@google.com6e54a912010-12-10 22:26:04 +000014# Conditional import of cleanup function
15try:
16 from tests.utils import cleanup
17except:
18 def cleanup():
19 pass
20
21# Ensure current working directory is in path
Joe Gregorio48d361f2010-08-18 13:19:21 -040022sys.path.insert(0, os.getcwd())
Joe Gregorio432f17e2011-05-22 23:18:00 -040023sys.path.insert(0, APP_ENGINE_PATH)
Joe Gregorio48d361f2010-08-18 13:19:21 -040024
Joe Gregoriof42dfdc2011-10-14 13:55:24 -040025from google.appengine.dist import use_library
26use_library('django', '1.2')
27
28
ade@google.com6e54a912010-12-10 22:26:04 +000029def main():
Joe Gregorio08cdcb82012-03-14 00:09:33 -040030 for t in sys.argv[1:]:
31 module = imp.load_source('test', t)
32 test = unittest.TestLoader().loadTestsFromModule(module)
33 result = unittest.TextTestRunner(verbosity=1).run(test)
Joe Gregoriob843fa22010-12-13 16:26:07 -050034
ade@google.com6e54a912010-12-10 22:26:04 +000035
36if __name__ == '__main__':
Joe Gregoriob843fa22010-12-13 16:26:07 -050037 main()