From bac42e90c2acd01ed2693414066dbe31b6b544a8 Mon Sep 17 00:00:00 2001 From: dkijania Date: Tue, 10 Oct 2023 10:41:02 +0200 Subject: [PATCH] Removal of snarky js test in mina as one of step of spitting repos --- buildkite/src/Command/TestExecutive.dhall | 36 ---------- .../Jobs/Test/TestnetIntegrationTests.dhall | 9 +-- src/app/test_executive/snarkyjs.ml | 70 ------------------- src/app/test_executive/test_executive.ml | 1 - 4 files changed, 1 insertion(+), 115 deletions(-) delete mode 100644 src/app/test_executive/snarkyjs.ml diff --git a/buildkite/src/Command/TestExecutive.dhall b/buildkite/src/Command/TestExecutive.dhall index c8541dccd2d..524ea2c628f 100644 --- a/buildkite/src/Command/TestExecutive.dhall +++ b/buildkite/src/Command/TestExecutive.dhall @@ -28,41 +28,5 @@ in key = "integration-test-${testName}", target = Size.Integration, depends_on = dependsOn - }, - - buildJs = \(duneProfile : Text) -> - Command.build - Command.Config::{ - commands = - -- Build js test archive - RunInToolchain.runInToolchainBuster ([] : List Text) "./buildkite/scripts/build-js-tests.sh" - - # - - [ - -- Cache js test archive - Cmd.run "artifact-cache-helper.sh snarkyjs_test.tar.gz --upload" - ], - label = "Build JS integration tests", - key = "build-js-tests", - target = Size.XLarge - }, - - executeWithJs = \(testName : Text) -> \(dependsOn : List Command.TaggedKey.Type) -> - Command.build - Command.Config::{ - commands = - [ - Cmd.run "artifact-cache-helper.sh snarkyjs_test.tar.gz && tar -xzf snarkyjs_test.tar.gz", - - -- Execute test based on BUILD image - Cmd.run "MINA_DEB_CODENAME=bullseye ; source ./buildkite/scripts/export-git-env-vars.sh && ./buildkite/scripts/run-test-executive.sh ${testName}" - ], - artifact_paths = [SelectFiles.exactly "." "${testName}.test.log"], - label = "${testName} integration test", - key = "integration-test-${testName}", - target = Size.Integration, - depends_on = dependsOn, - soft_fail = Some (B/SoftFail.Boolean True) } } diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall index 96f6ab5e835..9dfff28ac56 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall @@ -9,11 +9,6 @@ let dependsOn = [ { name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" }, { name = "MinaArtifactBullseye", key = "archive-bullseye-docker-image" } ] -let dependsOnJs = [ - { name = "TestnetIntegrationTests", key = "build-js-tests" }, - { name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" }, - { name = "MinaArtifactBullseye", key = "archive-bullseye-docker-image" } -] in Pipeline.build Pipeline.Config::{ spec = @@ -31,7 +26,6 @@ in Pipeline.build Pipeline.Config::{ mode = PipelineMode.Type.Stable }, steps = [ - TestExecutive.buildJs "integration_tests", TestExecutive.execute "peers-reliability" dependsOn, TestExecutive.execute "chain-reliability" dependsOn, TestExecutive.execute "payment" dependsOn, @@ -42,7 +36,6 @@ in Pipeline.build Pipeline.Config::{ TestExecutive.execute "zkapps" dependsOn, TestExecutive.execute "zkapps-timing" dependsOn, TestExecutive.execute "zkapps-nonce" dependsOn, - TestExecutive.execute "verification-key" dependsOn, - TestExecutive.executeWithJs "snarkyjs" dependsOnJs + TestExecutive.execute "verification-key" dependsOn ] } diff --git a/src/app/test_executive/snarkyjs.ml b/src/app/test_executive/snarkyjs.ml deleted file mode 100644 index 70730d4c16d..00000000000 --- a/src/app/test_executive/snarkyjs.ml +++ /dev/null @@ -1,70 +0,0 @@ -open Core -open Async -open Integration_test_lib - -module Make (Inputs : Intf.Test.Inputs_intf) = struct - open Inputs - open Engine - open Dsl - - open Test_common.Make (Inputs) - - type network = Network.t - - type node = Network.Node.t - - type dsl = Dsl.t - - let config = - let open Test_config in - { default with - requires_graphql = true - ; genesis_ledger = - [ { account_name = "node-key"; balance = "8000000"; timing = Untimed } - ; { account_name = "extra-key"; balance = "10"; timing = Untimed } - ] - ; block_producers = [ { node_name = "node"; account_name = "node-key" } ] - } - - let check_and_print_stout_stderr ~logger process = - let open Deferred.Let_syntax in - let%map output = Async_unix.Process.collect_output_and_wait process in - let stdout = String.strip output.stdout in - [%log info] "Stdout: $stdout" ~metadata:[ ("stdout", `String stdout) ] ; - if not (String.is_empty output.stderr) then ( - [%log error] - "An error occured during the execution of the test script: \"%s\"" - output.stderr ; - Malleable_error.hard_error_string output.stderr ) - else Malleable_error.ok_unit - - let run network t = - let open Malleable_error.Let_syntax in - let logger = Logger.create () in - let node = - Core.String.Map.find_exn (Network.block_producers network) "node" - in - let%bind fee_payer_key = priv_key_of_node node in - let graphql_uri = Network.Node.get_ingress_uri node |> Uri.to_string in - - let%bind () = - [%log info] "Waiting for nodes to be initialized" ; - let%bind () = wait_for t (Wait_condition.node_to_initialize node) in - [%log info] "Running test script" ; - let%bind.Deferred result = - let%bind.Deferred process = - Async_unix.Process.create_exn - ~prog:"./src/lib/snarkyjs/tests/integration/node" - ~args: - [ "src/lib/snarkyjs/tests/integration/simple-zkapp.js" - ; Signature_lib.Private_key.to_base58_check fee_payer_key - ; graphql_uri - ] - () - in - check_and_print_stout_stderr ~logger process - in - section "Waiting for script to run and complete" result - in - return () -end diff --git a/src/app/test_executive/test_executive.ml b/src/app/test_executive/test_executive.ml index 49e43c123f2..583317827b5 100644 --- a/src/app/test_executive/test_executive.ml +++ b/src/app/test_executive/test_executive.ml @@ -64,7 +64,6 @@ let tests : test list = , (module Verification_key_update.Make : Intf.Test.Functor_intf) ) ; ( "block-prod-prio" , (module Block_production_priority.Make : Intf.Test.Functor_intf) ) - ; ("snarkyjs", (module Snarkyjs.Make : Intf.Test.Functor_intf)) ; ("block-reward", (module Block_reward_test.Make : Intf.Test.Functor_intf)) ; ("hard-fork", (module Hard_fork.Make : Intf.Test.Functor_intf)) ]