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-p2p"
|
||||||
"tezos-shell-services"
|
"tezos-shell-services"
|
||||||
"tezos-protocol-updater"
|
"tezos-protocol-updater"
|
||||||
|
"tezos-embedded-protocol-demo" { test }
|
||||||
]
|
]
|
||||||
build: [
|
build: [
|
||||||
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
||||||
|
@ -2,36 +2,25 @@
|
|||||||
|
|
||||||
(executables
|
(executables
|
||||||
((names (test_context
|
((names (test_context
|
||||||
test_state
|
|
||||||
test_store))
|
test_store))
|
||||||
(libraries (tezos-base
|
(libraries (tezos-base
|
||||||
tezos-storage
|
tezos-storage
|
||||||
tezos-shell
|
|
||||||
tezos-embedded-protocol-demo
|
|
||||||
tezos-embedded-protocol-alpha
|
|
||||||
tezos-embedded-protocol-genesis
|
|
||||||
tezos-test-helpers))
|
tezos-test-helpers))
|
||||||
(flags (:standard -w -9-32
|
(flags (:standard -w -9-32
|
||||||
-safe-string
|
-safe-string
|
||||||
-open Tezos_base__TzPervasives
|
-open Tezos_base__TzPervasives
|
||||||
-open Tezos_test_helpers
|
-open Tezos_test_helpers
|
||||||
-open Tezos_storage
|
-open Tezos_storage))))
|
||||||
-open Tezos_shell))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name buildtest)
|
((name buildtest)
|
||||||
(deps (test_context.exe
|
(deps (test_context.exe
|
||||||
test_state.exe
|
|
||||||
test_store.exe))))
|
test_store.exe))))
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest_context)
|
((name runtest_context)
|
||||||
(action (run ${exe:test_context.exe}))))
|
(action (run ${exe:test_context.exe}))))
|
||||||
|
|
||||||
(alias
|
|
||||||
((name runtest_state)
|
|
||||||
(action (run ${exe:test_state.exe}))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest_store)
|
((name runtest_store)
|
||||||
(action (run ${exe:test_store.exe}))))
|
(action (run ${exe:test_store.exe}))))
|
||||||
@ -39,7 +28,6 @@
|
|||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((alias runtest_context)
|
(deps ((alias runtest_context)
|
||||||
(alias runtest_state)
|
|
||||||
(alias runtest_store)))))
|
(alias runtest_store)))))
|
||||||
|
|
||||||
(alias
|
(alias
|
@ -26,12 +26,6 @@ let genesis_protocol =
|
|||||||
let genesis_time =
|
let genesis_time =
|
||||||
Time.of_seconds 0L
|
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
|
let net_id = Net_id.of_block_hash genesis_block
|
||||||
|
|
||||||
(** Context creation *)
|
(** Context creation *)
|
||||||
@ -95,8 +89,8 @@ let wrap_context_init f base_dir =
|
|||||||
Context.init ~root ?patch_context:None >>= fun idx ->
|
Context.init ~root ?patch_context:None >>= fun idx ->
|
||||||
Context.commit_genesis idx
|
Context.commit_genesis idx
|
||||||
~net_id
|
~net_id
|
||||||
~time:genesis.time
|
~time:genesis_time
|
||||||
~protocol:genesis.protocol >>= fun genesis ->
|
~protocol:genesis_protocol >>= fun genesis ->
|
||||||
create_block2 idx genesis >>= fun block2 ->
|
create_block2 idx genesis >>= fun block2 ->
|
||||||
create_block3a idx block2 >>= fun block3a ->
|
create_block3a idx block2 >>= fun block3a ->
|
||||||
create_block3b idx block2 >>= fun block3b ->
|
create_block3b idx block2 >>= fun block3b ->
|
@ -26,12 +26,6 @@ let genesis_protocol =
|
|||||||
let genesis_time =
|
let genesis_time =
|
||||||
Time.of_seconds 0L
|
Time.of_seconds 0L
|
||||||
|
|
||||||
let genesis = {
|
|
||||||
State.Net.time = genesis_time ;
|
|
||||||
block = genesis_block ;
|
|
||||||
protocol = genesis_protocol ;
|
|
||||||
}
|
|
||||||
|
|
||||||
(** *)
|
(** *)
|
||||||
|
|
||||||
let wrap_store_init f base_dir =
|
let wrap_store_init f base_dir =
|
Loading…
Reference in New Issue
Block a user