Commit d357f838 authored by Boxiang Sun's avatar Boxiang Sun

pyodide test suite amending

parent 5b925f73
......@@ -18,4 +18,4 @@ md5sum = e4e96f0f08b8de6807a24f43fce34b40
[template-runTestSuite]
filename = runTestSuite.in
md5sum = 4c4f50349862d79b8e46902f7b5517de
\ No newline at end of file
md5sum = f13f76d30c4908e71a7391c5a254d66d
\ No newline at end of file
......@@ -34,9 +34,7 @@ def main():
##########################
# Run all tests
##########################
path_var = os.pathsep.join([os.environ.get('PATH', os.defpath), '${python3.7.2:location}/bin'])
path_var = os.pathsep.join([os.environ.get('PATH', os.defpath), '${geckodriver:location}'])
path_var = os.pathsep.join([os.environ.get('PATH', os.defpath), '${firefox-wrapper:location}'])
path_var = os.pathsep.join([os.environ.get('PATH', os.defpath), '${python3.7.2:location}/bin', '${geckodriver:location}', '${firefox-wrapper:location}'])
env = dict(os.environ, PATH=path_var)
test_list = ['test_common', ]
failed = 0
......@@ -47,21 +45,26 @@ def main():
failed = 0
result_string = None
duration = 0
try:
pass
# sys.path.append('${python3.7.2:location}/')
# test_module = importlib.import_module(test_name)
except ImportError as e:
failed = 1
stdout = str(e)
else:
start_time = datetime.datetime.now()
try:
dir = '${pyodide:location}' + '-script-test'
print(os.path.isdir(dir))
print(os.path.isdir('${pyodide:location}'))
print(os.path.isdir(dir + '/test'))
print(path_var)
print(env)
result_string = check_output(['pytest', '--timeout=5', './test/test_common.py'],
cwd='${pyodide:location}',
cwd=dir,
env=env) # temporary solution for not block by xfailed tests too long
except Exception, e:
except OSError, e:
print("We get an OSError here")
result_string = str(e.strerror)
except Exception, e: # except CalledProcessError, e:
print("We get a generic error:")
print(e)
result_string = str(e.output)
print('${pyodide:location}')
print(result_string)
test_result_content = result_string.split('\n')
print('---------------------')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment