Skip to content

Commit

Permalink
script: Add an exception handling for binary file checking
Browse files Browse the repository at this point in the history
Changes List:
- Add exception handling for binary file checking before test initiate

Signed-off-by: Goh, Wei Sheng <wei.sheng.goh@intel.com>
  • Loading branch information
ws-intel committed Jul 17, 2023
1 parent 20c1912 commit 7102c5c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,23 @@ main() {
exit
fi

# Check for binary file for <CONFIG>
if [[ "$CONFIG" == vs* && ! -e txrx-tsn ]]; then
echo "WARNING: TXRX-TSN not found!"
echo "WARNING: TXRX-TSN is needed for $CONFIG. Please ensure TXRX-TSN is compile during the build stage."
exit 1
elif [[ "$CONFIG" == opcua* && ! -e opcua-server ]]; then
echo "WARNING: OPCUA-SERVER not found!"
echo "WARNING: OPCUA-SERVER is needed for $CONFIG. Please ensure OPCUA-SERVER is compile during the build stage."
exit 1
elif [[ "$CONFIG" == tsq* && ! -e tsq ]]; then
echo "WARNING: TSQ not found!"
echo "WARNING: TSQ is needed for $CONFIG. Please ensure TSQ is compile during the build stage."
exit 1
else
echo "" # Nothing
fi

# Only for debug: timesync per-run logging
if [[ "$RUNSH_DEBUG_MODE" == "YES" && "$ACTION" == "run" ]]; then
ts_log_start
Expand Down

0 comments on commit 7102c5c

Please sign in to comment.