diff options
author | Bernard Ogden <bernie.ogden@linaro.org> | 2014-10-02 14:41:58 +0100 |
---|---|---|
committer | Bernard Ogden <bernie.ogden@linaro.org> | 2014-10-02 14:41:58 +0100 |
commit | 213dfb55ee635dd7a9c65749a78c1b3e156b8246 (patch) | |
tree | d8942be22f2bfc7f2f935df18863cbf236b0200b | |
parent | 67c9ee23ae4d4b3ae7fcb10e03d6a9062d72ca65 (diff) |
Support boot/IP addr notification via netcat
-rw-r--r-- | bench-session-debian.yaml | 4 | ||||
-rw-r--r-- | bench-session-oe.yaml | 4 | ||||
-rwxr-xr-x | invoke_session_debian | 4 | ||||
-rwxr-xr-x | invoke_session_oe | 4 |
4 files changed, 14 insertions, 2 deletions
diff --git a/bench-session-debian.yaml b/bench-session-debian.yaml index e966e11..0f21d8a 100644 --- a/bench-session-debian.yaml +++ b/bench-session-debian.yaml @@ -7,6 +7,8 @@ metadata: params: PUB_KEY: None GATEWAY: 10.0.0.1 + LISTENER_ADDR: NONE + LISTENER_PORT: NONE install: deps: @@ -19,4 +21,4 @@ install: run: steps: - ./setup_session_debian "$PUB_KEY" - - ./invoke_session_debian "$GATEWAY" + - ./invoke_session_debian "$GATEWAY" "$LISTENER_ADDR" "$LISTENER_PORT" diff --git a/bench-session-oe.yaml b/bench-session-oe.yaml index f1f3664..090acf6 100644 --- a/bench-session-oe.yaml +++ b/bench-session-oe.yaml @@ -7,8 +7,10 @@ metadata: params: PUB_KEY: None GATEWAY: 10.0.0.1 + LISTENER_ADDR: NONE + LISTENER_PORT: NONE run: steps: - ./setup_session_oe "$PUB_KEY" - - ./invoke_session_oe "$GATEWAY" + - ./invoke_session_oe "$GATEWAY" "$LISTENER_ADDR" "$LISTENER_PORT" diff --git a/invoke_session_debian b/invoke_session_debian index c344708..84c05d9 100755 --- a/invoke_session_debian +++ b/invoke_session_debian @@ -3,6 +3,8 @@ # Hack for now until lava-test-shell is smart enough to know it's dispatcher ip gateway=$1 +listener_addr=$2 +listener_port=$3 echo "Target's Gateway: $gateway" if ! grep 'invoke_session' /etc/rc.local @@ -37,6 +39,8 @@ mkdir -p /run mkdir -p /run/hacking echo $$ > /run/hacking/hacking.pid +echo "${ip_addr}" | nc "${listener_addr}" "${listener_port}" + #suspend in a way that is portable across shells and doesn't involve a busy-wait pid= trap 'kill $pid diff --git a/invoke_session_oe b/invoke_session_oe index c97dd99..e1cb956 100755 --- a/invoke_session_oe +++ b/invoke_session_oe @@ -3,6 +3,8 @@ # Hack for now until lava-test-shell is smart enough to know it's dispatcher ip gateway=$1 +listener_addr=$2 +listener_port=$3 echo "Target's Gateway: $gateway" # Copy invoke session @@ -35,6 +37,8 @@ mkdir -p /run mkdir -p /run/hacking echo $$ > /run/hacking/hacking.pid +echo "${ip_addr}" | nc "${listener_addr}" "${listener_port}" + #suspend in a way that is portable across shells and doesn't involve a busy-wait pid= trap 'kill $pid |