1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-04-01 18:50:41 +03:00

test: Write a results/list at the end of a test run.

This commit is contained in:
Petr Rockai 2014-06-26 01:11:19 +02:00
parent bf16937869
commit fa46385164
2 changed files with 7 additions and 2 deletions

View File

@ -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() );
}

View File

@ -315,6 +315,7 @@ struct Main {
}
journal.banner();
journal.write( options.outdir + "/list" );
if ( die || fatal_signal )
exit( 1 );
}