代码拉取完成,页面将自动刷新
同步操作将从 IvorySQL/IvorySQL 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python3
import argparse
import shutil
import subprocess
import os
import sys
parser = argparse.ArgumentParser()
parser.add_argument('--srcdir', help='source directory of test', type=str)
parser.add_argument('--basedir', help='base directory of test', type=str)
parser.add_argument('--testgroup', help='test group', type=str)
parser.add_argument('--testname', help='test name', type=str)
parser.add_argument('--skip', help='skip test (with reason)', type=str)
parser.add_argument('test_command', nargs='*')
args = parser.parse_args()
testdir = '{}/testrun/{}/{}'.format(
args.basedir, args.testgroup, args.testname)
print('# executing test in {} group {} test {}'.format(
testdir, args.testgroup, args.testname))
sys.stdout.flush()
if args.skip is not None:
print('1..0 # Skipped: ' + args.skip)
sys.exit(0)
if os.path.exists(testdir) and os.path.isdir(testdir):
shutil.rmtree(testdir)
os.makedirs(testdir)
os.chdir(args.srcdir)
# mark test as having started
open(os.path.join(testdir, 'test.start'), 'x')
env_dict = {**os.environ,
'TESTDATADIR': os.path.join(testdir, 'data'),
'TESTLOGDIR': os.path.join(testdir, 'log')}
sp = subprocess.Popen(args.test_command, env=env_dict, stdout=subprocess.PIPE)
# Meson categorizes a passing TODO test point as bad
# (https://github.com/mesonbuild/meson/issues/13183). Remove the TODO
# directive, so Meson computes the file result like Perl does. This could
# have the side effect of delaying stdout lines relative to stderr. That
# doesn't affect the log file, and the TAP protocol uses stdout only.
for line in sp.stdout:
if line.startswith(b'ok '):
line = line.replace(b' # TODO ', b' # testwrap-overridden-TODO ', 1)
sys.stdout.buffer.write(line)
returncode = sp.wait()
if returncode == 0:
print('# test succeeded')
open(os.path.join(testdir, 'test.success'), 'x')
else:
print('# test failed')
open(os.path.join(testdir, 'test.fail'), 'x')
sys.exit(returncode)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。