Commit 778bd1be authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[master] fix compiler warn error in test

result value of system() was unused. And if we're catching it anyway, might as well error on it if the command failed.
reviewed on jabber
parent 255bf5b1
......@@ -431,9 +431,16 @@ class SQLite3Update : public SQLite3AccessorTest {
protected:
SQLite3Update() {
// Note: if "installing" the test file fails some of the subsequent
// tests will fail and we should be able to notice that.
system(INSTALL_PROG " " TEST_DATA_DIR
"/test.sqlite3 " TEST_DATA_BUILDDIR "/test.sqlite3.copied");
// tests would fail.
const char *install_cmd = INSTALL_PROG " " TEST_DATA_DIR
"/test.sqlite3 " TEST_DATA_BUILDDIR
"/test.sqlite3.copied";
if (system(install_cmd) != 0) {
// any exception will do, this is failure in test setup, but nice
// to show the command that fails, and shouldn't be caught
isc_throw(isc::Exception,
"Error setting up; command failed: " << install_cmd);
};
initAccessor(TEST_DATA_BUILDDIR "/test.sqlite3.copied", RRClass::IN());
zone_id = accessor->getZone("example.com.").second;
another_accessor.reset(new SQLite3Accessor(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment