Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link rcpputils::filesystem to solve error on RHEL #1665

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

#include <gmock/gmock.h>

#include <filesystem>
#include <fstream>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "rcpputils/asserts.hpp"
#include "rcpputils/filesystem_helper.hpp"

#include "rosbag2_compression/compression_options.hpp"
#include "rosbag2_compression/sequential_compression_writer.hpp"
Expand All @@ -39,8 +39,6 @@

using namespace testing; // NOLINT

namespace fs = std::filesystem;

static constexpr const char * DefaultTestCompressor = "fake_comp";

class SequentialCompressionWriterTest : public Test
Expand All @@ -51,12 +49,12 @@ class SequentialCompressionWriterTest : public Test
storage_{std::make_shared<NiceMock<MockStorage>>()},
converter_factory_{std::make_shared<StrictMock<MockConverterFactory>>()},
metadata_io_{std::make_unique<NiceMock<MockMetadataIo>>()},
tmp_dir_{fs::temp_directory_path() / "SequentialCompressionWriterTest"},
tmp_dir_{rcpputils::fs::temp_directory_path() / "SequentialCompressionWriterTest"},
tmp_dir_storage_options_{},
serialization_format_{"rmw_format"}
{
tmp_dir_storage_options_.uri = tmp_dir_.string();
fs::remove_all(tmp_dir_);
rcpputils::fs::remove_all(tmp_dir_);
ON_CALL(*storage_factory_, open_read_write(_)).WillByDefault(Return(storage_));
EXPECT_CALL(*storage_factory_, open_read_write(_)).Times(AtLeast(0));
// intercept the metadata write so we can analyze it.
Expand All @@ -68,7 +66,7 @@ class SequentialCompressionWriterTest : public Test

~SequentialCompressionWriterTest()
{
fs::remove_all(tmp_dir_);
rcpputils::fs::remove_all(tmp_dir_);
}

void initializeFakeFileStorage()
Expand Down Expand Up @@ -127,7 +125,7 @@ class SequentialCompressionWriterTest : public Test
std::shared_ptr<NiceMock<MockStorage>> storage_;
std::shared_ptr<StrictMock<MockConverterFactory>> converter_factory_;
std::unique_ptr<MockMetadataIo> metadata_io_;
fs::path tmp_dir_;
rcpputils::fs::path tmp_dir_;
rosbag2_storage::StorageOptions tmp_dir_storage_options_;
rosbag2_storage::BagMetadata intercepted_metadata_;
std::unique_ptr<rosbag2_cpp::Writer> writer_;
Expand Down
Loading