Test: split test/shell
into src/lib_{storage,shell}
This commit is contained in:
parent
868514af2b
commit
4d5e55595b
32
src/lib_shell/test/jbuild
Normal file
32
src/lib_shell/test/jbuild
Normal file
@ -0,0 +1,32 @@
|
||||
(jbuild_version 1)
|
||||
|
||||
(executables
|
||||
((names (test_state))
|
||||
(libraries (tezos-base
|
||||
tezos-storage
|
||||
tezos-shell
|
||||
tezos-embedded-protocol-demo
|
||||
tezos-test-helpers))
|
||||
(flags (:standard -w -9-32
|
||||
-safe-string
|
||||
-open Tezos_base__TzPervasives
|
||||
-open Tezos_test_helpers
|
||||
-open Tezos_storage
|
||||
-open Tezos_shell))))
|
||||
|
||||
(alias
|
||||
((name buildtest)
|
||||
(deps (test_state.exe))))
|
||||
|
||||
(alias
|
||||
((name runtest_state)
|
||||
(action (run ${exe:test_state.exe}))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((alias runtest_state)))))
|
||||
|
||||
(alias
|
||||
((name runtest_indent)
|
||||
(deps ((glob_files *.ml) (glob_files *.mli)))
|
||||
(action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${^}))))
|
@ -14,6 +14,7 @@ depends: [
|
||||
"tezos-p2p"
|
||||
"tezos-shell-services"
|
||||
"tezos-protocol-updater"
|
||||
"tezos-embedded-protocol-demo" { test }
|
||||
]
|
||||
build: [
|
||||
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
||||
|
@ -2,36 +2,25 @@
|
||||
|
||||
(executables
|
||||
((names (test_context
|
||||
test_state
|
||||
test_store))
|
||||
(libraries (tezos-base
|
||||
tezos-storage
|
||||
tezos-shell
|
||||
tezos-embedded-protocol-demo
|
||||
tezos-embedded-protocol-alpha
|
||||
tezos-embedded-protocol-genesis
|
||||
tezos-test-helpers))
|
||||
(flags (:standard -w -9-32
|
||||
-safe-string
|
||||
-open Tezos_base__TzPervasives
|
||||
-open Tezos_test_helpers
|
||||
-open Tezos_storage
|
||||
-open Tezos_shell))))
|
||||
-open Tezos_storage))))
|
||||
|
||||
(alias
|
||||
((name buildtest)
|
||||
(deps (test_context.exe
|
||||
test_state.exe
|
||||
test_store.exe))))
|
||||
|
||||
(alias
|
||||
((name runtest_context)
|
||||
(action (run ${exe:test_context.exe}))))
|
||||
|
||||
(alias
|
||||
((name runtest_state)
|
||||
(action (run ${exe:test_state.exe}))))
|
||||
|
||||
(alias
|
||||
((name runtest_store)
|
||||
(action (run ${exe:test_store.exe}))))
|
||||
@ -39,7 +28,6 @@
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((alias runtest_context)
|
||||
(alias runtest_state)
|
||||
(alias runtest_store)))))
|
||||
|
||||
(alias
|
@ -26,12 +26,6 @@ let genesis_protocol =
|
||||
let genesis_time =
|
||||
Time.of_seconds 0L
|
||||
|
||||
let genesis : State.Net.genesis = {
|
||||
time = genesis_time ;
|
||||
block = genesis_block ;
|
||||
protocol = genesis_protocol ;
|
||||
}
|
||||
|
||||
let net_id = Net_id.of_block_hash genesis_block
|
||||
|
||||
(** Context creation *)
|
||||
@ -95,8 +89,8 @@ let wrap_context_init f base_dir =
|
||||
Context.init ~root ?patch_context:None >>= fun idx ->
|
||||
Context.commit_genesis idx
|
||||
~net_id
|
||||
~time:genesis.time
|
||||
~protocol:genesis.protocol >>= fun genesis ->
|
||||
~time:genesis_time
|
||||
~protocol:genesis_protocol >>= fun genesis ->
|
||||
create_block2 idx genesis >>= fun block2 ->
|
||||
create_block3a idx block2 >>= fun block3a ->
|
||||
create_block3b idx block2 >>= fun block3b ->
|
@ -26,12 +26,6 @@ let genesis_protocol =
|
||||
let genesis_time =
|
||||
Time.of_seconds 0L
|
||||
|
||||
let genesis = {
|
||||
State.Net.time = genesis_time ;
|
||||
block = genesis_block ;
|
||||
protocol = genesis_protocol ;
|
||||
}
|
||||
|
||||
(** *)
|
||||
|
||||
let wrap_store_init f base_dir =
|
Loading…
Reference in New Issue
Block a user