Moved AppRunner.*, PipedAppRunner.* and CommonTestApp.* to src/tests/kits/app/common, since they are not longer only used by the BApplication tests.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@615 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-08-06 22:07:59 +00:00
parent 98044aa821
commit cb19e5d278
7 changed files with 12 additions and 3 deletions

View File

@ -16,19 +16,22 @@
static const char *kAppRunnerTeamPort = "app runner team port";
// constructor
AppRunner::AppRunner()
AppRunner::AppRunner(bool requestQuitOnDestruction)
: fOutputLock(),
fRemotePort(-1),
fOutput(),
fReader(-1),
fTeam(-1),
fMessenger()
fMessenger(),
fRequestQuitOnDestruction(requestQuitOnDestruction)
{
}
// destructor
AppRunner::~AppRunner()
{
if (fRequestQuitOnDestruction)
WaitFor(true);
if (fReader >= 0) {
int32 result;
wait_for_thread(fReader, &result);

View File

@ -10,7 +10,7 @@
class AppRunner {
public:
AppRunner();
AppRunner(bool requestQuitOnDestruction = false);
~AppRunner();
status_t Run(const char *command, const char *args = NULL,
@ -39,6 +39,7 @@ private:
thread_id fReader;
team_id fTeam;
BMessenger fMessenger;
bool fRequestQuitOnDestruction;
static port_id fTeamPort;
static BLocker fTeamPortLock;

View File

@ -0,0 +1,5 @@
SubDir OBOS_TOP src tests kits app common ;
TestObjects CommonTestApp.cpp : app support ;
TestObjects CommonTestApp.cpp : : true ;