de68081e74
saria-test.py should be run with python2, not python (python is not pointing to python 3.1)
42 lines
732 B
Python
Executable File
42 lines
732 B
Python
Executable File
#!/usr/bin/python2
|
|
# Bryan Schumaker (8/7/2010)
|
|
|
|
import os
|
|
import sys
|
|
import datetime
|
|
now = datetime.datetime.now
|
|
|
|
print "Loading libsaria"
|
|
|
|
before = now()
|
|
import libsaria
|
|
after = now()
|
|
|
|
print "libsaria loaded (", after-before, ")"
|
|
|
|
if len(sys.argv) == 1:
|
|
before = now()
|
|
libsaria.init()
|
|
after = now()
|
|
print "startup took", after-before
|
|
print
|
|
print "Available tests:"
|
|
for file in os.listdir("tests"):
|
|
split = file.rsplit(".")
|
|
if split[1] == "pyc":
|
|
continue
|
|
if split[0] == "__init__":
|
|
continue
|
|
print " ", file
|
|
|
|
|
|
for file in sys.argv[1:]:
|
|
print
|
|
print "=====", file, "====="
|
|
print
|
|
before = now()
|
|
__import__("tests."+file.rsplit(".")[0])
|
|
after = now()
|
|
print
|
|
print "=====", file, "(", after-before,") ====="
|