Skip to content

Commit 8709a1a

Browse files
Michael Hueschencleverca22
Michael Hueschen
authored andcommitted
[DEVOPS-1131] Add README, tweak scripts, add gitignore entry
1 parent f477203 commit 8709a1a

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ scripts/haskell/dependencies.hi
7373
scripts/haskell/dependencies.o
7474
scripts/haskell/dependencies
7575

76+
# script-runner state
77+
script-runner/states/
78+
7679
# Cache for pkgs/generate.sh
7780
/pkgs/.cabal/
7881
/pkgs/.stack/

script-runner/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# script-runner
2+
3+
This module contains scripts to perform tests at the cluster level - running clusters of nodes, issuing update proposals to them, restarting them, etc. Some of the code here was extracted from the `auxx` package and reworked.
4+
5+
### Usage
6+
7+
See the `stack-gui` and `stack-test` scripts which contain usage commands.

script-runner/stack-gui

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22

33
# usage: ./stack-gui testnet
44

5+
# UI usage:
6+
#
7+
# Up/down arrows: navigate menus
8+
# Left arrow: return to higher menu level
9+
# Enter: activate menu items
10+
# 'q': return to higher menu level or (at toplevel) quit the Brick UI
11+
512
set -e
613
set -x
714

815
pushd ..
916
stack build cardano-sl-script-runner cardano-sl-node cardano-sl-tools
10-
export PATH=$(realpath .stack-work/install/x86_64-linux-nix/lts-12.17/8.4.4/bin/):$PATH
17+
export PATH=$(realpath $(stack path --local-install-root)/bin):$PATH
1118
popd
1219

1320
NAME=$1

script-runner/stack-test

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# usage: ./stack-test test4.2
44

5+
# on Mac (and OS's with different `mktemp` versions)
6+
# usage: ALT_MKTEMP=1 ./stack-test test4.2
7+
58
set -e
69
set -x
710

811
pushd ..
912
stack build cardano-sl-script-runner cardano-sl-node cardano-sl-tools
10-
export PATH=$(realpath .stack-work/install/x86_64-linux-nix/lts-12.17/8.4.4/bin/):$PATH
13+
export PATH=$(realpath $(stack path --local-install-root)/bin):$PATH
1114
popd
1215

1316
export SCRIPT=$1
@@ -17,7 +20,12 @@ LOGCFG=$(realpath ./log-config.yaml)
1720
TOPO=$(realpath ./topology-local.yaml)
1821
POLFILE=$(realpath ../scripts/policies/policy_script-runner.yaml)
1922

20-
T=$(mktemp -d -p . testrun-XXXXXX)
23+
if [ -z "$ALT_MKTEMP" ]; then
24+
T=$(mktemp -d -t . testrun-XXXXXX)
25+
else
26+
T=$(mktemp -d -p . testrun-XXXXXX)
27+
fi
28+
2129
cd $T
2230
mkdir poc-state
2331

0 commit comments

Comments
 (0)