Skip to content

Commit 001041d

Browse files
committed
Merge #11234: Remove redundant testutil.cpp|h files
d1138e3 Remove redundant testutil files (MeshCollider) Pull request description: The only function in testutil.cpp, `GetTempPath()` simply called `fs::temp_directory_path()` directly. This just tidies things up by removing that redundant function and the file containing it I can understand wanting a general util file for tests to use, but if there's nothing in it, we might as well remove it, it can always be added back later when it's put to use. Tree-SHA512: b923f99acf33328743755368a1aa90f5da4a7d5f61b163a4b0b894275c98db80a91edf8f051fbfb4893d970fda5a9078aae78a2672867ff521c4ca4b653c71c0
2 parents 3aa60b7 + d1138e3 commit 001041d

File tree

6 files changed

+3
-40
lines changed

6 files changed

+3
-40
lines changed

src/Makefile.qttest.include

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ TEST_QT_H = \
2525
qt/test/wallettests.h
2626

2727
TEST_BITCOIN_CPP = \
28-
test/test_bitcoin.cpp \
29-
test/testutil.cpp
28+
test/test_bitcoin.cpp
3029

3130
TEST_BITCOIN_H = \
32-
test/test_bitcoin.h \
33-
test/testutil.h
31+
test/test_bitcoin.h
3432

3533
qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
3634
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)

src/Makefile.test.include

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ BITCOIN_TESTS =\
7474
test/test_bitcoin.cpp \
7575
test/test_bitcoin.h \
7676
test/test_bitcoin_main.cpp \
77-
test/testutil.cpp \
78-
test/testutil.h \
7977
test/timedata_tests.cpp \
8078
test/torcontrol_tests.cpp \
8179
test/transaction_tests.cpp \

src/qt/test/rpcnestedtests.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "rpc/register.h"
1212
#include "rpc/server.h"
1313
#include "rpcconsole.h"
14-
#include "test/testutil.h"
1514
#include "test/test_bitcoin.h"
1615
#include "univalue.h"
1716
#include "util.h"

src/test/test_bitcoin.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
#include "rpc/register.h"
2323
#include "script/sigcache.h"
2424

25-
#include "test/testutil.h"
26-
2725
#include <memory>
2826

2927
uint256 insecure_rand_seed = GetRandHash();
@@ -61,7 +59,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
6159

6260
RegisterAllCoreRPCCommands(tableRPC);
6361
ClearDatadirCache();
64-
pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(100000)));
62+
pathTemp = fs::temp_directory_path() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(100000)));
6563
fs::create_directories(pathTemp);
6664
gArgs.ForceSetArg("-datadir", pathTemp.string());
6765

src/test/testutil.cpp

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/test/testutil.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)