mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 07:26:15 +01:00
test: split out system_ram_tests to signal when total ram cannot be determined
when `GetTotalRAM` returns an `std::nullopt` now we're getting:
```
The following tests did not run:
106 - system_ram_tests (Skipped)
```
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
#include <common/run_command.h>
|
||||
#include <univalue.h>
|
||||
|
||||
#include <common/system.h>
|
||||
|
||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
#include <util/subprocess.h>
|
||||
#endif // ENABLE_EXTERNAL_SIGNER
|
||||
@@ -18,17 +16,6 @@
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(system_tests, BasicTestingSetup)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(total_ram)
|
||||
{
|
||||
BOOST_CHECK_GE(GetTotalRAM(), 1000_MiB);
|
||||
|
||||
if constexpr (SIZE_MAX == UINT64_MAX) {
|
||||
// Upper bound check only on 64-bit: 32-bit systems can reasonably have max memory,
|
||||
// but extremely large values on 64-bit likely indicate detection errors
|
||||
BOOST_CHECK_LT(GetTotalRAM(), 10'000'000_MiB); // >10 TiB memory is unlikely
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
|
||||
BOOST_AUTO_TEST_CASE(run_command)
|
||||
|
||||
Reference in New Issue
Block a user