Run Java tests as part of test suite.

pull/15/head
Jussi Pakkanen 11 years ago
parent efc79fb85e
commit a2cb207762
  1. 19
      meson_test.py
  2. 7
      run_tests.py

@ -41,15 +41,18 @@ def write_log(logfile, test_name, result_str, stdo, stde):
def run_single_test(wrap, test):
global tests_failed
if test.is_cross:
if test.exe_runner is None:
# 'Can not run test on cross compiled executable
# because there is no execute wrapper.
cmd = None
else:
cmd = [test.exe_runner, test.fname]
if test.fname.endswith('.jar'):
cmd = ['java', '-jar', test.fname]
else:
cmd = [test.fname]
if test.is_cross:
if test.exe_runner is None:
# Can not run test on cross compiled executable
# because there is no execute wrapper.
cmd = None
else:
cmd = [test.exe_runner, test.fname]
else:
cmd = [test.fname]
if cmd is None:
res = 'SKIP'
duration = 0.0

@ -154,6 +154,10 @@ def run_tests():
frameworktests = gather_tests('test cases/frameworks')
else:
frameworktests = []
if shutil.which('javac'):
javatests = gather_tests('test cases/java')
else:
javatests = []
if not environment.is_windows():
objctests = gather_tests('test cases/objc')
else:
@ -185,6 +189,9 @@ def run_tests():
[run_and_log(logfile, t) for t in frameworktests]
else:
print('\nNo framework tests on this platform.\n')
if len(javatests) > 0:
print('\nRunning java tests.\n')
[run_and_log(logfile, t) for t in javatests]
if len(objctests) > 0:
print('\nRunning extra language tests.\n')
[run_and_log(logfile, t) for t in objctests]

Loading…
Cancel
Save