Comments and popen solution (commented)
[anna.git] / example / diameter / launcher / testing / TestStep.hpp
index aa2f575..1cb062d 100644 (file)
@@ -212,10 +212,11 @@ class TestStepCmd : public TestStep {
   bool a_threadRunning;
   bool a_threadDeprecated;
   int a_resultCode;
-  //std::string a_output;
+  std::string a_errorMsg;
+  //std::string a_output; // for POPEN
 
   public:
-    TestStepCmd(TestCase *testCase) : TestStep(testCase), a_threadRunning(false), a_threadDeprecated(false), a_resultCode(-2)/*, a_output("")*/ { a_type = Type::Cmd; }
+    TestStepCmd(TestCase *testCase) : TestStep(testCase), a_threadRunning(false), a_threadDeprecated(false), a_resultCode(-2)/*, a_output("")*/, a_errorMsg("") { a_type = Type::Cmd; }
 
     // setter & getters
     void setThreadRunning(bool running) throw() { a_threadRunning = running; }
@@ -225,7 +226,9 @@ class TestStepCmd : public TestStep {
 
     void setResultCode(int rc) throw() { a_resultCode = rc; }
     int getResultCode() const throw() { return a_resultCode; }
-    //void setOutput(const std::string &output) throw() { a_output = output; }
+    void setErrorMsg(const std::string &em) throw() { a_errorMsg = em; }
+    const std::string &getErrorMsg() const throw() { return a_errorMsg; }
+    //void appendOutput(const std::string &output) throw() { a_output += output; }
     //const std::string &getOutput() const throw() { return a_output; }
 
     void setScript(const std::string &script) throw() { a_script = script; }