You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.test.include 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. # Copyright (c) 2013-2016 The Starwels developers
  2. # Distributed under the MIT software license, see the accompanying
  3. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. TESTS += test/test_starwels
  5. bin_PROGRAMS += test/test_starwels
  6. noinst_PROGRAMS += test/test_starwels_fuzzy
  7. TEST_SRCDIR = test
  8. TEST_BINARY=test/test_starwels$(EXEEXT)
  9. JSON_TEST_FILES = \
  10. test/data/script_tests.json \
  11. test/data/base58_keys_valid.json \
  12. test/data/base58_encode_decode.json \
  13. test/data/base58_keys_invalid.json \
  14. test/data/tx_invalid.json \
  15. test/data/tx_valid.json \
  16. test/data/sighash.json
  17. RAW_TEST_FILES =
  18. GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
  19. # test_starwels binary #
  20. STARWELS_TESTS =\
  21. test/arith_uint256_tests.cpp \
  22. test/scriptnum10.h \
  23. test/addrman_tests.cpp \
  24. test/amount_tests.cpp \
  25. test/allocator_tests.cpp \
  26. test/base32_tests.cpp \
  27. test/base58_tests.cpp \
  28. test/base64_tests.cpp \
  29. test/bip32_tests.cpp \
  30. test/blockencodings_tests.cpp \
  31. test/bloom_tests.cpp \
  32. test/bswap_tests.cpp \
  33. test/checkqueue_tests.cpp \
  34. test/coins_tests.cpp \
  35. test/compress_tests.cpp \
  36. test/crypto_tests.cpp \
  37. test/cuckoocache_tests.cpp \
  38. test/DoS_tests.cpp \
  39. test/getarg_tests.cpp \
  40. test/hash_tests.cpp \
  41. test/key_tests.cpp \
  42. test/limitedmap_tests.cpp \
  43. test/dbwrapper_tests.cpp \
  44. test/main_tests.cpp \
  45. test/mempool_tests.cpp \
  46. test/merkle_tests.cpp \
  47. test/miner_tests.cpp \
  48. test/multisig_tests.cpp \
  49. test/net_tests.cpp \
  50. test/netbase_tests.cpp \
  51. test/pmt_tests.cpp \
  52. test/policyestimator_tests.cpp \
  53. test/pow_tests.cpp \
  54. test/prevector_tests.cpp \
  55. test/raii_event_tests.cpp \
  56. test/random_tests.cpp \
  57. test/reverselock_tests.cpp \
  58. test/rpc_tests.cpp \
  59. test/sanity_tests.cpp \
  60. test/scheduler_tests.cpp \
  61. test/script_P2SH_tests.cpp \
  62. test/script_tests.cpp \
  63. test/script_standard_tests.cpp \
  64. test/scriptnum_tests.cpp \
  65. test/serialize_tests.cpp \
  66. test/sighash_tests.cpp \
  67. test/sigopcount_tests.cpp \
  68. test/skiplist_tests.cpp \
  69. test/streams_tests.cpp \
  70. test/test_starwels.cpp \
  71. test/test_starwels.h \
  72. test/test_starwels_main.cpp \
  73. test/timedata_tests.cpp \
  74. test/torcontrol_tests.cpp \
  75. test/transaction_tests.cpp \
  76. test/txvalidationcache_tests.cpp \
  77. test/versionbits_tests.cpp \
  78. test/uint256_tests.cpp \
  79. test/univalue_tests.cpp \
  80. test/util_tests.cpp
  81. if ENABLE_WALLET
  82. STARWELS_TESTS += \
  83. wallet/test/wallet_test_fixture.cpp \
  84. wallet/test/wallet_test_fixture.h \
  85. wallet/test/accounting_tests.cpp \
  86. wallet/test/wallet_tests.cpp \
  87. wallet/test/crypto_tests.cpp
  88. endif
  89. test_test_starwels_SOURCES = $(STARWELS_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
  90. test_test_starwels_CPPFLAGS = $(AM_CPPFLAGS) $(STARWELS_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS)
  91. test_test_starwels_LDADD =
  92. if ENABLE_WALLET
  93. test_test_starwels_LDADD += $(LIBSTARWELS_WALLET)
  94. endif
  95. test_test_starwels_LDADD += $(LIBSTARWELS_SERVER) $(LIBSTARWELS_CLI) $(LIBSTARWELS_COMMON) $(LIBSTARWELS_UTIL) $(LIBSTARWELS_CONSENSUS) $(LIBSTARWELS_CRYPTO) $(LIBUNIVALUE) \
  96. $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS)
  97. test_test_starwels_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
  98. test_test_starwels_LDADD += $(LIBSTARWELS_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
  99. test_test_starwels_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
  100. if ENABLE_ZMQ
  101. test_test_starwels_LDADD += $(ZMQ_LIBS)
  102. endif
  103. #
  104. # test_starwels_fuzzy binary #
  105. test_test_starwels_fuzzy_SOURCES = test/test_starwels_fuzzy.cpp
  106. test_test_starwels_fuzzy_CPPFLAGS = $(AM_CPPFLAGS) $(STARWELS_INCLUDES)
  107. test_test_starwels_fuzzy_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
  108. test_test_starwels_fuzzy_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
  109. test_test_starwels_fuzzy_LDADD = \
  110. $(LIBUNIVALUE) \
  111. $(LIBSTARWELS_SERVER) \
  112. $(LIBSTARWELS_COMMON) \
  113. $(LIBSTARWELS_UTIL) \
  114. $(LIBSTARWELS_CONSENSUS) \
  115. $(LIBSTARWELS_CRYPTO) \
  116. $(LIBSECP256K1)
  117. test_test_starwels_fuzzy_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
  118. #
  119. nodist_test_test_starwels_SOURCES = $(GENERATED_TEST_FILES)
  120. $(STARWELS_TESTS): $(GENERATED_TEST_FILES)
  121. CLEAN_STARWELS_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
  122. CLEANFILES += $(CLEAN_STARWELS_TEST)
  123. starwels_test: $(TEST_BINARY)
  124. starwels_test_check: $(TEST_BINARY) FORCE
  125. $(MAKE) check-TESTS TESTS=$^
  126. starwels_test_clean : FORCE
  127. rm -f $(CLEAN_STARWELS_TEST) $(test_test_starwels_OBJECTS) $(TEST_BINARY)
  128. check-local:
  129. @echo "Running test/util/starwels-util-test.py..."
  130. $(PYTHON) $(top_builddir)/test/util/starwels-util-test.py
  131. $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
  132. if EMBEDDED_UNIVALUE
  133. $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check
  134. endif
  135. %.json.h: %.json
  136. @$(MKDIR_P) $(@D)
  137. @{ \
  138. echo "namespace json_tests{" && \
  139. echo "static unsigned const char $(*F)[] = {" && \
  140. $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
  141. echo "};};"; \
  142. } > "$@.new" && mv -f "$@.new" "$@"
  143. @echo "Generated $@"