add error log to sim output artifact

This commit is contained in:
Fabian Posch 2024-01-15 16:48:18 -05:00
parent f89df716b9
commit 2e7847050b
2 changed files with 14 additions and 1 deletions

View file

@ -300,7 +300,7 @@ class SimOutputArtifact: public Artifact {
*
* @return std::vector<testcase_t> Vector of all generated simulator output lines
*/
std::vector<std::string>& get_content() { return sim_log; };
std::pair<std::vector<std::string>&, std::vector<std::string>&> get_content() { return {sim_log, sim_err_log}; };
/**
@ -311,6 +311,14 @@ class SimOutputArtifact: public Artifact {
void add_log_output(std::string log_line);
/**
* @brief Add a error log line to the artifact
*
* @param log_line
*/
void add_err_output(std::string log_line);
/**
* @brief Returns the type of this artifact, which is SIM_OUTPUT.
*
@ -329,6 +337,7 @@ class SimOutputArtifact: public Artifact {
private:
std::vector<std::string> sim_log;
std::vector<std::string> sim_err_log;
};
};

View file

@ -42,4 +42,8 @@ void SimOutputArtifact::add_log_output(std::string log_line) {
this->sim_log.emplace_back(log_line);
}
void SimOutputArtifact::add_err_output(std::string log_line) {
this->sim_err_log.emplace_back(log_line);
}
}