tests: merge unit-tests-rib into unit-tests-daemon
Change-Id: If522cdb43a2686030f4fd4c2d2e25f1b50c54681
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 3caa608..f7c59de 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -1,12 +1,14 @@
name: Publish Docker image
-
on:
push:
branches:
- master
paths-ignore:
- '*.md'
+ - '.jenkins'
+ - '.jenkins.d/**'
- '.mailmap'
+ - 'tests/**'
workflow_dispatch:
permissions:
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 522bf04..7cd25f3 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -31,7 +31,6 @@
# First run all tests as unprivileged user
./build/unit-tests-core $(ut_log_args core)
./build/unit-tests-daemon $(ut_log_args daemon)
-./build/unit-tests-rib $(ut_log_args rib)
./build/unit-tests-tools $(ut_log_args tools)
# Then use sudo to run those tests that need superuser powers
diff --git a/README-dev.md b/README-dev.md
index b5c4cf3..66109bc 100644
--- a/README-dev.md
+++ b/README-dev.md
@@ -13,24 +13,26 @@
If you choose the GPL v3, please use the following license boilerplate in all `.hpp`
and `.cpp` files:
- /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
- /*
- * Copyright (c) [Year(s)], [Copyright Holder(s)].
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- */
+```cpp
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) [Year(s)], [Copyright Holder(s)].
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ */
+```
If you are affiliated to an NSF-supported NDN project institution, please use the [NDN Team License
Boilerplate](https://redmine.named-data.net/projects/nfd/wiki/NDN_Team_License_Boilerplate_(NFD)).
@@ -45,50 +47,58 @@
To run unit tests, NFD needs to be configured and build with unit test support:
- ./waf configure --with-tests # --debug is also strongly recommended while developing
- ./waf
+```shell
+./waf configure --with-tests # --debug is also strongly recommended while developing
+./waf
+```
The simplest way to run the tests is to launch the compiled binary without any parameters:
- # Run core tests
- ./build/unit-tests-core
+```shell
+# Run core tests
+./build/unit-tests-core
- # Run NFD daemon tests
- ./build/unit-tests-daemon
+# Run NFD daemon tests
+./build/unit-tests-daemon
- # Run NFD RIB management tests
- ./build/unit-tests-rib
+# Run tools tests (e.g., nfdc)
+./build/unit-tests-tools
+```
The [Boost.Test framework](https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/index.html)
is very flexible and allows a number of run-time customization of what tests should be run.
For example, it is possible to choose to run only a specific test suite, only a specific
-test case within a suite, or specific test cases within specific test suites:
+test case within a suite, specific test cases across multiple test suites, and so on:
- # Run only the TCP Face test suite of NFD daemon tests
- ./build/unit-tests-daemon -t FaceTcp
+```shell
+# Run only the PIT tests inside the Table test suite of NFD daemon tests
+./build/unit-tests-daemon -t Table/TestPit
- # Run only test case EndToEnd4 from the same test suite
- ./build/unit-tests-daemon -t FaceTcp/EndToEnd4
+# Run only the test case "Find" from the previous test suite
+./build/unit-tests-daemon -t Table/TestPit/Find
- # Run Basic test case from all core test suites
- ./build/unit-tests-core -t */Basic
+# Run the "Basic" test case from all NFD RIB test suites
+./build/unit-tests-daemon -t Rib/*/Basic
+```
By default, Boost.Test framework will produce verbose output only when a test case fails.
If it is desired to see verbose output (result of each test assertion), add `-l all`
option to `./build/unit-tests` command. To see test progress, you can use `-l test_suite`,
or `-p` to show a progress bar:
- # Show report all log messages including the passed test notification
- ./build/unit-tests-daemon -l all
+```shell
+# Show report all log messages including the passed test notification
+./build/unit-tests-daemon -l all
- # Show test suite messages
- ./build/unit-tests-daemon -l test_suite
+# Show test suite messages
+./build/unit-tests-daemon -l test_suite
- # Show nothing
- ./build/unit-tests-daemon -l nothing
+# Show nothing
+./build/unit-tests-daemon -l nothing
- # Show progress bar
- ./build/unit-tests-core -p
+# Show progress bar
+./build/unit-tests-tools -p
+```
There are many more command line options available, information about which can be obtained
either from the command line using the `--help` switch, or online on the
diff --git a/tests/daemon/rib/fib-updates-erase-face.t.cpp b/tests/daemon/rib/fib-updates-erase-face.t.cpp
index a911d5e..43ec2f0 100644
--- a/tests/daemon/rib/fib-updates-erase-face.t.cpp
+++ b/tests/daemon/rib/fib-updates-erase-face.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,8 @@
namespace nfd::tests {
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture)
-
BOOST_AUTO_TEST_SUITE(EraseFace)
BOOST_AUTO_TEST_CASE(WithInheritedFace_Root)
@@ -421,7 +421,7 @@
}
BOOST_AUTO_TEST_SUITE_END() // EraseFace
-
BOOST_AUTO_TEST_SUITE_END() // FibUpdates
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/fib-updates-new-face.t.cpp b/tests/daemon/rib/fib-updates-new-face.t.cpp
index 79924df..0497a15 100644
--- a/tests/daemon/rib/fib-updates-new-face.t.cpp
+++ b/tests/daemon/rib/fib-updates-new-face.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,8 @@
namespace nfd::tests {
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture)
-
BOOST_AUTO_TEST_SUITE(NewFace)
BOOST_AUTO_TEST_CASE(Basic)
@@ -262,7 +262,7 @@
}
BOOST_AUTO_TEST_SUITE_END() // NewFace
-
BOOST_AUTO_TEST_SUITE_END() // FibUpdates
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/fib-updates-new-namespace.t.cpp b/tests/daemon/rib/fib-updates-new-namespace.t.cpp
index 4ceb60b..084cf40 100644
--- a/tests/daemon/rib/fib-updates-new-namespace.t.cpp
+++ b/tests/daemon/rib/fib-updates-new-namespace.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,8 @@
namespace nfd::tests {
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture)
-
BOOST_AUTO_TEST_SUITE(NewNamespace)
BOOST_AUTO_TEST_CASE(NoFlags)
@@ -190,7 +190,7 @@
}
BOOST_AUTO_TEST_SUITE_END() // NewNamespace
-
BOOST_AUTO_TEST_SUITE_END() // FibUpdates
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/fib-updates-update-face.t.cpp b/tests/daemon/rib/fib-updates-update-face.t.cpp
index bb76d01..3e8e987 100644
--- a/tests/daemon/rib/fib-updates-update-face.t.cpp
+++ b/tests/daemon/rib/fib-updates-update-face.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,8 @@
namespace nfd::tests {
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture)
-
BOOST_AUTO_TEST_SUITE(UpdateFace)
BOOST_AUTO_TEST_CASE(TurnOffChildInheritLowerCost)
@@ -256,7 +256,7 @@
}
BOOST_AUTO_TEST_SUITE_END() // UpdateFace
-
BOOST_AUTO_TEST_SUITE_END() // FibUpdates
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
index eab14e8..ff78b40 100644
--- a/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
+++ b/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,7 +32,7 @@
using namespace nfd::rib;
-BOOST_AUTO_TEST_SUITE(Readvertise)
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestClientToNlsrReadvertisePolicy, GlobalIoFixture)
BOOST_AUTO_TEST_CASE(ReadvertiseClientRoute)
@@ -68,6 +68,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestClientToNlsrReadvertisePolicy
-BOOST_AUTO_TEST_SUITE_END() // Readvertise
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
index df73058..e9979d2 100644
--- a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
+++ b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -54,7 +54,7 @@
}
};
-BOOST_AUTO_TEST_SUITE(Readvertise)
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestHostToGatewayReadvertisePolicy, HostToGatewayReadvertisePolicyFixture)
BOOST_AUTO_TEST_CASE(PrefixToAdvertise)
@@ -105,6 +105,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestHostToGatewayReadvertisePolicy
-BOOST_AUTO_TEST_SUITE_END() // Readvertise
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
index 996ff37..caf38aa 100644
--- a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
+++ b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
@@ -65,7 +65,7 @@
std::function<void(const std::string&)> failureCallback;
};
-BOOST_AUTO_TEST_SUITE(Readvertise)
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestNfdRibReadvertiseDestination, NfdRibReadvertiseDestinationFixture)
class AdvertiseSuccessScenario
@@ -249,6 +249,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestNfdRibReadvertiseDestination
-BOOST_AUTO_TEST_SUITE_END() // Readvertise
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
index 06f905f..7f83dfc 100644
--- a/tests/daemon/rib/readvertise/readvertise.t.cpp
+++ b/tests/daemon/rib/readvertise/readvertise.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -161,7 +161,7 @@
Rib m_rib;
};
-BOOST_AUTO_TEST_SUITE(Readvertise)
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestReadvertise, ReadvertiseFixture)
BOOST_AUTO_TEST_CASE(AddRemoveRoute)
@@ -296,6 +296,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestReadvertise
-BOOST_AUTO_TEST_SUITE_END() // Readvertise
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/rib-entry.t.cpp b/tests/daemon/rib/rib-entry.t.cpp
index 903313e..f6e61ea 100644
--- a/tests/daemon/rib/rib-entry.t.cpp
+++ b/tests/daemon/rib/rib-entry.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,6 +33,7 @@
using rib::RibEntry;
using rib::Route;
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestRibEntry, GlobalIoFixture)
BOOST_AUTO_TEST_CASE(Basic)
@@ -78,18 +79,13 @@
BOOST_FIXTURE_TEST_SUITE(GetAnnouncement, GlobalIoTimeFixture)
static Route
-makeSimpleRoute(uint64_t faceId)
+makeSimpleRoute(uint64_t faceId, std::optional<time::nanoseconds> expiration = std::nullopt)
{
Route route;
route.faceId = faceId;
- return route;
-}
-
-static Route
-makeSimpleRoute(uint64_t faceId, time::nanoseconds expiration)
-{
- Route route = makeSimpleRoute(faceId);
- route.expires = time::steady_clock::now() + expiration;
+ if (expiration) {
+ route.expires = time::steady_clock::now() + *expiration;
+ }
return route;
}
@@ -170,5 +166,6 @@
BOOST_AUTO_TEST_SUITE_END() // GetAnnouncement
BOOST_AUTO_TEST_SUITE_END() // TestRibEntry
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/rib-update.t.cpp b/tests/daemon/rib/rib-update.t.cpp
index 533439a..0941693 100644
--- a/tests/daemon/rib/rib-update.t.cpp
+++ b/tests/daemon/rib/rib-update.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,9 +33,10 @@
using namespace nfd::rib;
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_AUTO_TEST_SUITE(TestRibUpdate)
-BOOST_AUTO_TEST_CASE(BatchBasic)
+BOOST_AUTO_TEST_CASE(Batch)
{
const uint64_t faceId = 1;
RibUpdateBatch batch(faceId);
@@ -75,5 +76,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestRibUpdate
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/rib.t.cpp b/tests/daemon/rib/rib.t.cpp
index ad42323..d8ef5e1 100644
--- a/tests/daemon/rib/rib.t.cpp
+++ b/tests/daemon/rib/rib.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -35,6 +35,7 @@
using rib::Route;
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestRib, GlobalIoFixture)
BOOST_AUTO_TEST_CASE(Parent)
@@ -229,7 +230,7 @@
BOOST_CHECK_EQUAL(rib.size(), 1);
}
-BOOST_AUTO_TEST_CASE(RibSignals)
+BOOST_AUTO_TEST_CASE(Signals)
{
rib::Rib rib;
@@ -292,7 +293,7 @@
BOOST_CHECK_EQUAL(nAfterEraseEntryInvocations, 1);
}
-BOOST_AUTO_TEST_CASE(Output)
+BOOST_AUTO_TEST_CASE(Print)
{
rib::Rib rib;
@@ -330,5 +331,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestRib
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/route.t.cpp b/tests/daemon/rib/route.t.cpp
index c51e964..7133628 100644
--- a/tests/daemon/rib/route.t.cpp
+++ b/tests/daemon/rib/route.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -34,6 +34,7 @@
using rib::Route;
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestRoute, GlobalIoTimeFixture)
BOOST_AUTO_TEST_SUITE(CreateFromAnnouncement)
@@ -123,10 +124,7 @@
a.expires = std::nullopt;
BOOST_CHECK_EQUAL(a, b);
-}
-BOOST_AUTO_TEST_CASE(EqualityAnn)
-{
auto ann1 = makePrefixAnn("/ann", 1_h);
auto ann2 = makePrefixAnn("/ann", 2_h);
BOOST_CHECK_EQUAL(Route(ann1, 7001), Route(ann1, 7001));
@@ -134,7 +132,7 @@
BOOST_CHECK_NE(Route(ann1, 7001), Route(ann2, 7001));
}
-BOOST_AUTO_TEST_CASE(Output)
+BOOST_AUTO_TEST_CASE(Print)
{
Route r;
BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
@@ -160,5 +158,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestRoute
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/daemon/rib/service.t.cpp b/tests/daemon/rib/service.t.cpp
index 51189fc..9923efc 100644
--- a/tests/daemon/rib/service.t.cpp
+++ b/tests/daemon/rib/service.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -56,6 +56,7 @@
ndn::KeyChain m_ribKeyChain;
};
+BOOST_AUTO_TEST_SUITE(Rib)
BOOST_FIXTURE_TEST_SUITE(TestService, RibServiceFixture)
BOOST_AUTO_TEST_CASE(Basic)
@@ -146,5 +147,6 @@
BOOST_AUTO_TEST_SUITE_END() // ProcessConfig
BOOST_AUTO_TEST_SUITE_END() // TestService
+BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace nfd::tests
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 17ce4ef..50c2dab 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -91,7 +91,7 @@
}
if (m_faceUris.empty()) {
- NDN_THROW(std::runtime_error("No supported FaceUri pairs found in config file"));
+ NDN_THROW_NO_STACK(std::runtime_error("No supported FaceUri pairs found in config file"));
}
}
@@ -162,7 +162,8 @@
[[noreturn]] static void
onFaceCreationFailed(uint32_t status, const std::string& reason)
{
- NDN_THROW(std::runtime_error("Failed to create face: [" + std::to_string(status) + "] " + reason));
+ NDN_THROW_NO_STACK(std::runtime_error("Failed to create face: [" +
+ std::to_string(status) + "] " + reason));
}
private:
diff --git a/tests/wscript b/tests/wscript
index 6e27661..956fd0d 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -1,6 +1,6 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
"""
-Copyright (c) 2014-2023, Regents of the University of California,
+Copyright (c) 2014-2024, Regents of the University of California,
Arizona Board of Regents,
Colorado State University,
University Pierre & Marie Curie, Sorbonne University,
@@ -39,19 +39,20 @@
headers='../core/common.hpp boost-test.hpp',
defines=[tmpdir])
- for module in ['core', 'daemon', 'rib', 'tools']:
+ for module in ['core', 'daemon', 'tools']:
# main() for the module
- bld.objects(target=f'unit-tests-{module}-main',
- source='main.cpp',
- use='BOOST_TESTS',
- defines=[f'BOOST_TEST_MODULE=NFD {module.capitalize()}'])
+ bld.objects(
+ target=f'unit-tests-{module}-main',
+ source='main.cpp',
+ use='BOOST_TESTS',
+ defines=[f'BOOST_TEST_MODULE=NFD {module.capitalize()}'])
- subdir = 'daemon/rib' if module == 'rib' else module
- node = bld.path.find_dir(subdir)
- src = node.ant_glob('**/*.cpp', excl=['face/*ethernet*.cpp',
- 'face/pcap*.cpp',
- 'face/unix*.cpp',
- 'face/websocket*.cpp'])
+ node = bld.path.find_dir(module)
+ src = node.ant_glob('**/*.cpp',
+ excl=['face/*ethernet*.cpp',
+ 'face/pcap*.cpp',
+ 'face/unix*.cpp',
+ 'face/websocket*.cpp'])
if bld.env.HAVE_LIBPCAP:
src += node.ant_glob('face/*ethernet*.cpp')
src += node.ant_glob('face/pcap*.cpp')
@@ -59,19 +60,15 @@
src += node.ant_glob('face/unix*.cpp')
if bld.env.HAVE_WEBSOCKET:
src += node.ant_glob('face/websocket*.cpp')
- if module == 'rib':
- src += ['daemon/global-io-fixture.cpp',
- 'daemon/limited-io.cpp',
- 'daemon/rib-io-fixture.cpp']
- objmod = 'daemon' if module == 'rib' else module
# unit-tests binary for the module
- bld.program(name=f'unit-tests-{module}',
- target=f'{top}/unit-tests-{module}',
- source=src,
- use=f'{objmod}-objects tests-common unit-tests-{module}-main',
- defines=[tmpdir],
- install_path=None)
+ bld.program(
+ name=f'unit-tests-{module}',
+ target=f'{top}/unit-tests-{module}',
+ source=src,
+ use=f'{module}-objects tests-common unit-tests-{module}-main',
+ defines=[tmpdir],
+ install_path=None)
# Other tests (e.g., stress tests and benchmarks that can be enabled even if unit tests are disabled)
if bld.env.WITH_TESTS or bld.env.WITH_OTHER_TESTS: