Skip to content
Snippets Groups Projects
Commit 097dd607 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #8586: don't restore and save test files

This breaks make distcheck, and hides serialization regressions.
parent beb9debc
No related branches found
No related tags found
No related merge requests found
...@@ -35,23 +35,8 @@ ...@@ -35,23 +35,8 @@
#include "logger.h" #include "logger.h"
#include "constants.h" #include "constants.h"
namespace {
void restore()
{
if (system("mv " HISTORY_SAMPLE_BAK " " HISTORY_SAMPLE) < 0)
ERROR("Restoration of %s failed", HISTORY_SAMPLE);
}
void backup()
{
if (system("cp " HISTORY_SAMPLE " " HISTORY_SAMPLE_BAK) < 0)
ERROR("Backup of %s failed", HISTORY_SAMPLE);
}
}
void HistoryTest::setUp() void HistoryTest::setUp()
{ {
backup();
history_ = new History; history_ = new History;
history_->setPath(HISTORY_SAMPLE); history_->setPath(HISTORY_SAMPLE);
} }
...@@ -98,5 +83,4 @@ void HistoryTest::test_get_serialized() ...@@ -98,5 +83,4 @@ void HistoryTest::test_get_serialized()
void HistoryTest::tearDown() void HistoryTest::tearDown()
{ {
delete history_; delete history_;
restore();
} }
...@@ -40,19 +40,6 @@ ...@@ -40,19 +40,6 @@
#include <cppunit/extensions/TestFactoryRegistry.h> #include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TextTestRunner.h> #include <cppunit/ui/text/TextTestRunner.h>
namespace {
void restore()
{
if (system("mv " CONFIG_SAMPLE_BAK " " CONFIG_SAMPLE) < 0)
ERROR("Restoration of %s failed", CONFIG_SAMPLE);
}
void backup()
{
if (system("cp " CONFIG_SAMPLE " " CONFIG_SAMPLE_BAK) < 0)
ERROR("Backup of %s failed", CONFIG_SAMPLE);
}
}
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
printf("\nSFLphone Daemon Test Suite, by Savoir-Faire Linux 2004-2010\n\n"); printf("\nSFLphone Daemon Test Suite, by Savoir-Faire Linux 2004-2010\n\n");
...@@ -106,7 +93,6 @@ int main(int argc, char* argv[]) ...@@ -106,7 +93,6 @@ int main(int argc, char* argv[])
} }
printf("\n\n=== SFLphone initialization ===\n\n"); printf("\n\n=== SFLphone initialization ===\n\n");
backup();
Manager::instance().init(CONFIG_SAMPLE); Manager::instance().init(CONFIG_SAMPLE);
// Get the top level suite from the registry // Get the top level suite from the registry
...@@ -115,7 +101,6 @@ int main(int argc, char* argv[]) ...@@ -115,7 +101,6 @@ int main(int argc, char* argv[])
if (suite->getChildTestCount() == 0) { if (suite->getChildTestCount() == 0) {
ERROR("Invalid test suite name: %s", testSuiteName.c_str()); ERROR("Invalid test suite name: %s", testSuiteName.c_str());
restore();
return 1; return 1;
} }
...@@ -139,7 +124,5 @@ int main(int argc, char* argv[]) ...@@ -139,7 +124,5 @@ int main(int argc, char* argv[])
printf("=== Test suite terminate ===\n"); printf("=== Test suite terminate ===\n");
Manager::instance().terminate(); Manager::instance().terminate();
restore();
return wasSuccessful ? 0 : 1; return wasSuccessful ? 0 : 1;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment