summaryrefslogtreecommitdiff
path: root/project2/ice/unittests/testClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/ice/unittests/testClient.cpp')
-rw-r--r--project2/ice/unittests/testClient.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/project2/ice/unittests/testClient.cpp b/project2/ice/unittests/testClient.cpp
index dce6b2f..4c89184 100644
--- a/project2/ice/unittests/testClient.cpp
+++ b/project2/ice/unittests/testClient.cpp
@@ -107,21 +107,32 @@ unloadTests()
BOOST_REQUIRE_THROW(ElementLoader::getFor("UnitTest-SimpleInterface-SomeRowsParams"), NotSupported);
}
+void test_client_run(const boost::filesystem::path & tmpdir);
BOOST_AUTO_TEST_CASE( test_client )
{
- const std::string tmpdir = "/tmp/ut/project2.slice-client";
+ const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-client";
BOOST_TEST_CHECKPOINT("Clean up");
boost::filesystem::remove_all(tmpdir);
+ test_client_run(tmpdir);
+ test_client_run(tmpdir);
+}
+
+void test_client_run(const boost::filesystem::path & tmpdir)
+{
BOOST_TEST_CHECKPOINT("Configure, compile, link, load");
TestOptionsSource::LoadTestOptions({
{ "library", (bindir / "slicer-yes" / "libunittestr.so").string() },
{ "common.datasourceRoot", iceroot.string() },
- { "ice.compile.tmpdir", tmpdir },
+ { "ice.compile.tmpdir", tmpdir.string() },
{ "ice.compile.headers", headers.string() },
{ "ice.client.slicerclient", (iceroot / "unittestTypes.ice").string() },
{ "ice.client.slicerclient", (iceroot / "unittest.ice").string() }
});
+ BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittest.so"));
+ BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittest.client.so"));
+ BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.so"));
+ BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.client.so"));
commonTests();
TestOptionsSource::LoadTestOptions({ });