summaryrefslogtreecommitdiff
diff options
authorGiuseppe Scrivano <[email protected]>2012-04-14 16:00:17 +0200
committerGiuseppe Scrivano <[email protected]>2012-04-14 16:00:17 +0200
commitc20bcdc07a46b0585dce426578f4ee40a88c88d0 (patch)
tree85596a7126b000444acd2817557ba2f683d1c459
parentdcf7f984458ccf7551ecd2271379832a48614b37 (diff)
downloadmyserver-master.tar.gz
test_fork_server: check for return code immediatelyHEADmaster
-rw-r--r--myserver/tests/test_fork_server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/myserver/tests/test_fork_server.cpp b/myserver/tests/test_fork_server.cpp
index f4b19caf..3ef130ea 100644
--- a/myserver/tests/test_fork_server.cpp
+++ b/myserver/tests/test_fork_server.cpp
@@ -1,6 +1,6 @@
/*
MyServer
- Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
@@ -89,6 +89,8 @@ public:
spi.stdError = -1;
spi.stdOut = pipe.getWriteHandle ();
+ CPPUNIT_ASSERT_EQUAL (ret, 0);
+
if (!FilesUtility::nodeExists ("/bin/echo"))
return;
@@ -100,8 +102,6 @@ public:
ret = fs->executeProcess (&spi, ForkServer::FLAG_USE_OUT, &pid, &port);
pipe.closeWrite ();
- CPPUNIT_ASSERT_EQUAL (ret, 0);
-
ret = pipe.read (buffer, 32, &nbr);
CPPUNIT_ASSERT_EQUAL (ret, 0);