Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yoshihiro503/fbcb8b72c729fc3164afe3d0096785af to your computer and use it in GitHub Desktop.
Save yoshihiro503/fbcb8b72c729fc3164afe3d0096785af to your computer and use it in GitHub Desktop.

formatting

フォーマットに準拠しているか検査

dune build @fmt

強制的にフォーマット

dune build @fmt --auto-promote

testings

src全体の単体テスト

unit test

make test-unit

プロトコルコードだけ、またはプロトコル以外の単体テスト

make test-proto-unit
make test-nonproto-unit

proto_alphaのlib_protocolだけテスト

dune build @src/proto_alpha/lib_protocol/runtest
@yoshihiro503
Copy link
Author

トラブルシュート

Error:
  the test is taking longer than 60 seconds

みたいなタイムアウトして単体テストがlocalで通らない時の対処:

src/proto_xxx/lib_delegate/test/test_scenario.ml

  let config =
    {
      default_config with
      timeout = Int32.to_int level_to_reach * 3 * 2 ; (* ←ここを大きい数字になるようにする*)
      round0 = 2L;
      round1 = 3L;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment