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:
parent
98044aa821
commit
cb19e5d278
@ -16,19 +16,22 @@
|
|||||||
static const char *kAppRunnerTeamPort = "app runner team port";
|
static const char *kAppRunnerTeamPort = "app runner team port";
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
AppRunner::AppRunner()
|
AppRunner::AppRunner(bool requestQuitOnDestruction)
|
||||||
: fOutputLock(),
|
: fOutputLock(),
|
||||||
fRemotePort(-1),
|
fRemotePort(-1),
|
||||||
fOutput(),
|
fOutput(),
|
||||||
fReader(-1),
|
fReader(-1),
|
||||||
fTeam(-1),
|
fTeam(-1),
|
||||||
fMessenger()
|
fMessenger(),
|
||||||
|
fRequestQuitOnDestruction(requestQuitOnDestruction)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
AppRunner::~AppRunner()
|
AppRunner::~AppRunner()
|
||||||
{
|
{
|
||||||
|
if (fRequestQuitOnDestruction)
|
||||||
|
WaitFor(true);
|
||||||
if (fReader >= 0) {
|
if (fReader >= 0) {
|
||||||
int32 result;
|
int32 result;
|
||||||
wait_for_thread(fReader, &result);
|
wait_for_thread(fReader, &result);
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
class AppRunner {
|
class AppRunner {
|
||||||
public:
|
public:
|
||||||
AppRunner();
|
AppRunner(bool requestQuitOnDestruction = false);
|
||||||
~AppRunner();
|
~AppRunner();
|
||||||
|
|
||||||
status_t Run(const char *command, const char *args = NULL,
|
status_t Run(const char *command, const char *args = NULL,
|
||||||
@ -39,6 +39,7 @@ private:
|
|||||||
thread_id fReader;
|
thread_id fReader;
|
||||||
team_id fTeam;
|
team_id fTeam;
|
||||||
BMessenger fMessenger;
|
BMessenger fMessenger;
|
||||||
|
bool fRequestQuitOnDestruction;
|
||||||
|
|
||||||
static port_id fTeamPort;
|
static port_id fTeamPort;
|
||||||
static BLocker fTeamPortLock;
|
static BLocker fTeamPortLock;
|
5
src/tests/kits/app/common/Jamfile
Normal file
5
src/tests/kits/app/common/Jamfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
SubDir OBOS_TOP src tests kits app common ;
|
||||||
|
|
||||||
|
TestObjects CommonTestApp.cpp : app support ;
|
||||||
|
TestObjects CommonTestApp.cpp : : true ;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user