Skip to content

Commit

Permalink
Merge #11234: Remove redundant testutil.cpp|h files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
laanwj committed Sep 5, 2017
2 parents 3aa60b7 + d1138e3 commit 001041d
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 40 deletions.
6 changes: 2 additions & 4 deletions src/Makefile.qttest.include
Expand Up @@ -25,12 +25,10 @@ TEST_QT_H = \
qt/test/wallettests.h

TEST_BITCOIN_CPP = \
test/test_bitcoin.cpp \
test/testutil.cpp
test/test_bitcoin.cpp

TEST_BITCOIN_H = \
test/test_bitcoin.h \
test/testutil.h
test/test_bitcoin.h

qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
Expand Down
2 changes: 0 additions & 2 deletions src/Makefile.test.include
Expand Up @@ -74,8 +74,6 @@ BITCOIN_TESTS =\
test/test_bitcoin.cpp \
test/test_bitcoin.h \
test/test_bitcoin_main.cpp \
test/testutil.cpp \
test/testutil.h \
test/timedata_tests.cpp \
test/torcontrol_tests.cpp \
test/transaction_tests.cpp \
Expand Down
1 change: 0 additions & 1 deletion src/qt/test/rpcnestedtests.cpp
Expand Up @@ -11,7 +11,6 @@
#include "rpc/register.h"
#include "rpc/server.h"
#include "rpcconsole.h"
#include "test/testutil.h"
#include "test/test_bitcoin.h"
#include "univalue.h"
#include "util.h"
Expand Down
4 changes: 1 addition & 3 deletions src/test/test_bitcoin.cpp
Expand Up @@ -22,8 +22,6 @@
#include "rpc/register.h"
#include "script/sigcache.h"

#include "test/testutil.h"

#include <memory>

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

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

Expand Down
15 changes: 0 additions & 15 deletions src/test/testutil.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions src/test/testutil.h

This file was deleted.

0 comments on commit 001041d

Please sign in to comment.