-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.nimble
36 lines (31 loc) · 914 Bytes
/
mix.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version = "0.1.0"
author = "Akshaya"
description = "A custom Mix Protocol"
license = "MIT"
# Dependencies
requires "chronos >= 4.0.3"
requires "libp2p >= 1.5.0"
requires "nim >= 2.0.8"
requires "nimcrypto >= 0.6.0"
requires "serialization >= 0.2.2"
# Set the source directory
srcDir = "src"
const TEST_DIRECTORY = "tests"
import strformat
proc runTest(filename: string, shouldRemoveTestBinary: bool = true) =
var execStr = "nim c -r"
exec fmt"{execStr} {TEST_DIRECTORY}/{filename}"
if shouldRemoveTestBinary:
rmFile fmt"{TEST_DIRECTORY}/{filename.toExe()}"
task test, "Run the test suite":
runTest("test_crypto")
runTest("test_curve25519")
runTest("test_fragmentation")
runTest("test_mix_message")
runTest("test_mix_node")
runTest("test_pow")
runTest("test_seqno_generator")
runTest("test_serialization")
runTest("test_sphinx")
runTest("test_tag_manager")
runTest("test_utils")