summaryrefslogtreecommitdiff
path: root/dht/bittorrent/dev
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2019-09-28 13:43:29 -0400
committerJoe Crayne <joe@jerkface.net>2020-01-01 19:27:53 -0500
commit11987749fc6e6d3e53ea737d46d5ab13a16faeb8 (patch)
tree5716463275c2d3e902889db619908ded2a73971c /dht/bittorrent/dev
parentadd2c76bced51fde5e9917e7449ef52be70faf87 (diff)
Factor out some new libraries
word64-map: Data.Word64Map network-addr: Network.Address tox-crypto: Crypto.Tox lifted-concurrent: Control.Concurrent.Lifted.Instrument Control.Concurrent.Async.Lifted.Instrument psq-wrap: Data.Wrapper.PSQInt Data.Wrapper.PSQ minmax-psq: Data.MinMaxPSQ tasks: Control.Concurrent.Tasks kad: Network.Kademlia Network.Kademlia.Bootstrap Network.Kademlia.Routing Network.Kademlia.CommonAPI Network.Kademlia.Persistence Network.Kademlia.Search
Diffstat (limited to 'dht/bittorrent/dev')
-rw-r--r--dht/bittorrent/dev/README.md4
-rwxr-xr-xdht/bittorrent/dev/add-sources.sh5
-rwxr-xr-xdht/bittorrent/dev/bench4
-rwxr-xr-xdht/bittorrent/dev/test2
-rwxr-xr-xdht/bittorrent/dev/update-dependencies.sh11
5 files changed, 26 insertions, 0 deletions
diff --git a/dht/bittorrent/dev/README.md b/dht/bittorrent/dev/README.md
new file mode 100644
index 00000000..e2cc51a6
--- /dev/null
+++ b/dht/bittorrent/dev/README.md
@@ -0,0 +1,4 @@
1This directory is for some dev scripts and other dev only stuff which
2we don't want to keep in the resulting `cabal sdist` generated
3tarball. Do _not_ include any of these files to .cabal file, neither
4to `extra-source-files` nor to `data-files` sections.
diff --git a/dht/bittorrent/dev/add-sources.sh b/dht/bittorrent/dev/add-sources.sh
new file mode 100755
index 00000000..e125cade
--- /dev/null
+++ b/dht/bittorrent/dev/add-sources.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2
3for s in $(ls $(dirname $0)/../sub); do
4 (cd $(dirname $0)/.. && cabal sandbox add-source sub/$s)
5done
diff --git a/dht/bittorrent/dev/bench b/dht/bittorrent/dev/bench
new file mode 100755
index 00000000..5d03db3f
--- /dev/null
+++ b/dht/bittorrent/dev/bench
@@ -0,0 +1,4 @@
1#!/bin/sh
2cabal-dev build &&
3 ./dist/build/benchmarks/benchmarks -o dist/build/benchmarks/result.html &&
4 xdg-open dist/build/benchmarks/result.html \ No newline at end of file
diff --git a/dht/bittorrent/dev/test b/dht/bittorrent/dev/test
new file mode 100755
index 00000000..2eb85df2
--- /dev/null
+++ b/dht/bittorrent/dev/test
@@ -0,0 +1,2 @@
1#!/bin/sh
2cabal-dev build && cabal-dev test || echo "ERROR: Some tests failed."
diff --git a/dht/bittorrent/dev/update-dependencies.sh b/dht/bittorrent/dev/update-dependencies.sh
new file mode 100755
index 00000000..c83694c3
--- /dev/null
+++ b/dht/bittorrent/dev/update-dependencies.sh
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3cd $(dirname $0)/..
4
5git submodule init
6git submodule foreach git fetch
7git submodule update --recursive --checkout --force
8
9$(dirname $0)/add-sources.sh
10
11cabal install --enable-tests --only-dependencies --reinstall