removed output checks from data model and from implementation.
prepared to implement STD{IN,OUT,ERR} piping for subprocess execution. Hoping to maintain compatibility with curses dialogs.
This commit is contained in:
@@ -1,32 +1,15 @@
|
||||
#ifndef FTESTS_SPROC_H
|
||||
#define FTESTS_SPROC_H
|
||||
|
||||
#include "string"
|
||||
|
||||
|
||||
struct ExecutionInput {
|
||||
std::string executionString;
|
||||
// std::string STDIN;
|
||||
// std::vector<KeyValuePair> EnvironmentVariables;
|
||||
};
|
||||
|
||||
struct Execution {
|
||||
//input
|
||||
ExecutionInput input;
|
||||
|
||||
// output
|
||||
int return_code;
|
||||
|
||||
std::string STDOUT;
|
||||
std::string STDERR;
|
||||
};
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
// executes a subprocess and captures STDOUT, STDERR, and return code.
|
||||
// should be able to recieve path of binary to be executed as well as any parameters
|
||||
class Sproc {
|
||||
public:
|
||||
// call the object. returnvalue is enum representing external execution attempt not binary exit code
|
||||
static int execute( ExecutionInput input, Execution & output );
|
||||
static int execute( std::string input );
|
||||
};
|
||||
|
||||
#endif //FTESTS_SPROC_H
|
||||
|
||||
Reference in New Issue
Block a user