@@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
26
26
{
27
27
// Perform tests both obfuscated and non-obfuscated.
28
28
for (const bool obfuscate : {false , true }) {
29
- fs::path ph = GetDataDir () / (obfuscate ? " dbwrapper_obfuscate_true" : " dbwrapper_obfuscate_false" );
29
+ fs::path ph = m_args. GetDataDirPath () / (obfuscate ? " dbwrapper_obfuscate_true" : " dbwrapper_obfuscate_false" );
30
30
CDBWrapper dbw (ph, (1 << 20 ), true , false , obfuscate);
31
31
char key = ' k' ;
32
32
uint256 in = InsecureRand256 ();
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
45
45
{
46
46
// Perform tests both obfuscated and non-obfuscated.
47
47
for (bool obfuscate : {false , true }) {
48
- fs::path ph = GetDataDir () / (obfuscate ? " dbwrapper_1_obfuscate_true" : " dbwrapper_1_obfuscate_false" );
48
+ fs::path ph = m_args. GetDataDirPath () / (obfuscate ? " dbwrapper_1_obfuscate_true" : " dbwrapper_1_obfuscate_false" );
49
49
CDBWrapper dbw (ph, (1 << 20 ), false , true , obfuscate);
50
50
51
51
uint256 res;
@@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
126
126
{
127
127
// Perform tests both obfuscated and non-obfuscated.
128
128
for (const bool obfuscate : {false , true }) {
129
- fs::path ph = GetDataDir () / (obfuscate ? " dbwrapper_batch_obfuscate_true" : " dbwrapper_batch_obfuscate_false" );
129
+ fs::path ph = m_args. GetDataDirPath () / (obfuscate ? " dbwrapper_batch_obfuscate_true" : " dbwrapper_batch_obfuscate_false" );
130
130
CDBWrapper dbw (ph, (1 << 20 ), true , false , obfuscate);
131
131
132
132
char key = ' i' ;
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
162
162
{
163
163
// Perform tests both obfuscated and non-obfuscated.
164
164
for (const bool obfuscate : {false , true }) {
165
- fs::path ph = GetDataDir () / (obfuscate ? " dbwrapper_iterator_obfuscate_true" : " dbwrapper_iterator_obfuscate_false" );
165
+ fs::path ph = m_args. GetDataDirPath () / (obfuscate ? " dbwrapper_iterator_obfuscate_true" : " dbwrapper_iterator_obfuscate_false" );
166
166
CDBWrapper dbw (ph, (1 << 20 ), true , false , obfuscate);
167
167
168
168
// The two keys are intentionally chosen for ordering
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
202
202
BOOST_AUTO_TEST_CASE (existing_data_no_obfuscate)
203
203
{
204
204
// We're going to share this fs::path between two wrappers
205
- fs::path ph = GetDataDir () / " existing_data_no_obfuscate" ;
205
+ fs::path ph = m_args. GetDataDirPath () / " existing_data_no_obfuscate" ;
206
206
create_directories (ph);
207
207
208
208
// Set up a non-obfuscated wrapper to write some initial data.
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
243
243
BOOST_AUTO_TEST_CASE (existing_data_reindex)
244
244
{
245
245
// We're going to share this fs::path between two wrappers
246
- fs::path ph = GetDataDir () / " existing_data_reindex" ;
246
+ fs::path ph = m_args. GetDataDirPath () / " existing_data_reindex" ;
247
247
create_directories (ph);
248
248
249
249
// Set up a non-obfuscated wrapper to write some initial data.
@@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
278
278
279
279
BOOST_AUTO_TEST_CASE (iterator_ordering)
280
280
{
281
- fs::path ph = GetDataDir () / " iterator_ordering" ;
281
+ fs::path ph = m_args. GetDataDirPath () / " iterator_ordering" ;
282
282
CDBWrapper dbw (ph, (1 << 20 ), true , false , false );
283
283
for (int x=0x00 ; x<256 ; ++x) {
284
284
uint8_t key = x;
@@ -358,7 +358,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
358
358
{
359
359
char buf[10 ];
360
360
361
- fs::path ph = GetDataDir () / " iterator_string_ordering" ;
361
+ fs::path ph = m_args. GetDataDirPath () / " iterator_string_ordering" ;
362
362
CDBWrapper dbw (ph, (1 << 20 ), true , false , false );
363
363
for (int x=0x00 ; x<10 ; ++x) {
364
364
for (int y = 0 ; y < 10 ; y++) {
@@ -404,7 +404,7 @@ BOOST_AUTO_TEST_CASE(unicodepath)
404
404
// On Windows this test will fail if the directory is created using
405
405
// the ANSI CreateDirectoryA call and the code page isn't UTF8.
406
406
// It will succeed if created with CreateDirectoryW.
407
- fs::path ph = GetDataDir () / " test_runner_₿_🏃_20191128_104644" ;
407
+ fs::path ph = m_args. GetDataDirPath () / " test_runner_₿_🏃_20191128_104644" ;
408
408
CDBWrapper dbw (ph, (1 << 20 ));
409
409
410
410
fs::path lockPath = ph / " LOCK" ;
0 commit comments