From ce87cbd769e0874977da67d1af2af57011a7f0e9 Mon Sep 17 00:00:00 2001 From: Marto Date: Fri, 9 Feb 2024 16:56:33 +0200 Subject: [PATCH] Refactoring --- .github/workflows/ci.yml | 1 - README.md | 2 +- all_test.md | 3 -- misc/test_macro.nim | 103 --------------------------------------- misc/vm_compile_info.nim | 31 ------------ nim.projectMapping | 8 +++ raft.nimble | 32 +----------- raft.nims | 1 - raft/async_util.nim | 59 ---------------------- raft_node_config.json | 34 ------------- run_all_tests.sh | 2 - tests/all_tests.nim | 7 +-- 12 files changed, 12 insertions(+), 271 deletions(-) delete mode 100644 all_test.md delete mode 100644 misc/test_macro.nim delete mode 100644 misc/vm_compile_info.nim create mode 100644 nim.projectMapping delete mode 120000 raft.nims delete mode 100644 raft/async_util.nim delete mode 100644 raft_node_config.json delete mode 100755 run_all_tests.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adc9ffc..497c12f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,5 +167,4 @@ jobs: fi nim --version nimble --version - nimble build nimble test \ No newline at end of file diff --git a/README.md b/README.md index 1437e57..2fefc4b 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ It will ensure better testability and integrability. # Run test -`./run_all_tests.sh` \ No newline at end of file +`nimble test` \ No newline at end of file diff --git a/all_test.md b/all_test.md deleted file mode 100644 index a92090e..0000000 --- a/all_test.md +++ /dev/null @@ -1,3 +0,0 @@ -* testbasictimers - 504 milliseconds, 149 microseconds, and 657 nanoseconds -* testbasicstatemachine - 1 millisecond, 831 microseconds, and 189 nanoseconds -* testbasicclusterelection - 2 minutes, 80 milliseconds, 340 microseconds, and 536 nanoseconds diff --git a/misc/test_macro.nim b/misc/test_macro.nim deleted file mode 100644 index 2cb9900..0000000 --- a/misc/test_macro.nim +++ /dev/null @@ -1,103 +0,0 @@ -# nim-raft -# Copyright (c) 2023 Status Research & Development GmbH -# Licensed under either of -# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) -# * MIT license ([LICENSE-MIT](LICENSE-MIT)) -# at your option. -# This file may not be copied, modified, or distributed except according to -# those terms. - -import std/times -import vm_compile_info -import macros, strutils, os, unittest2, osproc -import threadpool - -export strutils, os, unittest2, osproc, threadpool - -# AppVeyor may go out of memory with the default of 4 -setMinPoolSize(2) - -proc executeMyself(numModules: int, names: openArray[string]): int = - let appName = getAppFilename() - var elpdList = newSeq[Duration](numModules) - for i in 0..= 1.6.14" requires "stew >= 0.1.0" requires "unittest2 >= 0.0.4" requires "uuids >= 0.1.11" -requires "chronicles >= 0.10.3" -requires "chronos >= 3.0.11" -requires "nimdbx >= 0.4.1" requires "nimterop >= 0.6.13" -proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = - if not dirExists "build": - mkDir "build" - # allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims" - var extra_params = params - for i in 2..