blob: 8ec0f543a2d1c7b9c42bf8184df5f0b072058918 [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 Gregorio432f17e2011-05-22 23:18:00 -040010APP_ENGINE_PATH='../google_appengine'
11
ade@google.com6e54a912010-12-10 22:26:04 +000012# Conditional import of cleanup function
13try:
14 from tests.utils import cleanup
15except:
16 def cleanup():
17 pass
18
19# Ensure current working directory is in path
Joe Gregorio48d361f2010-08-18 13:19:21 -040020sys.path.insert(0, os.getcwd())
Joe Gregorio432f17e2011-05-22 23:18:00 -040021sys.path.insert(0, APP_ENGINE_PATH)
Joe Gregorio48d361f2010-08-18 13:19:21 -040022
Joe Gregoriof42dfdc2011-10-14 13:55:24 -040023from google.appengine.dist import use_library
24use_library('django', '1.2')
25
26
ade@google.com6e54a912010-12-10 22:26:04 +000027def main():
Joe Gregorio8b4c1732011-12-06 11:28:29 -050028 module = imp.load_source('test', sys.argv[1])
29 test = unittest.TestLoader().loadTestsFromModule(module)
30 result = unittest.TextTestRunner(verbosity=1).run(test)
Joe Gregoriob843fa22010-12-13 16:26:07 -050031
ade@google.com6e54a912010-12-10 22:26:04 +000032
33if __name__ == '__main__':
Joe Gregoriob843fa22010-12-13 16:26:07 -050034 main()