Adding tool to spawn iTerm configuration for monitoring logs of the current cell…
… instances: 'onos-iterm-logs' Adding tool to spawn iTerm configuration for executing commands against the current cell instances: 'onos-iterm-cli' Change-Id: I356603eb9b77779e2c1025adf0cf2c8816acd1ed
Showing
2 changed files
with
84 additions
and
0 deletions
tools/test/bin/onos-iterm-cli
0 → 100755
1 | +#!/bin/bash | ||
2 | +#------------------------------------------------------------------------------- | ||
3 | +# Test utility to spawn an iTerm window for testing against current cell. | ||
4 | +#------------------------------------------------------------------------------- | ||
5 | + | ||
6 | +cellName=$ONOS_CELL | ||
7 | +nodeCount=$(env | egrep "OC[0-9]+" | wc -l | tr -d ' ') | ||
8 | + | ||
9 | +osascript -e " | ||
10 | +tell application \"iTerm\" | ||
11 | + | ||
12 | + set cellName to \"$cellName\" | ||
13 | + set paneCount to $nodeCount | ||
14 | + | ||
15 | + set theTerm to (make new terminal) | ||
16 | + | ||
17 | + tell theTerm | ||
18 | + set number of columns to 292 | ||
19 | + set number of rows to 24 | ||
20 | + launch session \"Default\" | ||
21 | + tell the current session | ||
22 | + set name to \"ONOS Shell 1\" | ||
23 | + write text \"cell \" & cellName | ||
24 | + write text \"oi 1 && clear && echo Node \$OCI\" | ||
25 | + end tell | ||
26 | + end tell | ||
27 | + | ||
28 | + tell theTerm | ||
29 | + repeat with thePane from 2 to paneCount | ||
30 | + tell the current session | ||
31 | + tell application \"System Events\" to keystroke \"d\" using command down | ||
32 | + set name to \"ONOS Shell \" & thePane | ||
33 | + write text \"cell \" & cellName | ||
34 | + write text \"oi \" & thePane & \" && clear && echo Node \$OCI\" | ||
35 | + end tell | ||
36 | + end repeat | ||
37 | + end tell | ||
38 | + | ||
39 | + tell application \"System Events\" to keystroke \"I\" using command down | ||
40 | + | ||
41 | +end tell | ||
42 | +" |
tools/test/bin/onos-iterm-logs
0 → 100755
1 | +#!/bin/bash | ||
2 | +#------------------------------------------------------------------------------- | ||
3 | +# Test utility to spawn an iTerm window for monitoring logs of current cell. | ||
4 | +#------------------------------------------------------------------------------- | ||
5 | + | ||
6 | +cellName=$ONOS_CELL | ||
7 | +nodeCount=$(env | egrep "OC[0-9]+" | wc -l | tr -d ' ') | ||
8 | + | ||
9 | +osascript -e " | ||
10 | +tell application \"iTerm\" | ||
11 | + | ||
12 | + set cellName to \"$cellName\" | ||
13 | + set paneCount to $nodeCount | ||
14 | + | ||
15 | + set theTerm to (make new terminal) | ||
16 | + | ||
17 | + tell theTerm | ||
18 | + set number of columns to 292 | ||
19 | + set number of rows to 64 | ||
20 | + launch session \"Default\" | ||
21 | + tell the current session | ||
22 | + set name to \"ONOS Log 1\" | ||
23 | + write text \"cell \" & cellName | ||
24 | + write text \"oi 1 && clear && echo Node \$OCI && ol\" | ||
25 | + end tell | ||
26 | + end tell | ||
27 | + | ||
28 | + tell theTerm | ||
29 | + repeat with thePane from 2 to paneCount | ||
30 | + tell the current session | ||
31 | + tell application \"System Events\" to keystroke \"D\" using command down | ||
32 | + set name to \"ONOS Log \" & thePane | ||
33 | + write text \"cell \" & cellName | ||
34 | + write text \"oi \" & thePane & \" && clear && echo Node \$OCI && ol\" | ||
35 | + end tell | ||
36 | + end repeat | ||
37 | + end tell | ||
38 | + | ||
39 | + tell application \"System Events\" to keystroke \"I\" using command down | ||
40 | + | ||
41 | +end tell | ||
42 | +" |
-
Please register or login to post a comment