master - test: Write a results/list at the end of a test run.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fa46385164e971d998ef89f20162fe547efeaea0 Commit: fa46385164e971d998ef89f20162fe547efeaea0 Parent: bf1693786905777d0ad0857797fe742889eebcd4 Author: Petr Rockai <[email protected]> AuthorDate: Thu Jun 26 01:11:19 2014 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Thu Feb 5 13:47:17 2015 +0100
test: Write a results/list at the end of a test run.
--- test/lib/journal.h | 8 ++++++-- test/lib/runner.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-)
test/lib/journal.h +6 -2
@@ -62,11 +62,15 @@ struct Journal { std::string location_tmp, location; -void sync () { - std::ofstream of( location_tmp.c_str() ); + void write( std::string path ) { + std::ofstream of( path.c_str() ); for ( Status::iterator i = status.begin(); i != status.end(); ++i ) of << i->first << " " << i->second << std::endl; of.close (); + } + +void sync () { +write ( location_tmp );rename ( location_tmp.c_str (), location.c_str () ); }
test/lib/runner.cpp +1 -0
@@ -315,6 +315,7 @@ struct Main { } journal.banner(); + journal.write( options.outdir + "/list" ); if ( die || fatal_signal ) exit( 1 ); }