Skip to content

Commit

Permalink
Updating shell + file ports in release test
Browse files Browse the repository at this point in the history
  • Loading branch information
plauche committed Oct 30, 2019
1 parent 294b3e9 commit dcdafa0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/release-test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TELEM_PATH=${TARGET_DIR}/${TELEM_FILE}.tar.gz
cargo update

# Setup a shell session for us to use
RESPONSE=$(kubos-shell-client -i ${1} -p 8010 start << EOT
RESPONSE=$(kubos-shell-client -i ${1} -p 8050 start << EOT
EOT
)

Expand All @@ -37,7 +37,7 @@ CHANNEL_LINE=$(echo "${RESPONSE}" | grep "Starting shell session")
CHANNEL_ID=$(echo ${CHANNEL_LINE:26})

# Setup the test directory on the target OBC
RESPONSE=$(kubos-shell-client -i ${1} -p 8010 join -c ${CHANNEL_ID} << EOT
RESPONSE=$(kubos-shell-client -i ${1} -p 8050 join -c ${CHANNEL_ID} << EOT
cd /home/kubos
mkdir -p ${TARGET_DIR}
EOT
Expand All @@ -48,8 +48,8 @@ PKG_CONFIG_ALLOW_CROSS=1 CC=/usr/bin/bbb_toolchain/usr/bin/arm-linux-gcc cargo b
arm-linux-strip ${BINARY}

# Transfer our test binary to the OBC
kubos-file-client -r ${1} -p 8008 -P 8080 upload ${BINARY} ${TARGET_DIR}/release-test
kubos-file-client -r ${1} -p 8008 -P 8080 upload manifest.toml ${TARGET_DIR}/manifest.toml
kubos-file-client -r ${1} -p 8040 -P 8080 upload ${BINARY} ${TARGET_DIR}/release-test
kubos-file-client -r ${1} -p 8040 -P 8080 upload manifest.toml ${TARGET_DIR}/manifest.toml

# Register the app with the applications service
RESPONSE=$(curl ${1}:8000 -H "Content-Type: application/json" --data "{\"query\":\"mutation { register(path: \\\"${TARGET_DIR}\\\"){ success, errors } }\"}")
Expand All @@ -67,8 +67,8 @@ fi
sleep 1

# Get our results
kubos-file-client -r ${1} -p 8008 -P 8080 download ${LOG_FILE} test-output
kubos-file-client -r ${1} -p 8008 -P 8080 download ${TELEM_PATH}
kubos-file-client -r ${1} -p 8040 -P 8080 download ${LOG_FILE} test-output
kubos-file-client -r ${1} -p 8040 -P 8080 download ${TELEM_PATH}
tar -xzf ${TELEM_FILE}.tar.gz ${TELEM_FILE}

# Test Cleanup
Expand All @@ -77,12 +77,12 @@ if ! [[ "${RESPONSE}" =~ "\"success\":true" ]]; then
echo -e "\033[0;31mFailed to uninstall app. Response: ${RESPONSE}\033[0m" >&2
fi

IGNORE=$(kubos-shell-client -i ${1} -p 8010 join -c ${CHANNEL_ID} << EOT
IGNORE=$(kubos-shell-client -i ${1} -p 8050 join -c ${CHANNEL_ID} << EOT
rm release-test -R
EOT
)

IGNORE=$(kubos-shell-client -i ${1} -p 8010 kill -c ${CHANNEL_ID})
IGNORE=$(kubos-shell-client -i ${1} -p 8050 kill -c ${CHANNEL_ID})

# The grep command will fail if there are no results. We need to not bail when we hit the error so
# we can print a message
Expand Down

0 comments on commit dcdafa0

Please sign in to comment.