|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
#include <iomanip> |
|
|
|
|
#include <fstream> |
|
|
|
|
#include <fmt/core.h> |
|
|
|
|
#include <fmt/chrono.h> |
|
|
|
|
#include <regex> |
|
|
|
|
#include <string> |
|
|
|
|
#include <iterator> |
|
|
|
@ -114,8 +115,7 @@ void run_build(const char* command) { |
|
|
|
|
char buffer[BUF_MAX]; // BUF_MAX is a define already?
|
|
|
|
|
ofstream stats_out; |
|
|
|
|
stats_out.open("stats.csv", ios::out | ios::app); |
|
|
|
|
auto t = time(nullptr); |
|
|
|
|
auto tm = *std::gmtime(&t); |
|
|
|
|
std::time_t tstamp = std::time(nullptr); |
|
|
|
|
|
|
|
|
|
dbc::check(stats_out.good(), "Error opening stats.csv file."); |
|
|
|
|
dbc::pre("simple test", [&]() { return stats_out.good(); }); |
|
|
|
@ -136,13 +136,12 @@ void run_build(const char* command) { |
|
|
|
|
string type = err[4].str(); |
|
|
|
|
string message = err[5].str(); |
|
|
|
|
|
|
|
|
|
stats_out << put_time(&tm, "%FT%TZ"); |
|
|
|
|
string result = format(",{},{},{},{},{}\n", file_name, lnumber, col, type, message); |
|
|
|
|
string result = format("{:%FT%T},{},{},{},{},{}\n", |
|
|
|
|
fmt::localtime(tstamp), file_name, |
|
|
|
|
lnumber, col, type, message); |
|
|
|
|
|
|
|
|
|
stats_out << result; |
|
|
|
|
cout << "MATCHED: " << quoted(result); |
|
|
|
|
} else { |
|
|
|
|
//println("NOT MATCHED! {}", line);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|