Use PHP test framework for testing hphpd in sandbox server mode
commit736f997ba8827f2c9a374b53e075835ed609889e
authorHerman Venter <hermanv@fb.com>
Sat, 20 Jul 2013 00:22:25 +0000 (19 17:22 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 22 Jul 2013 18:34:06 +0000 (22 11:34 -0700)
tree2b77aad1a3965f02385fcda3a1344b9d3d3ccf0b
parent53c7d78eea3c85b072855f8085b6fc90ec468c56
Use PHP test framework for testing hphpd in sandbox server mode

Debugger tests that run hphp in non local mode (i.e. with the "-h some-server:some-port" option specified) currently use a clunky specialized C++ test harness that invokes PHP scripts that talk to the debugger client via the obsolete client API. This revision moves those tests to the new PHP only framework. The debugger client is now controlled by piping in commands, just like the other debugger tests. The main difference is that the debugger client is connected to a server instance and a separate PHP driver is used to load the server, load the client, and then load pages from the server so that the client can hit breakpoints. It also checks that the client can respond to ctrl-c by actually sending a SIGINT signal to the client process.
18 files changed:
hphp/runtime/base/program_functions.cpp
hphp/runtime/debugger/debugger_client.cpp
hphp/runtime/debugger/debugger_client.h
hphp/test/quick/debugger/hphpd.hdf
hphp/test/run
hphp/test/server/debugger/config/debugger-client.hdf [new file with mode: 0644]
hphp/test/server/debugger/config/debugger-server.hdf [new file with mode: 0644]
hphp/test/server/debugger/config/hphpd.hdf [new file with mode: 0644]
hphp/test/server/debugger/debugger/break1.php [new file with mode: 0644]
hphp/test/server/debugger/debugger/hello.php [new file with mode: 0644]
hphp/test/server/debugger/debugger/hphpd_startup.php [new file with mode: 0644]
hphp/test/server/debugger/debugger/sandbox_conf [new file with mode: 0644]
hphp/test/server/debugger/debugger/test1.in [new file with mode: 0644]
hphp/test/server/debugger/debugger/test1.php [new file with mode: 0644]
hphp/test/server/debugger/tests/runTest1.php [new file with mode: 0644]
hphp/test/server/debugger/tests/runTest1.php.expectf [new file with mode: 0644]
hphp/test/server/debugger/tests/test_base.php [new file with mode: 0644]
hphp/test/server/debugger/tests/test_base.php.skipif [new file with mode: 0644]