start running TCR tests with verify
I went a bit crazy and supported all the quick and zend tests in the same format. Or do you think we should normalize the other way? Or are there better names? I think if you like this, I should move the "vm" directory to "quick" and the TectCodeRun to "slow" directory or something so we put tests into nicer suites.
Esse commit está contido em:
@@ -303,8 +303,9 @@ stdout = subprocess.Popen(
|
||||
[
|
||||
'tools/verify_to_json.php',
|
||||
'run_verify.sh',
|
||||
'interp',
|
||||
'test/zend/all',
|
||||
'interp',
|
||||
'0',
|
||||
'_bin',
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
|
||||
Arquivo executável
+79
@@ -0,0 +1,79 @@
|
||||
#!/bin/env python
|
||||
#
|
||||
# Helper for running hphp/test in fbconfig builds.
|
||||
#
|
||||
# ./run_test.py TestCodeRunVM
|
||||
# ./run_test.py QuickRepoJit
|
||||
# ./run_test.py ZendJitIR
|
||||
#
|
||||
# Components are:
|
||||
#
|
||||
# SuiteName [VM|Jit|JitIR] [<blank>|Repo] [-SubSuiteName]
|
||||
#
|
||||
|
||||
import re
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
suites = {
|
||||
'TestCodeRun' : 'tcr',
|
||||
'Quick' : 'vm',
|
||||
'Zend' : 'zend/good',
|
||||
}
|
||||
modes = {
|
||||
'JitIR' : 'hhir',
|
||||
'Jit' : 'jit',
|
||||
'VM' : 'inperp',
|
||||
}
|
||||
|
||||
home = os.getenv('HPHP_HOME')
|
||||
root = os.getenv('FBMAKE_BIN_ROOT', home + '/_bin')
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print "%s [TestCodeRun|Quick|Zend][<blank>|Repo][VM|Jit|JitIR][-SubSuiteName]" % sys.argv[0]
|
||||
return
|
||||
|
||||
arg = sys.argv[1]
|
||||
for suite, dir in suites.items():
|
||||
if arg.startswith(suite):
|
||||
arg = arg.replace(suite, '')
|
||||
|
||||
repo = ''
|
||||
if arg.startswith('Repo'):
|
||||
arg = arg.replace('Repo', '')
|
||||
repo = '1'
|
||||
|
||||
for mode, vq in modes.items():
|
||||
if arg.startswith(mode):
|
||||
arg = arg.replace(mode, '')
|
||||
|
||||
subpath = ''
|
||||
if len(arg):
|
||||
if arg[0] == '-':
|
||||
subpath = '/' + camel_to_slash(arg[1:])
|
||||
else:
|
||||
raise Exception('Extra? "%s"' % arg)
|
||||
|
||||
env = {
|
||||
'REPO' : repo,
|
||||
'VQ' : vq,
|
||||
'TEST_PATH' : 'test/' + dir + subpath
|
||||
}
|
||||
print ' '.join([key + '=' + value for key, value in env.items()]) + 'tools/run_verify.sh'
|
||||
env.update(os.environ)
|
||||
subprocess.call('tools/run_verify.sh', env=env)
|
||||
return
|
||||
|
||||
raise Exception('Unknown mode "%s"' % arg)
|
||||
|
||||
os.chdir(home + '/hphp')
|
||||
cmd = sys.argv
|
||||
cmd[0] = root + '/hphp/test/test'
|
||||
subprocess.call(cmd)
|
||||
|
||||
def camel_to_slash(name):
|
||||
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1/\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1/\2', s1).lower()
|
||||
main()
|
||||
@@ -6,12 +6,13 @@ include_once $HPHP_HOME.'/hphp/test/fbmake_test_lib.php';
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (count($argv) != 5) {
|
||||
echo "usage: $argv[0] test-script interp|jit|hhir TEST_PATH FBMAKE_BIN_ROOT\n";
|
||||
if (count($argv) != 6) {
|
||||
echo "usage: $argv[0] test-script TEST_PATH interp|jit|hhir REPO_BOOLEAN FBMAKE_BIN_ROOT
|
||||
FBMAKE_BIN_ROOT\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$cmd = "VQ=$argv[2] TEST_PATH=$argv[3] FBMAKE_BIN_ROOT=$HPHP_HOME/$argv[4] " .
|
||||
$cmd = "TEST_PATH=$argv[2] VQ=$argv[3] REPO=$argv[4] FBMAKE_BIN_ROOT=$HPHP_HOME/$argv[5] " .
|
||||
"$HPHP_HOME/hphp/tools/$argv[1]";
|
||||
|
||||
loop_tests($cmd, function ($line) {
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário