rename all the tests

After the "Great Test Refactor of 2013" these names didn't make sense.

After this diff, we now have 3 suites:

* Quick (old vm)
* Slow (old TestCodeRun)
* Zend

I like that Quick tests aren't in sub-suites and the Slow tests are. So that is a good litmus tests of what to put where.

I left all the old Makefile rules. I'll blow them up in a few weeks.

This diff is based on a simple unreviewable diff of

  $ mv test/vm test/quick
  $ mv test/tcr test/slow
Esse commit está contido em:
ptarjan
2013-04-15 13:49:47 -07:00
commit de Sara Golemon
commit 9db58086ac
82 arquivos alterados com 136 adições e 327 exclusões
+9 -6
Ver Arquivo
@@ -4,22 +4,25 @@ Tests are grouped into "suites". They are just directories. Suites can have
subdirectories if you want to group them even more. Running a suite will run
all sub-suites.
* vm - The most common. Put your test here by default.
* quick - The most common. Put your test here by default.
* slow - Slower full featured tests. Grouped into sub-suites.
* zend/good - Passing tests from Zend's suite.
* zend/bad - Failing tests from Zend. Fix these and move them to zend/good.
* vm-perf - Some performance tests that aren't commonly run.
* tcr - The HPHPc TestCodeRun tests.
# Examples how to run them
* VM suite with the JIT on -
`test/run test/vm`
* Quick suite with the JIT on -
`test/run test/quick`
* Zend tests just with the interpreter in RepoAuthoritative mode -
`test/run test/zend/good interp 1`
* TCR tests with the JIT in IR mode -
`test/run test/tcr hhir`
* Slow tests with the JIT in IR mode -
`test/run test/slow hhir`
* Run evertyhing that is supposed to pass -
`fbmake runtests`
# File Layout
-98
Ver Arquivo
@@ -1,98 +0,0 @@
# This should be essentially the same as reqonce.php,
# except using the ReqDoc opcode instead.
.main {
FPushCtorD 0 "TestClass"
FCall 0
PopR
FPushObjMethodD 0 "testwithctx"
FCall 0
PopR
FPushFuncD 0 "testnoctx"
FCall 0
PopR
Int 1
RetC
}
.function testnoctx {
String "testing from anonymous context\n"
Print
PopC
String "testvar set before Req? "
Print
PopC
IssetL $testvar
Print
PopC
String "\n"
Print
PopC
String "reqtests/mod.inc"
Req
PopC
String "testvar set after Req? "
Print
PopC
IssetL $testvar
Print
PopC
String "\n"
Print
PopC
Null
RetC
}
.class TestClass {
.property [private] var = """s:5:"hello";""";
.method [public] 86ctor {
Null
RetC
}
.method [public] testwithctx {
String "value of var before ReqDoc: "
This
CGetM <C PT:"var">
Concat
String "\n"
Concat
Print
PopC
String "test/vm/reqtests/mod.inc"
ReqDoc
PopC
String "value of var after ReqDoc: "
This
CGetM <C PT:"var">
Concat
String "\n"
Concat
Print
PopC
String "testvar set after ReqDoc? "
Print
PopC
IssetL $testvar
Print
PopC
String "\n"
Print
PopC
Null
RetC
}
}
-9
Ver Arquivo
@@ -1,9 +0,0 @@
value of var before ReqDoc: hello
in mod.php
this->var was set; changing it.
value of var after ReqDoc: hello more
testvar set after ReqDoc? 1
testing from anonymous context
testvar set before Req?
in mod.php
testvar set after Req? 1
+3 -3
Ver Arquivo
@@ -1,8 +1,8 @@
array(3) {
[0]=>
string(24) "test/vm/fb_dbt.php@11@h@"
string(27) "test/quick/fb_dbt.php@11@h@"
[1]=>
string(27) "test/vm/fb_dbt.php@82@C::f@"
string(30) "test/quick/fb_dbt.php@82@C::f@"
[2]=>
string(24) "test/vm/fb_dbt.php@84@g@"
string(27) "test/quick/fb_dbt.php@84@g@"
}
+5 -8
Ver Arquivo
@@ -1,13 +1,10 @@
#!/bin/bash
#
# Run the verify_quick test suite in various configurations.
# Run the test suites in various configurations.
#
# Main interface is controlled by the VQ env var:
#
# VQ=jit ./run_verify.sh
# VQ=hhir ./run_verify.sh
# VQ=interp ./run_verify.sh
# ./run_verify.sh # default runs the jit
# The first param is the directory or file to run.
# The second param is jit, hhir, or interp.
# The third param is a boolean if we should use repo mode or not.
#
# Server mode flags: (semi-functional--tests with warnings fail)
#
@@ -54,7 +51,7 @@ fi
: ${VERIFY_HHBC:=$DEFAULT_VERIFY_HHBC}
: ${VQ:=jit}
: ${REPO:=0}
: ${TEST_PATH:=test/vm}
: ${TEST_PATH:=test/quick}
cd $HPHP_HOME/hphp
-1
Ver Arquivo
@@ -1 +0,0 @@
HipHop Fatal error: syntax error, unexpected T_STRING in /data/users/ptarjan/hphp/hphp/test/tcr/compilation/1238.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: syntax error, unexpected T_STRING in %s/hphp/test/slow/compilation/1238.php on line 3
-1
Ver Arquivo
@@ -1 +0,0 @@
HipHop Fatal error: Argument 1 passed to X::bar() must be an instance of X, null given in /data/users/ptarjan/hphp/hphp/test/tcr/compilation/1321.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Argument 1 passed to X::bar() must be an instance of X, null given in %s/hphp/test/slow/compilation/1321.php on line 3
@@ -1,6 +0,0 @@
float(3.1415926535898)
float(3.1415926535898)
float(3.1415926535898)
string(110) "Linux devbig024.prn1.facebook.com 2.6.38.4-63_fbk25_00157_gcb00324 #63 SMP Mon Feb 13 16:22:45 PST 2012 x86_64"
int(1)
int(2)
@@ -0,0 +1,6 @@
float(3.1415926535898)
float(3.1415926535898)
float(3.1415926535898)
string(%d) "%s"
int(1)
int(2)
-3
Ver Arquivo
@@ -1,3 +0,0 @@
string(12) "test1:Caught"
string(12) "test2:Caught"
HipHop Fatal error: Cls: Expected string or object in /data/users/ptarjan/hphp/hphp/test/tcr/exceptions/65.php on line 3
+3
Ver Arquivo
@@ -0,0 +1,3 @@
string(12) "test1:Caught"
string(12) "test2:Caught"
HipHop Fatal error: Cls: Expected string or object in %s/hphp/test/slow/exceptions/65.php on line 3
+18 -18
Ver Arquivo
@@ -4,12 +4,12 @@ string(7) "symlink"
string(3) "dir"
string(5) "empty"
BEGIN: file
1365751382
1365834782
file
file
100
453050386
1365751382
453935113
1365834782
2618
33188
3
@@ -22,12 +22,12 @@ file
1
END
BEGIN: symlink
1365751382
1365834782
symlink
symlink
100
453050386
1365751382
453935113
1365834782
2618
33188
3
@@ -40,12 +40,12 @@ link
1
END
BEGIN: empty
1365751382
1365834782
empty
empty
100
453050385
1365751382
453935110
1365834782
2618
33188
0
@@ -58,13 +58,13 @@ file
1
END
file
1365751382
1365834782
file
file
file
100
453050386
1365751382
453935113
1365834782
2618
33188
3
@@ -75,13 +75,13 @@ file
1
1
symlink
1365751382
1365834782
symlink
symlink
symlink
100
453050386
1365751382
453935113
1365834782
2618
33188
3
@@ -92,13 +92,13 @@ link
1
1
empty
1365751382
1365834782
empty
empty
empty
100
453050385
1365751382
453935110
1365834782
2618
33188
0
-14
Ver Arquivo
@@ -1,14 +0,0 @@
/data/users/ptarjan/hphp/hphp/test/sample_dirstring(4) "file"
string(4) "file"
Last changed at 12:23 amint(100)
int(453050386)
int(1365751382)
int(2618)
int(33188)
int(3)
string(4) "file"
bool(false)
bool(true)
bool(false)
bool(true)
bool(true)
+14
Ver Arquivo
@@ -0,0 +1,14 @@
%s/hphp/test/sample_dirstring(4) "file"
string(4) "file"
Last changed at 11:33 pmint(100)
int(453935113)
int(1365834782)
int(2618)
int(33188)
int(3)
string(4) "file"
bool(false)
bool(true)
bool(false)
bool(true)
bool(true)
-13
Ver Arquivo
@@ -1,13 +0,0 @@
string(45) "/data/users/ptarjan/hphp/hphp/test/sample_dir"
string(4) "test"
string(15) "test/sample_dir"
string(45) "/data/users/ptarjan/hphp/hphp/test/sample_dir"
string(4) "test"
string(15) "test/sample_dir"
string(45) "/data/users/ptarjan/hphp/hphp/test/sample_dir"
string(19) "test/sample_dir//.."
string(30) "test/sample_dir//../sample_dir"
string(4) "file"
string(50) "/data/users/ptarjan/hphp/hphp/test/sample_dir/file"
string(45) "/data/users/ptarjan/hphp/hphp/test/sample_dir"
string(53) "/data/users/ptarjan/hphp/hphp/test/sample_dir/symlink"
+13
Ver Arquivo
@@ -0,0 +1,13 @@
string() "%s/hphp/test/sample_dir"
string(4) "test"
string(15) "test/sample_dir"
string() "%s/hphp/test/sample_dir"
string(4) "test"
string(15) "test/sample_dir"
string() "%s/hphp/test/sample_dir"
string(19) "test/sample_dir//.."
string(30) "test/sample_dir//../sample_dir"
string(4) "file"
string() "%s/hphp/test/sample_dir/file"
string() "%s/hphp/test/sample_dir"
string() "%s/hphp/test/sample_dir/symlink"
@@ -1,5 +0,0 @@
NULL
NULL
NULL
NULL
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/701.php on line 3
@@ -0,0 +1,5 @@
NULL
NULL
NULL
NULL
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/701.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/702.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/702.php on line 3
@@ -1,3 +0,0 @@
NULL
NULL
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/703.php on line 3
@@ -0,0 +1,3 @@
NULL
NULL
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/703.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/704.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/704.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/705.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/705.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/706.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/706.php on line 3
@@ -1,3 +0,0 @@
NULL
NULL
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/707.php on line 3
@@ -0,0 +1,3 @@
NULL
NULL
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/707.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/708.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/708.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/709.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/709.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/710.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/710.php on line 3
@@ -1,3 +0,0 @@
NULL
NULL
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/711.php on line 3
@@ -0,0 +1,3 @@
NULL
NULL
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/711.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/712.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/712.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/713.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/713.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/714.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/714.php on line 3
@@ -1,5 +0,0 @@
bool(false)
bool(false)
bool(true)
bool(true)
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/715.php on line 3
@@ -0,0 +1,5 @@
bool(false)
bool(false)
bool(true)
bool(true)
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/715.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access property started with '\\0' in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/716.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access property started with '\\0' in %s/hphp/test/slow/object_property/716.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/717.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/717.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot access empty property in /data/users/ptarjan/hphp/hphp/test/tcr/object_property/718.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot access empty property in %s/hphp/test/slow/object_property/718.php on line 3
@@ -1,7 +0,0 @@
object(Z)#1 (2) {
["priv":"Y":private]=>
NULL
["priv"]=>
int(1)
}
HipHop Fatal error: Cannot access private property Y::$priv in /data/users/ptarjan/hphp/hphp/test/tcr/object_property_expression/801.php on line 3
@@ -0,0 +1,7 @@
object(Z)#1 (2) {
["priv":"Y":private]=>
NULL
["priv"]=>
int(1)
}
HipHop Fatal error: Cannot access private property Y::$priv in %s/hphp/test/slow/object_property_expression/801.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1490.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1490.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1491.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1491.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1492.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1492.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1493.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1493.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1494.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1494.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1495.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1495.php on line 3
@@ -1 +0,0 @@
HipHop Fatal error: Cannot re-assign $this in /data/users/ptarjan/hphp/hphp/test/tcr/reassign_this/1496.php on line 3
@@ -0,0 +1 @@
HipHop Fatal error: Cannot re-assign $this in %s/hphp/test/slow/reassign_this/1496.php on line 3
-1
Ver Arquivo
@@ -1 +0,0 @@
HipHop Fatal error: syntax error, unexpected T_STRICT_ERROR, expecting $end in /data/users/ptarjan/hphp/hphp/test/tcr/strict_mode/2203.php on line 1
@@ -0,0 +1 @@
HipHop Fatal error: syntax error, unexpected T_STRICT_ERROR, expecting $end in %s/hphp/test/slow/strict_mode/2203.php on line 1
-1
Ver Arquivo
@@ -1 +0,0 @@
HipHop Fatal error: syntax error, unexpected T_STRICT_ERROR, expecting $end in /data/users/ptarjan/hphp/hphp/test/tcr/strict_mode/2204.php on line 2
@@ -0,0 +1 @@
HipHop Fatal error: syntax error, unexpected T_STRICT_ERROR, expecting $end in %s/hphp/test/slow/strict_mode/2204.php on line 2
-1
Ver Arquivo
@@ -1 +0,0 @@
HipHop Fatal error: Argument 1 passed to t() must be an instance of X, int given in /data/users/ptarjan/hphp/hphp/test/tcr/strict_mode/2205.php on line 2
@@ -0,0 +1 @@
HipHop Fatal error: Argument 1 passed to t() must be an instance of X, int given in %s/hphp/test/slow/strict_mode/2205.php on line 2
-1
Ver Arquivo
@@ -1 +0,0 @@
HipHop Fatal error: cannot use 'static' as access modifier in /data/users/ptarjan/hphp/hphp/test/tcr/traits/2080.php on line 3
+1
Ver Arquivo
@@ -0,0 +1 @@
HipHop Fatal error: cannot use 'static' as access modifier in %s/hphp/test/slow/traits/2080.php on line 3
+5 -5
Ver Arquivo
@@ -146,11 +146,11 @@ static bool verify_result(const char *input, const char *output, bool perfMode,
if (Option::EnableEval < Option::FullEval) {
if (fastMode) {
string path = dir + "libtest.so";
const char *argv[] = {"", "--file=string", "--config=test/tcr/config.hdf",
const char *argv[] = {"", "--file=string", "--config=test/slow/config.hdf",
repoarg.c_str(), path.c_str(), nullptr};
Process::Exec("runtime/tmp/run.sh", argv, nullptr, actual, &err);
} else {
const char *argv[] = {"", "--file=string", "--config=test/tcr/config.hdf",
const char *argv[] = {"", "--file=string", "--config=test/slow/config.hdf",
repoarg.c_str(), nullptr};
string path = dir + "test";
Process::Exec(path.c_str(), argv, nullptr, actual, &err);
@@ -165,7 +165,7 @@ static bool verify_result(const char *input, const char *output, bool perfMode,
string jit_rename = string("-vEval.JitEnableRenameFunction=") +
(RuntimeOption::EvalJit ? "true" : "false");
const char *argv[] = {"", filearg.c_str(),
"--config=test/tcr/config.hdf",
"--config=test/slow/config.hdf",
repoarg.c_str(),
jitarg.c_str(),
jit_use_ir.c_str(),
@@ -13936,7 +13936,7 @@ bool TestCodeRun::TestReflectionClasses() {
"var_dump($rf->isClosure()); "
"var_dump($rf->isGenerator()); "
,
"test/vm/reflection_isclosure.php.expect"
"test/quick/reflection_isclosure.php.expect"
);
}
@@ -31469,7 +31469,7 @@ bool TestCodeRun::TestTraits() {
"$x = new D(); $x->useB(); echo serialize($x), \"\\n\";"
"$x = new D(); $x->useC(); echo serialize($x), \"\\n\";"
"$x = new D(); $x->useD(); echo serialize($x), \"\\n\";",
"test/tcr/traits/2061.php.expect");
"test/slow/traits/2061.php.expect");
MVCRO("<?php\n"
"trait T1 { public $xT1 = 'xT1'; }\n"
-84
Ver Arquivo
@@ -1,84 +0,0 @@
#!/bin/env python
from glob import glob
import re
import os
import shutil
def main():
prefix = 'runtime/tmp/TestCodeRunVM/Test'
for path in glob(prefix + '*'):
suite = camel_to_underscore(path.replace(prefix, ''))
suite_path = 'test/tcr/' + suite + '/'
mkdir_p(suite_path)
for test in glob(path + '/*'):
if not 'tcr-' in test:
continue
# I don't have a better name
name = re.sub('.*tcr-', '', test)
file_prefix = suite_path + name
print file_prefix
for f in glob(file_prefix + '*'):
if os.path.isdir(f):
shutil.rmtree(f)
else:
os.remove(f)
file(file_prefix + '.php', 'w').write(
re.sub(r'# hphp/test/test_code_run.cpp:\d+', '', file(test + '/main.php').read())
)
shutil.copyfile(test + '/test.exp', file_prefix + '.php.expect')
if os.path.exists(test + '/test.opts'):
opts = file(test + '/test.opts').read().strip()
if opts == '-vEval.EnableHipHopSyntax=1':
os.symlink('../hiphop.opts', file_prefix + '.php.opts')
elif opts == '-vEval.EnableXHP=1':
os.symlink('../xhp.opts', file_prefix + '.php.opts')
elif opts == '-vEval.JitEnableRenameFunction=true':
os.symlink('../rename_functions.opts', file_prefix + '.php.opts')
elif opts == '-vServer.APC.AllowObject=1':
os.symlink('../allow_object.opts', file_prefix + '.php.opts')
elif opts == '-vServer.APC.AllowObject=0':
os.symlink('../disallow_object.opts', file_prefix + '.php.opts')
elif opts == '-vEval.EnableHipHopSyntax=1\n-vEval.JitEnableRenameFunction=true':
os.symlink('../hiphop_and_rename.opts', file_prefix + '.php.opts')
else:
raise Exception("unknown opt %s" % repr(opts))
if os.path.exists(test + '/build.opts'):
opts = file(test + '/build.opts').read().strip()
if opts == '-vEnableHipHopSyntax=1':
os.symlink('../hiphop.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vEnableXHP=1':
os.symlink('../xhp.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vCopyProp=1\n-vEnableHipHopSyntax=1':
os.symlink('../hiphop_and_copy_prop.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vAllDynamic=1':
os.symlink('../all_dynamic.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vAllDynamic=1\n-v DynamicMethodPrefix.*=_':
os.symlink('../all_dynamic_and_dynamic_method.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vLocalCopyProp=0 -vEliminateDeadCode=0':
os.symlink('../copy_prop_and_no_dead_code.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vAutoInline=5':
os.symlink('../auto_inline_5.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vAutoInline=5\n-vEnableHipHopSyntax=1':
os.symlink('../hiphop_and_auto_inline_5.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vEnableHipHopSyntax=1\n-vArrayAccessIdempotent=1':
os.symlink('../hiphop_and_array_access_idempotent.hphp_opts', file_prefix + '.php.hphp_opts')
elif opts == '-vDynamicInvokeFunctions.*=test1 -vDynamicInvokeFunctions.*=test2':
os.symlink('../dynamic_invoke_functions_test_1_and_2.hphp_opts', file_prefix + '.php.hphp_opts')
else:
raise Exception("unknown hphp opt %s" % repr(opts))
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
pass
def camel_to_underscore(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()
+5 -5
Ver Arquivo
@@ -1,8 +1,8 @@
#!/bin/env python
#
# Helper for running hphp/test in fbconfig builds.
# Helper for running hphp/test in fbconfig builds. Examples:
#
# ./run_test.py TestCodeRunVM
# ./run_test.py SlowVM
# ./run_test.py QuickRepoJit
# ./run_test.py ZendJitIR
#
@@ -17,8 +17,8 @@ import subprocess
import sys
suites = {
'TestCodeRun' : 'tcr',
'Quick' : 'vm',
'Slow' : 'slow',
'Quick' : 'quick',
'Zend' : 'zend/good',
}
modes = {
@@ -32,7 +32,7 @@ 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]
print "%s [Quick|Slow|Zend][<blank>|Repo][VM|Jit|JitIR][-SubSuiteName]" % sys.argv[0]
return
arg = sys.argv[1]
+3 -3
Ver Arquivo
@@ -17,18 +17,18 @@ PARSE_SKIP='dv_i0.php strict_bad_end.php strict_bad_start.php \
strict_numbers.php syntax-error.php xhp-malformed.php Xhp.php \
trailing_comma_bad1.php trailing_comma_bad2.php trailing_comma_bad3.php \
trailing_comma_bad4.php trailing_comma_bad5.php trailing_comma_bad6.php'
PARSE_SKIP="$PARSE_SKIP $(cd test/vm && ls parse_fail_*.php)"
PARSE_SKIP="$PARSE_SKIP $(cd test/quick && ls parse_fail_*.php)"
######################################################################
skip_list=
for x in $PARSE_SKIP ; do
skip_list="$skip_list test/vm/$x"
skip_list="$skip_list test/quick/$x"
done
qtests=$(comm -23 \
<(find test/vm -maxdepth 1 -name \*.php | sort) \
<(find test/quick -maxdepth 1 -name \*.php | sort) \
<(echo $skip_list|sed -e 's/ /\n/g'|sort))
cmd="$PARSE_TEST --verify %1\$s/%3\$s"