Closed sushenghua closed 6 years ago
In docker with container from eosio/eos-dev 1.2.1
cd wps-backend/contracts ./build.sh
No problem.
However, when I ran build/test/unit_test, it gave following error
Random number generator seeded to 1535454476 Running 5 test cases... 10 assert_exception: Assert Exception wasm_file.is_open(): wasm file cannot be found {} thread-0 tester.cpp:33 read_wasm /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "committee_tests/manage_committee": Caught Unexpected Exception 10 assert_exception: Assert Exception wasm_file.is_open(): wasm file cannot be found {} thread-0 tester.cpp:33 read_wasm /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "proposal_tests/manage_proposal": Caught Unexpected Exception 10 assert_exception: Assert Exception wasm_file.is_open(): wasm file cannot be found {} thread-0 tester.cpp:33 read_wasm /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "proposer_tests/manage_proposer": Caught Unexpected Exception 10 assert_exception: Assert Exception wasm_file.is_open(): wasm file cannot be found {} thread-0 tester.cpp:33 read_wasm /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "reviewer_tests/manage_reviewer": Caught Unexpected Exception 10 assert_exception: Assert Exception wasm_file.is_open(): wasm file cannot be found {} thread-0 tester.cpp:33 read_wasm /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "wps_tests/flow_wps": Caught Unexpected Exception *** 5 failures are detected in the test module "Master Test Suite"
I made some changes to
contracts/tests/CMakeLists.txt
replaced
configure_file(${CMAKE_SOURCE_DIR}/contracts.hpp.in ${CMAKE_BINARY_DIR}/contracts.hpp)
with
set(ROOT_DIR ${CMAKE_SOURCE_DIR}/..) configure_file(${CMAKE_SOURCE_DIR}/contracts.hpp.in ${CMAKE_SOURCE_DIR}/contracts.hpp)
rebuilt and ran, I got:
Random number generator seeded to 1535454351 Running 5 test cases... 3050003 eosio_assert_message_exception: eosio_assert_message assertion failure assertion failure with message: symbol must be EOS {"s":"symbol must be EOS"} thread-0 wasm_interface.cpp:930 eosio_assert pending console output: {"console":""} thread-0 apply_context.cpp:61 exec_one transaction_header: {"expiration":"2020-01-01T00:00:08","ref_block_num":6,"ref_block_prefix":2462007400,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0}, billed_cpu_time_us: 2000 {"header":{"expiration":"2020-01-01T00:00:08","ref_block_num":6,"ref_block_prefix":2462007400,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0},"billed":2000} thread-0 tester.cpp:355 push_transaction {"code":"eosio.wps","acttype":"regproposal","auths":[{"actor":"proposer1","permission":"active"}],"data":{"proposer":"proposer1","id":1,"committee":"committee1","category":"emergency","subcategory":1,"title":"wps project title","summary":"wps proejct summary","project_img_url":"http://www.google.com","description":"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz","roadmap":"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz","duration":30,"members":["yepp4you","yepp4you2","yepp4you3"],"funding_goal":"10.0000 SYS","total_votes":0,"agree_votes":0,"disagree_votes":0,"status":1,"vote_start_time":0,"fund_start_time":0,"iteration_of_funding":0},"expiration":6,"delay_sec":0} thread-0 tester.cpp:427 push_action rethrow {} thread-0 test_proposal.cpp:260 test_method /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "proposal_tests/manage_proposal": Caught Unexpected Exception 3050003 eosio_assert_message_exception: eosio_assert_message assertion failure assertion failure with message: unable to find key {"s":"unable to find key"} thread-0 wasm_interface.cpp:930 eosio_assert pending console output: {"console":""} thread-0 apply_context.cpp:61 exec_one transaction_header: {"expiration":"2020-01-01T00:00:08","ref_block_num":5,"ref_block_prefix":2117354780,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0}, billed_cpu_time_us: 2000 {"header":{"expiration":"2020-01-01T00:00:08","ref_block_num":5,"ref_block_prefix":2117354780,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0},"billed":2000} thread-0 tester.cpp:355 push_transaction {"code":"eosio.token","acttype":"transfer","auths":[{"actor":"eosio","permission":"active"}],"data":{"from":"eosio","to":"eosio.wps","quantity":"100000.0000 EOS","memo":""},"expiration":6,"delay_sec":0} thread-0 tester.cpp:427 push_action /projects/wps-backend/contracts/tests/main.cpp(9): fatal error: in "wps_tests/flow_wps": Caught Unexpected Exception
I updated
contracts/eosio.wps/CMakeLists.txt contracts/eosio.wps/src/proposal.cpp contracts/tests/test_wps.cpp
to reference the 'CORE_SYMBOL_NAME' from the eos source build, then everything worked.
Thanks!
In docker with container from eosio/eos-dev 1.2.1
No problem.
However, when I ran build/test/unit_test, it gave following error
I made some changes to
replaced
with
rebuilt and ran, I got:
I updated
to reference the 'CORE_SYMBOL_NAME' from the eos source build, then everything worked.