From 0e2a5e448f426219a6464b9aaadcc715534114e6 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 1 Oct 2020 23:24:00 -0700 Subject: 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. --- src/test/script_tests.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/test/script_tests.cpp') 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; -- cgit v1.2.3