Skip to content

Commit

Permalink
tests: switch to std::filesystem
Browse files Browse the repository at this point in the history
Change-Id: I4c8df25b83c36debb4d70f6c7757545ae881e332
  • Loading branch information
Pesa committed Dec 14, 2024
1 parent 6c4bb21 commit 3902611
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .jenkins.d/00-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ APT_PKGS=(
libboost-chrono-dev
libboost-date-time-dev
libboost-dev
libboost-filesystem-dev
libboost-iostreams-dev
libboost-log-dev
libboost-program-options-dev
Expand Down
2 changes: 1 addition & 1 deletion .waf-tools/default-compiler-flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def getDebugFlags(self, conf):
return {
'CXXFLAGS': [],
'LINKFLAGS': [],
'DEFINES': ['BOOST_ASIO_NO_DEPRECATED', 'BOOST_FILESYSTEM_NO_DEPRECATED'],
'DEFINES': ['BOOST_ASIO_NO_DEPRECATED'],
}

def getOptimizedFlags(self, conf):
Expand Down
10 changes: 6 additions & 4 deletions tests/identity-management-fixture.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012-2023 University of California, Los Angeles
* Copyright (c) 2012-2024 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
Expand All @@ -20,7 +20,9 @@
#include "identity-management-fixture.hpp"

#include <ndn-cxx/util/io.hpp>
#include <boost/filesystem.hpp>

#include <filesystem>
#include <system_error>

namespace ndn::tests {

Expand All @@ -32,9 +34,9 @@ IdentityManagementFixture::IdentityManagementFixture()

IdentityManagementFixture::~IdentityManagementFixture()
{
boost::system::error_code ec;
std::error_code ec;
for (const auto& certFile : m_certFiles) {
boost::filesystem::remove(certFile, ec); // ignore error
std::filesystem::remove(certFile, ec); // ignore error
}
}

Expand Down
2 changes: 1 addition & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def configure(conf):
'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')

if conf.env.WITH_TESTS:
conf.check_boost(lib='filesystem unit_test_framework', mt=True, uselib_store='BOOST_TESTS')
conf.check_boost(lib='unit_test_framework', mt=True, uselib_store='BOOST_TESTS')

conf.check_compiler_flags()

Expand Down

0 comments on commit 3902611

Please sign in to comment.