mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
test: Pin and document TEST_DIR_PATH_ELEMENT
This commit is contained in:
@@ -63,7 +63,7 @@ build/src/test/test_bitcoin --run_test=getarg_tests/doubledash
|
||||
```
|
||||
|
||||
`test_bitcoin` creates a temporary working (data) directory with a randomly
|
||||
generated pathname within `test_common_Bitcoin Core/`, which in turn is within
|
||||
generated pathname within `test_common bitcoin/`, which in turn is within
|
||||
the system's temporary directory (see
|
||||
[`temp_directory_path`](https://en.cppreference.com/w/cpp/filesystem/temp_directory_path)).
|
||||
This data directory looks like a simplified form of the standard `bitcoind` data
|
||||
@@ -73,7 +73,7 @@ have a `debug.log` file, for example.
|
||||
The location of the temporary data directory can be specified with the
|
||||
`-testdatadir` option. This can make debugging easier. The directory
|
||||
path used is the argument path appended with
|
||||
`/test_common_Bitcoin Core/<test-name>/datadir`.
|
||||
`/test_common bitcoin/<test-name>/datadir`.
|
||||
The directory path is created if necessary.
|
||||
Specifying this argument also causes the data directory
|
||||
not to be removed after the last test. This is useful for looking at
|
||||
@@ -83,11 +83,11 @@ so no leftover state is used.)
|
||||
|
||||
```bash
|
||||
$ build/src/test/test_bitcoin --run_test=getarg_tests/doubledash -- -testdatadir=/somewhere/mydatadir
|
||||
Test directory (will not be deleted): "/somewhere/mydatadir/test_common_Bitcoin Core/getarg_tests/doubledash/datadir"
|
||||
Test directory (will not be deleted): "/somewhere/mydatadir/test_common bitcoin/getarg_tests/doubledash/datadir"
|
||||
Running 1 test case...
|
||||
|
||||
*** No errors detected
|
||||
$ ls -l '/somewhere/mydatadir/test_common_Bitcoin Core/getarg_tests/doubledash/datadir'
|
||||
$ ls -l '/somewhere/mydatadir/test_common bitcoin/getarg_tests/doubledash/datadir'
|
||||
total 8
|
||||
drwxrwxr-x 2 admin admin 4096 Nov 27 22:45 blocks
|
||||
-rw-rw-r-- 1 admin admin 1003 Nov 27 22:45 debug.log
|
||||
|
||||
Reference in New Issue
Block a user