summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <daniel.goodliffe@pressassociation.com>2015-05-27 16:28:14 +0100
committerDan Goodliffe <daniel.goodliffe@pressassociation.com>2015-05-27 16:28:14 +0100
commit3e46e14d702e1aa41ac4c62708b57e2937ef1464 (patch)
tree2a8912075ef1ec09938088ff6edbe991b86c5f15
parentThrow on failure to open mock script (diff)
downloadproject2-3e46e14d702e1aa41ac4c62708b57e2937ef1464.tar.bz2
project2-3e46e14d702e1aa41ac4c62708b57e2937ef1464.tar.xz
project2-3e46e14d702e1aa41ac4c62708b57e2937ef1464.zip
Remove tmp dirs when tests complete
-rw-r--r--project2/ice/unittests/testClient.cpp2
-rw-r--r--project2/ice/unittests/testClientCompile.cpp3
-rw-r--r--project2/ice/unittests/testDaemon.cpp3
-rw-r--r--project2/ice/unittests/testDaemonCompile.cpp3
-rw-r--r--project2/xml/unittests/testxml.cpp6
5 files changed, 16 insertions, 1 deletions
diff --git a/project2/ice/unittests/testClient.cpp b/project2/ice/unittests/testClient.cpp
index 687ba73..3b3c790 100644
--- a/project2/ice/unittests/testClient.cpp
+++ b/project2/ice/unittests/testClient.cpp
@@ -160,6 +160,7 @@ BOOST_AUTO_TEST_CASE( test_client )
test_client_run(tmpdir);
test_client_run(tmpdir);
+ boost::filesystem::remove_all(tmpdir);
}
void test_client_run(const boost::filesystem::path & tmpdir)
@@ -183,5 +184,6 @@ void test_client_run(const boost::filesystem::path & tmpdir)
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
diff --git a/project2/ice/unittests/testClientCompile.cpp b/project2/ice/unittests/testClientCompile.cpp
index 2792ef0..944af60 100644
--- a/project2/ice/unittests/testClientCompile.cpp
+++ b/project2/ice/unittests/testClientCompile.cpp
@@ -64,6 +64,7 @@ BOOST_AUTO_TEST_CASE( compile_client_full )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
BOOST_AUTO_TEST_CASE( compile_client_clientOnly )
@@ -89,6 +90,7 @@ BOOST_AUTO_TEST_CASE( compile_client_clientOnly )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
BOOST_AUTO_TEST_CASE( compile_client_slicer )
@@ -115,5 +117,6 @@ BOOST_AUTO_TEST_CASE( compile_client_slicer )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
diff --git a/project2/ice/unittests/testDaemon.cpp b/project2/ice/unittests/testDaemon.cpp
index 1c53d6c..4e48413 100644
--- a/project2/ice/unittests/testDaemon.cpp
+++ b/project2/ice/unittests/testDaemon.cpp
@@ -144,7 +144,7 @@ commonTests()
BOOST_REQUIRE_EQUAL("third", paramRows[1]->b);
BOOST_REQUIRE_EQUAL(2, paramRows[2]->a);
BOOST_REQUIRE_EQUAL("first", paramRows[2]->b);
-
+
BOOST_TEST_CHECKPOINT("Call task (no parameters)");
BOOST_REQUIRE_EQUAL(0, DummyTask::execCount);
si->SomeTask();
@@ -224,5 +224,6 @@ BOOST_AUTO_TEST_CASE( test_daemon )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
diff --git a/project2/ice/unittests/testDaemonCompile.cpp b/project2/ice/unittests/testDaemonCompile.cpp
index 0f6b4fa..a49719f 100644
--- a/project2/ice/unittests/testDaemonCompile.cpp
+++ b/project2/ice/unittests/testDaemonCompile.cpp
@@ -49,6 +49,7 @@ BOOST_AUTO_TEST_CASE( compile_daemon_full )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
BOOST_AUTO_TEST_CASE( compile_daemon_daemonOnly )
@@ -73,6 +74,7 @@ BOOST_AUTO_TEST_CASE( compile_daemon_daemonOnly )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
BOOST_AUTO_TEST_CASE( compile_daemon_slicer )
@@ -97,5 +99,6 @@ BOOST_AUTO_TEST_CASE( compile_daemon_slicer )
TestOptionsSource::LoadTestOptions({ });
unloadTests();
+ boost::filesystem::remove_all(tmpdir);
}
diff --git a/project2/xml/unittests/testxml.cpp b/project2/xml/unittests/testxml.cpp
index 52dda4b..143f501 100644
--- a/project2/xml/unittests/testxml.cpp
+++ b/project2/xml/unittests/testxml.cpp
@@ -39,5 +39,11 @@ BOOST_AUTO_TEST_CASE( rawview )
BOOST_REQUIRE_EQUAL(0, systembf("diff -w --unified %s %s",
out,
RootDir / "expected" / "rawview.xml"));
+ boost::filesystem::remove_all(tmpdir);
+}
+
+BOOST_AUTO_TEST_CASE( after )
+{
+ boost::filesystem::remove_all(tmpdir);
}