blob: 4cd73adb539ba66d75392c7ab0917b02ced3be61 [file]
#ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_
#define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_
#include <string>
#include "absl/status/statusor.h"
namespace milotic_tlbmc {
// Abstract class for executing shell commands.
// This allows for swapping out the real implementation with a mock in tests.
class CommandExecutor {
public:
virtual ~CommandExecutor() = default;
virtual absl::StatusOr<std::string> Execute(const std::string& command,
bool ignore_error) const = 0;
};
} // namespace milotic_tlbmc
#endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_