tests: allow catching errors from YangAccess' commit
Change-Id: Ifb43fc29c39a4b3368fc0bf74e89297dffc1f8e1
diff --git a/tests/datastore_access.cpp b/tests/datastore_access.cpp
index db477e9..e32076c 100644
--- a/tests/datastore_access.cpp
+++ b/tests/datastore_access.cpp
@@ -106,7 +106,9 @@
of << dump(DataFormat::Xml);
}
auto command = std::string(sysrepocfgExecutable) + " --import=" + testConfigFile + " --format=xml --datastore=running --module=example-schema";
- REQUIRE(std::system(command.c_str()) == 0);
+ if (std::system(command.c_str())) {
+ throw std::runtime_error{"sysrepocfg import failed"};
+ }
}
};
#endif