Skip to content

Commit 337927d

Browse files
adamryczkowskihavogt
authored andcommitted
Patch to support other archive formats (#18)
1 parent 7d38b91 commit 337927d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/verification/main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace gt_verification {
1212

1313
template < typename Environment >
14-
int gridtools_verification_main(int argc, char *argv[], std::string data_name) {
14+
int gridtools_verification_main(int argc, char *argv[], std::string data_name, const std::string archive_type="Binary") {
1515
// Pass command line arguments to googletest
1616
testing::InitGoogleTest(&argc, argv);
1717

@@ -28,7 +28,7 @@ namespace gt_verification {
2828
error::fatal("benchmark specification (--benchmark) in unittest executable");
2929

3030
// Register test environment
31-
Environment::instance_ = (Environment *)testing::AddGlobalTestEnvironment(new Environment(cl, data_name));
31+
Environment::instance_ = (Environment *)testing::AddGlobalTestEnvironment(new Environment(cl, data_name, archive_type));
3232

3333
// Run all tests
3434
int ret = RUN_ALL_TESTS();

src/verification/unittest_environment.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ namespace gt_verification {
1616
private boost::noncopyable /* singleton */
1717
{
1818
public:
19-
unittest_environment(command_line &cl, std::string data_name) : cl_(cl), data_path_("./") {
19+
unittest_environment(command_line &cl, std::string data_name, std::string archive_type="Binary") : cl_(cl), data_path_("./") {
2020
if (cl_.has("path"))
2121
data_path_ = cl_.as< std::string >("path");
2222

2323
VERIFICATION_LOG() << "Using serializer data-path: '" << data_path_ << "'" << logger_action::endl;
2424

2525
// Initialize the serializer
26-
reference_serializer_ = std::make_shared< ser::serializer >(ser::open_mode::Read, data_path_, data_name);
26+
reference_serializer_ = std::make_shared< ser::serializer >(ser::open_mode::Read, data_path_, data_name, archive_type);
2727

2828
// Initialize error serializer
2929
error_serializer_ = std::make_shared< ser::serializer >(ser::open_mode::Write, ".", "Error");

0 commit comments

Comments
 (0)