aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-10-01 23:24:00 -0700
committerPieter Wuille <pieter@wuille.net>2020-10-12 17:18:47 -0700
commit0e2a5e448f426219a6464b9aaadcc715534114e6 (patch)
treeb277fd73cf801b7066d1dee33b2b8858b98cb7b5 /src/test/script_tests.cpp
parent4567ba034c5ae6e6cc161360f7425c9e844738f0 (diff)
downloadbitcoin-0e2a5e448f426219a6464b9aaadcc715534114e6.tar.xz
tests: dumping and minimizing of script assets data
This adds a --dumptests flag to the feature_taproot.py test, to dump all its generated test cases to files, in a format compatible with the script_assets_test unit test. A fuzzer for said format is added as well, whose primary purpose is coverage-based minimization of those dumps.
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 3132f440af..a2efd8ac07 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -1715,6 +1715,9 @@ static void AssetTest(const UniValue& test)
BOOST_AUTO_TEST_CASE(script_assets_test)
{
+ // See src/test/fuzz/script_assets_test_minimizer.cpp for information on how to generate
+ // the script_assets_test.json file used by this test.
+
const char* dir = std::getenv("DIR_UNIT_TEST_DATA");
BOOST_WARN_MESSAGE(dir != nullptr, "Variable DIR_UNIT_TEST_DATA unset, skipping script_assets_test");
if (dir == nullptr) return;