124 |
compiledTestFile = compile(open(file).read() + '\n', file, 'exec') |
compiledTestFile = compile(open(file).read() + '\n', file, 'exec') |
125 |
tests = {} |
tests = {} |
126 |
|
|
|
def jni(e, file=file): |
|
|
# A jni test |
|
|
if enableJNI == false: |
|
|
print file + " skipped: JNI required." |
|
|
return |
|
|
else: |
|
|
raise e |
|
|
|
|
127 |
tests["needGL"] = needGL |
tests["needGL"] = needGL |
128 |
try: |
try: |
129 |
exec compiledTestFile in tests |
exec compiledTestFile in tests |
130 |
except NeedGLError, e: |
except NeedGLError, e: |
131 |
print "Skipping test %s because it needs OpenGL compiled.", file |
print "Skipping OpenGL test %s" % file |
132 |
|
|
133 |
testnames = [t for t in tests.keys() if t.startswith('test')] |
testnames = [t for t in tests.keys() if t.startswith('test')] |
134 |
|
|