diff options
Diffstat (limited to 'project2/ice')
-rw-r--r-- | project2/ice/Jamfile.jam | 8 | ||||
-rw-r--r-- | project2/ice/buildClient.cpp | 4 | ||||
-rw-r--r-- | project2/ice/buildClient.h | 4 | ||||
-rw-r--r-- | project2/ice/buildComms.cpp | 14 | ||||
-rw-r--r-- | project2/ice/buildComms.h | 10 | ||||
-rw-r--r-- | project2/ice/buildDaemon.cpp | 4 | ||||
-rw-r--r-- | project2/ice/buildDaemon.h | 4 | ||||
-rw-r--r-- | project2/ice/iceCompile.cpp | 8 | ||||
-rw-r--r-- | project2/ice/iceCompile.h | 36 | ||||
-rw-r--r-- | project2/ice/iceDaemon.cpp | 2 | ||||
-rw-r--r-- | project2/ice/pch.hpp | 2 | ||||
-rw-r--r-- | project2/ice/sliceCompile.cpp | 10 | ||||
-rw-r--r-- | project2/ice/sliceCompile.h | 10 | ||||
-rw-r--r-- | project2/ice/unittests/Jamfile.jam | 8 | ||||
-rw-r--r-- | project2/ice/unittests/testClient.cpp | 30 | ||||
-rw-r--r-- | project2/ice/unittests/testClientCompile.cpp | 48 | ||||
-rw-r--r-- | project2/ice/unittests/testDaemon.cpp | 24 | ||||
-rw-r--r-- | project2/ice/unittests/testDaemonCompile.cpp | 48 |
18 files changed, 137 insertions, 137 deletions
diff --git a/project2/ice/Jamfile.jam b/project2/ice/Jamfile.jam index 001ee8f..c7fe77c 100644 --- a/project2/ice/Jamfile.jam +++ b/project2/ice/Jamfile.jam @@ -8,7 +8,7 @@ lib mcpp ; lib Ice : : <name>Ice++11 ; lib IceBox : : <name>IceBox++11 ; lib pthread ; -lib boost_filesystem ; +lib stdc++fs ; lib slicer : : : : <include>/usr/include/slicer ; lib slicer-compiler : : : : <include>/usr/include/slicer ; @@ -32,7 +32,7 @@ lib p2iceclient : <library>dl <library>Ice <library>slice//Slice - <library>boost_filesystem + <library>stdc++fs <library>pthread : : <library>p2ice @@ -52,7 +52,7 @@ lib p2icedaemon : <library>dl <library>Ice <library>slice//Slice - <library>boost_filesystem + <library>stdc++fs <library>pthread : : <library>../daemon/lib//p2daemonlib @@ -90,7 +90,7 @@ lib p2ice : <library>slice//Slice <library>slicer <library>slicer-compiler - <library>boost_filesystem + <library>stdc++fs <library>pthread : : <linkflags>-rdynamic diff --git a/project2/ice/buildClient.cpp b/project2/ice/buildClient.cpp index 97655c7..f454373 100644 --- a/project2/ice/buildClient.cpp +++ b/project2/ice/buildClient.cpp @@ -3,7 +3,7 @@ #include "slice2Task.h" #include "slice2Rows.h" -BuildClient::BuildClient(const boost::filesystem::path & slice, const IceCompile::Deps & dep) : +BuildClient::BuildClient(const std::filesystem::path & slice, const IceCompile::Deps & dep) : SliceCompile(slice, dep) { } @@ -26,7 +26,7 @@ BuildClient::Body(FILE * out, Slice::UnitPtr u) const return taskBuilder.Components() + rowsBuilder.Components(); } -boost::filesystem::path +std::filesystem::path BuildClient::OutputName(const std::string & type) const { return slice.filename().replace_extension(".client" + type); diff --git a/project2/ice/buildClient.h b/project2/ice/buildClient.h index e16872e..a6f6ef1 100644 --- a/project2/ice/buildClient.h +++ b/project2/ice/buildClient.h @@ -6,12 +6,12 @@ class BuildClient : public SliceCompile { public: - BuildClient(const boost::filesystem::path & slice, const IceCompile::Deps & dep); + BuildClient(const std::filesystem::path & slice, const IceCompile::Deps & dep); virtual void Headers(FILE *) const; virtual unsigned int Body(FILE *, Slice::UnitPtr) const; - boost::filesystem::path OutputName(const std::string & type) const; + std::filesystem::path OutputName(const std::string & type) const; }; #endif diff --git a/project2/ice/buildComms.cpp b/project2/ice/buildComms.cpp index 21d89a5..0ccef74 100644 --- a/project2/ice/buildComms.cpp +++ b/project2/ice/buildComms.cpp @@ -2,12 +2,12 @@ #include "buildComms.h" #include <logger.h> #include <buffer.h> -#include <boost/filesystem/operations.hpp> +#include <filesystem> #include <slicer/parser.h> -namespace fs = boost::filesystem; +namespace fs = std::filesystem; -BuildComms::BuildComms(const boost::filesystem::path & slice, bool ip, bool sp) : +BuildComms::BuildComms(const std::filesystem::path & slice, bool ip, bool sp) : IceCompile(slice), iceParts(ip), slicerParts(sp) @@ -15,7 +15,7 @@ BuildComms::BuildComms(const boost::filesystem::path & slice, bool ip, bool sp) } unsigned int -BuildComms::Count(const boost::filesystem::path & in) const +BuildComms::Count(const std::filesystem::path & in) const { unsigned int components = 0; @@ -33,7 +33,7 @@ BuildComms::Count(const boost::filesystem::path & in) const } unsigned int -BuildComms::Build(const boost::filesystem::path & in, const boost::filesystem::path & out) const +BuildComms::Build(const std::filesystem::path & in, const std::filesystem::path & out) const { const auto slicecmd = stringbf("%s --output-dir %s --dll-export JAM_DLL_PUBLIC %s", slice2cpp, out.parent_path(), in); Logger()->messagebf(LOG_DEBUG, "%s: slice command: %s", __PRETTY_FUNCTION__, slicecmd); @@ -58,13 +58,13 @@ BuildComms::Build(const boost::filesystem::path & in, const boost::filesystem::p return components; } -boost::filesystem::path +std::filesystem::path BuildComms::InputPath() const { return slice; } -boost::filesystem::path +std::filesystem::path BuildComms::OutputName(const std::string & type) const { return slice.filename().replace_extension(type); diff --git a/project2/ice/buildComms.h b/project2/ice/buildComms.h index efce380..4f541b5 100644 --- a/project2/ice/buildComms.h +++ b/project2/ice/buildComms.h @@ -6,12 +6,12 @@ class BuildComms : public IceCompile { public: - BuildComms(const boost::filesystem::path & slice, bool iceParts, bool slicerParts); + BuildComms(const std::filesystem::path & slice, bool iceParts, bool slicerParts); - unsigned int Build(const boost::filesystem::path & in, const boost::filesystem::path & out) const; - unsigned int Count(const boost::filesystem::path & in) const; - boost::filesystem::path InputPath() const; - boost::filesystem::path OutputName(const std::string & type) const; + unsigned int Build(const std::filesystem::path & in, const std::filesystem::path & out) const; + unsigned int Count(const std::filesystem::path & in) const; + std::filesystem::path InputPath() const; + std::filesystem::path OutputName(const std::string & type) const; const bool iceParts; const bool slicerParts; diff --git a/project2/ice/buildDaemon.cpp b/project2/ice/buildDaemon.cpp index 5bb4cfd..6f7138b 100644 --- a/project2/ice/buildDaemon.cpp +++ b/project2/ice/buildDaemon.cpp @@ -2,7 +2,7 @@ #include "buildDaemon.h" #include "slice2Daemon.h" -BuildDaemon::BuildDaemon(const boost::filesystem::path & slice, const IceCompile::Deps & dep) : +BuildDaemon::BuildDaemon(const std::filesystem::path & slice, const IceCompile::Deps & dep) : SliceCompile(slice, dep) { } @@ -22,7 +22,7 @@ BuildDaemon::Body(FILE * out, Slice::UnitPtr u) const return daemonBuilder.Components(); } -boost::filesystem::path +std::filesystem::path BuildDaemon::OutputName(const std::string & type) const { return slice.filename().replace_extension(".daemon" + type); diff --git a/project2/ice/buildDaemon.h b/project2/ice/buildDaemon.h index b2dd8ca..47ba77a 100644 --- a/project2/ice/buildDaemon.h +++ b/project2/ice/buildDaemon.h @@ -6,12 +6,12 @@ class BuildDaemon : public SliceCompile { public: - BuildDaemon(const boost::filesystem::path & slice, const IceCompile::Deps & dep); + BuildDaemon(const std::filesystem::path & slice, const IceCompile::Deps & dep); virtual void Headers(FILE *) const; virtual unsigned int Body(FILE *, Slice::UnitPtr) const; - boost::filesystem::path OutputName(const std::string & type) const; + std::filesystem::path OutputName(const std::string & type) const; }; #endif diff --git a/project2/ice/iceCompile.cpp b/project2/ice/iceCompile.cpp index 6f52e1b..eee0463 100644 --- a/project2/ice/iceCompile.cpp +++ b/project2/ice/iceCompile.cpp @@ -1,11 +1,11 @@ #include <pch.hpp> #include "iceCompile.h" -#include <boost/filesystem/operations.hpp> +#include <filesystem> #include <logger.h> #include <buffer.h> #include <dlfcn.h> -namespace fs = boost::filesystem; +namespace fs = std::filesystem; std::string IceCompile::slice2cpp; std::string IceCompile::slicer; @@ -38,13 +38,13 @@ DECLARE_OPTIONS(IceCompile, "ICE Compile Options") "The root folder where Slicer header files are found") END_OPTIONS(IceCompile); -IceCompile::IceCompile(const boost::filesystem::path & s) : +IceCompile::IceCompile(const std::filesystem::path & s) : slice(s), components(0) { } -IceCompile::IceCompile(const boost::filesystem::path & s, const Deps & d) : +IceCompile::IceCompile(const std::filesystem::path & s, const Deps & d) : slice(s), components(0), deps(d) diff --git a/project2/ice/iceCompile.h b/project2/ice/iceCompile.h index c06f8b1..d771231 100644 --- a/project2/ice/iceCompile.h +++ b/project2/ice/iceCompile.h @@ -4,7 +4,7 @@ #include "options.h" #include <string> #include <set> -#include <boost/filesystem/path.hpp> +#include <filesystem> #include <boost/optional.hpp> class IceCompile { @@ -21,12 +21,12 @@ class IceCompile { static std::string linker; static std::string cxxopts; static std::string linkeropts; - static boost::filesystem::path tmpdir; - static boost::filesystem::path headerdir; - static boost::filesystem::path slicerheaderdir; + static std::filesystem::path tmpdir; + static std::filesystem::path headerdir; + static std::filesystem::path slicerheaderdir; - IceCompile(const boost::filesystem::path & slice); - IceCompile(const boost::filesystem::path & slice, const Deps & deps); + IceCompile(const std::filesystem::path & slice); + IceCompile(const std::filesystem::path & slice, const Deps & deps); enum Steps { UpdateBuild = 0x1, @@ -36,29 +36,29 @@ class IceCompile { /// Conditionally execute Build, Compile, Link as required void Update(int steps = UpdateBuild | UpdateCompile | UpdateLink); /// Source file path (e.g. /some/path/slice.ice) - virtual boost::filesystem::path InputPath() const = 0; + virtual std::filesystem::path InputPath() const = 0; /// File name (no extension) in temporary directory (e.g. clientSlice) - virtual boost::filesystem::path OutputName(const std::string & type) const = 0; + virtual std::filesystem::path OutputName(const std::string & type) const = 0; typedef boost::shared_ptr<void> LibHandle; typedef std::set<LibHandle> LibHandles; LibHandles Open() const; protected: - virtual unsigned int Build(const boost::filesystem::path & in, const boost::filesystem::path & out) const = 0; - virtual unsigned int Count(const boost::filesystem::path & in) const = 0; - void BuildInteral(const boost::filesystem::path & in, const boost::filesystem::path & out); - void Compile(const boost::filesystem::path & in, const boost::filesystem::path & out); - void Link(const boost::filesystem::path & in, const boost::filesystem::path & out); + virtual unsigned int Build(const std::filesystem::path & in, const std::filesystem::path & out) const = 0; + virtual unsigned int Count(const std::filesystem::path & in) const = 0; + void BuildInteral(const std::filesystem::path & in, const std::filesystem::path & out); + void Compile(const std::filesystem::path & in, const std::filesystem::path & out); + void Link(const std::filesystem::path & in, const std::filesystem::path & out); - typedef void (IceCompile::*UpdateFunc)(const boost::filesystem::path & in, const boost::filesystem::path & out); - typedef void (IceCompile::*CountFunc)(const boost::filesystem::path & in); - void update(const boost::filesystem::path & in, const boost::filesystem::path & out, UpdateFunc func, CountFunc count = NULL); + typedef void (IceCompile::*UpdateFunc)(const std::filesystem::path & in, const std::filesystem::path & out); + typedef void (IceCompile::*CountFunc)(const std::filesystem::path & in); + void update(const std::filesystem::path & in, const std::filesystem::path & out, UpdateFunc func, CountFunc count = NULL); - const boost::filesystem::path slice; + const std::filesystem::path slice; private: - void countComponents(const boost::filesystem::path & in); + void countComponents(const std::filesystem::path & in); unsigned int components; LibHandle OpenLib() const; const Deps deps; diff --git a/project2/ice/iceDaemon.cpp b/project2/ice/iceDaemon.cpp index 2330d02..4d0e091 100644 --- a/project2/ice/iceDaemon.cpp +++ b/project2/ice/iceDaemon.cpp @@ -7,7 +7,7 @@ #include <scriptLoader.h> #include <options.h> #include <sys/stat.h> -#include <boost/filesystem.hpp> +#include <filesystem> #include <boost/lexical_cast.hpp> #include <commonObjects.h> #include <logger.h> diff --git a/project2/ice/pch.hpp b/project2/ice/pch.hpp index 1268e36..5c1187c 100644 --- a/project2/ice/pch.hpp +++ b/project2/ice/pch.hpp @@ -3,7 +3,7 @@ #define CGI_PCH #include <Ice/Ice.h> -#include <boost/filesystem.hpp> +#include <filesystem> #include <boost/function/function_fwd.hpp> #include <boost/optional.hpp> #include <map> diff --git a/project2/ice/sliceCompile.cpp b/project2/ice/sliceCompile.cpp index 53832c9..83b5e65 100644 --- a/project2/ice/sliceCompile.cpp +++ b/project2/ice/sliceCompile.cpp @@ -5,13 +5,13 @@ std::mutex slicePreprocessor; -SliceCompile::SliceCompile(const boost::filesystem::path & slice, const IceCompile::Deps & dep) : +SliceCompile::SliceCompile(const std::filesystem::path & slice, const IceCompile::Deps & dep) : IceCompile(slice, dep) { } unsigned int -SliceCompile::build(const boost::filesystem::path & in, FILE * out) const +SliceCompile::build(const std::filesystem::path & in, FILE * out) const { std::vector<std::string> cppArgs; std::lock_guard<std::mutex> lock(slicePreprocessor); @@ -47,7 +47,7 @@ SliceCompile::build(const boost::filesystem::path & in, FILE * out) const } unsigned int -SliceCompile::Build(const boost::filesystem::path & in, const boost::filesystem::path & outpath) const +SliceCompile::Build(const std::filesystem::path & in, const std::filesystem::path & outpath) const { FILE * out = fopen(outpath.string().c_str(), "w"); if (!out) { @@ -64,7 +64,7 @@ SliceCompile::Build(const boost::filesystem::path & in, const boost::filesystem: } unsigned int -SliceCompile::Count(const boost::filesystem::path & in) const +SliceCompile::Count(const std::filesystem::path & in) const { return build(in, NULL); } @@ -74,7 +74,7 @@ SliceCompile::Headers(FILE *) const { } -boost::filesystem::path +std::filesystem::path SliceCompile::InputPath() const { return slice; diff --git a/project2/ice/sliceCompile.h b/project2/ice/sliceCompile.h index db4127b..39d7948 100644 --- a/project2/ice/sliceCompile.h +++ b/project2/ice/sliceCompile.h @@ -9,17 +9,17 @@ class DLL_PUBLIC SliceCompile : public IceCompile { public: - SliceCompile(const boost::filesystem::path & slice, const IceCompile::Deps & dep); + SliceCompile(const std::filesystem::path & slice, const IceCompile::Deps & dep); - unsigned int Count(const boost::filesystem::path & in) const; - unsigned int Build(const boost::filesystem::path & in, const boost::filesystem::path & out) const; + unsigned int Count(const std::filesystem::path & in) const; + unsigned int Build(const std::filesystem::path & in, const std::filesystem::path & out) const; virtual void Headers(FILE *) const; virtual unsigned int Body(FILE *, Slice::UnitPtr) const = 0; - boost::filesystem::path InputPath() const; + std::filesystem::path InputPath() const; private: - unsigned int build(const boost::filesystem::path & in, FILE *) const; + unsigned int build(const std::filesystem::path & in, FILE *) const; }; #endif diff --git a/project2/ice/unittests/Jamfile.jam b/project2/ice/unittests/Jamfile.jam index c78d9e5..d8a0220 100644 --- a/project2/ice/unittests/Jamfile.jam +++ b/project2/ice/unittests/Jamfile.jam @@ -54,7 +54,7 @@ run <library>../../ut//p2ut <library>../../basics//p2basics <library>..//Ice - <library>..//boost_filesystem + <library>..//stdc++fs <dependency>testClient.xml : testClientCompile : @@ -73,7 +73,7 @@ run <library>../../xml//p2xml <library>../../basics//p2basics <library>..//Ice - <library>..//boost_filesystem + <library>..//stdc++fs <dependency>testClient.xml : testClient : @@ -90,7 +90,7 @@ run <library>../../ut//p2ut <library>../../basics//p2basics <library>..//Ice - <library>..//boost_filesystem + <library>..//stdc++fs : testDaemonCompile : ; @@ -108,7 +108,7 @@ run <library>../../xml//p2xml <library>../../basics//p2basics <library>..//Ice - <library>..//boost_filesystem + <library>..//stdc++fs <dependency>data/unittest-data.xml <dependency>lib/testrows.xml <dependency>tasks/UnitTest/SimpleInterface/SomeTask.xml diff --git a/project2/ice/unittests/testClient.cpp b/project2/ice/unittests/testClient.cpp index 5abedd7..814a4d4 100644 --- a/project2/ice/unittests/testClient.cpp +++ b/project2/ice/unittests/testClient.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Client #include <boost/test/unit_test.hpp> -#include <boost/filesystem/operations.hpp> +#include <filesystem> #include "iceClient.h" #include <Ice/ObjectAdapter.h> #include <Ice/Service.h> @@ -17,8 +17,8 @@ #define XSTR(s) STR(s) #define STR(s) #s -const auto bindir = boost::filesystem::canonical("/proc/self/exe").parent_path(); -const boost::filesystem::path iceroot(XSTR(ROOT)); +const auto bindir = std::filesystem::canonical("/proc/self/exe").parent_path(); +const std::filesystem::path iceroot(XSTR(ROOT)); const auto headers = iceroot.parent_path().parent_path(); BOOST_TEST_DONT_PRINT_LOG_VALUE( ::UnitTestComplex::Date ); @@ -150,24 +150,24 @@ unloadTests() BOOST_REQUIRE_THROW(RowSetFactory::get("UnitTestComplex-ComplexInterface-ComplexRow"), AdHoc::NoSuchPluginException); } -void test_client_run(ExecContext *, const boost::filesystem::path & tmpdir); +void test_client_run(ExecContext *, const std::filesystem::path & tmpdir); BOOST_FIXTURE_TEST_SUITE( Core, TestAppInstance ); BOOST_AUTO_TEST_CASE( test_client ) { - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-client"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-client"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); test_client_run(this, tmpdir); test_client_run(this, tmpdir); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_SUITE_END(); -void test_client_run(ExecContext * ec, const boost::filesystem::path & tmpdir) +void test_client_run(ExecContext * ec, const std::filesystem::path & tmpdir) { BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -178,16 +178,16 @@ void test_client_run(ExecContext * ec, const boost::filesystem::path & tmpdir) { "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")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestComplex.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittestComplex.client.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.client.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.client.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestComplex.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittestComplex.client.so")); commonTests(ec); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } diff --git a/project2/ice/unittests/testClientCompile.cpp b/project2/ice/unittests/testClientCompile.cpp index 89b0b4b..72df095 100644 --- a/project2/ice/unittests/testClientCompile.cpp +++ b/project2/ice/unittests/testClientCompile.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE ClientCompile #include <boost/test/unit_test.hpp> -#include <boost/filesystem/operations.hpp> +#include <filesystem> #include "iceClient.h" #include <testOptionsSource.h> #include <task.h> @@ -11,8 +11,8 @@ #define XSTR(s) STR(s) #define STR(s) #s -const auto bindir = boost::filesystem::canonical("/proc/self/exe").parent_path(); -const boost::filesystem::path iceroot(XSTR(ROOT)); +const auto bindir = std::filesystem::canonical("/proc/self/exe").parent_path(); +const std::filesystem::path iceroot(XSTR(ROOT)); const auto headers = iceroot.parent_path().parent_path(); static @@ -45,9 +45,9 @@ BOOST_AUTO_TEST_CASE( compile_client_full ) { TestOptionsSource::LoadTestOptions({ }); - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-clientCompile/full"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-clientCompile/full"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -57,22 +57,22 @@ BOOST_AUTO_TEST_CASE( compile_client_full ) { "ice.client.slice", (iceroot / "unittestTypes.ice").string() }, { "ice.client.slice", (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")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.client.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.client.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_CASE( compile_client_clientOnly ) { - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-clientCompile/clientOnly"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-clientCompile/clientOnly"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -83,23 +83,23 @@ BOOST_AUTO_TEST_CASE( compile_client_clientOnly ) { "ice.client.sliceclient", (iceroot / "unittestTypes.ice").string() }, { "ice.client.sliceclient", (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")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.client.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.client.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_CASE( compile_client_slicer ) { TestOptionsSource::LoadTestOptions({ }); - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-clientCompile/slicer"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-clientCompile/slicer"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -110,15 +110,15 @@ BOOST_AUTO_TEST_CASE( compile_client_slicer ) { "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")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.client.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.client.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_SUITE_END(); diff --git a/project2/ice/unittests/testDaemon.cpp b/project2/ice/unittests/testDaemon.cpp index 08eefd0..0ce5fa2 100644 --- a/project2/ice/unittests/testDaemon.cpp +++ b/project2/ice/unittests/testDaemon.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Daemon #include <boost/test/unit_test.hpp> -#include <boost/filesystem/operations.hpp> +#include <filesystem> #include <testOptionsSource.h> #include <unittest.h> #include <unittestComplex.h> @@ -12,8 +12,8 @@ #define XSTR(s) STR(s) #define STR(s) #s -const auto bindir = boost::filesystem::canonical("/proc/self/exe").parent_path(); -const boost::filesystem::path iceroot(XSTR(ROOT)); +const auto bindir = std::filesystem::canonical("/proc/self/exe").parent_path(); +const std::filesystem::path iceroot(XSTR(ROOT)); const auto headers = iceroot.parent_path().parent_path(); class DummyTask : public Task { @@ -202,9 +202,9 @@ BOOST_FIXTURE_TEST_SUITE( Core, TestAppInstance ); BOOST_AUTO_TEST_CASE( test_daemon ) { - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemon"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemon"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ }); @@ -219,17 +219,17 @@ BOOST_AUTO_TEST_CASE( test_daemon ) { "ice.daemon.slicerdaemon", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slicerdaemon", (iceroot / "unittest.ice").string() } }); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittest.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittest.daemon.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestComplex.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittestComplex.daemon.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.daemon.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestComplex.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittestComplex.daemon.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_SUITE_END(); diff --git a/project2/ice/unittests/testDaemonCompile.cpp b/project2/ice/unittests/testDaemonCompile.cpp index 08dd3db..6125e6c 100644 --- a/project2/ice/unittests/testDaemonCompile.cpp +++ b/project2/ice/unittests/testDaemonCompile.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE DaemonCompile #include <boost/test/unit_test.hpp> -#include <boost/filesystem/operations.hpp> +#include <filesystem> #include <testOptionsSource.h> #include <exceptions.h> #include <iceDaemon.h> @@ -8,8 +8,8 @@ #define XSTR(s) STR(s) #define STR(s) #s -const auto bindir = boost::filesystem::canonical("/proc/self/exe").parent_path(); -const boost::filesystem::path iceroot(XSTR(ROOT)); +const auto bindir = std::filesystem::canonical("/proc/self/exe").parent_path(); +const std::filesystem::path iceroot(XSTR(ROOT)); const auto headers = iceroot.parent_path().parent_path(); static @@ -32,9 +32,9 @@ BOOST_FIXTURE_TEST_SUITE( Core, TestAppInstance ); BOOST_AUTO_TEST_CASE( compile_daemon_full ) { - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemonCompile/full"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemonCompile/full"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -43,22 +43,22 @@ BOOST_AUTO_TEST_CASE( compile_daemon_full ) { "ice.daemon.slice", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slice", (iceroot / "unittest.ice").string() } }); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittest.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittest.daemon.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittestTypes.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.daemon.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_CASE( compile_daemon_daemonOnly ) { - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemonCompile/daemonOnly"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemonCompile/daemonOnly"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -68,22 +68,22 @@ BOOST_AUTO_TEST_CASE( compile_daemon_daemonOnly ) { "ice.daemon.slicedaemon", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slicedaemon", (iceroot / "unittest.ice").string() } }); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittest.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittest.daemon.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittestTypes.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.daemon.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_CASE( compile_daemon_slicer ) { - const boost::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemonCompile/slicer"; + const std::filesystem::path tmpdir = "/tmp/ut/project2.slice-daemonCompile/slicer"; BOOST_TEST_CHECKPOINT("Clean up"); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -93,15 +93,15 @@ BOOST_AUTO_TEST_CASE( compile_daemon_slicer ) { "ice.daemon.slicerdaemon", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slicerdaemon", (iceroot / "unittest.ice").string() } }); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittest.so")); - BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittest.daemon.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.so")); - BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittest.so")); + BOOST_REQUIRE(std::filesystem::exists(tmpdir / "unittest.daemon.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.so")); + BOOST_REQUIRE(!std::filesystem::exists(tmpdir / "unittestTypes.daemon.so")); commonTests(); TestOptionsSource::LoadTestOptions({ }); unloadTests(); - boost::filesystem::remove_all(tmpdir); + std::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_SUITE_END(); |