Skip to content

Commit

Permalink
Define XTRA using TMT_TREE and TMT_TEST_SERIAL_NUMBER
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaarreell committed Sep 4, 2023
1 parent 63bbd0a commit d418ddf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Library/sync/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ fi
# Initialization / Installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# define XTRA variable if not defined but TMT variables are exposed
if [ -z "$XTRA" ] && [ -n "$TMT_TREE" ] && [ -n "$TMT_TEST_SERIAL_NUMBER" ]; then
XTRA="$(echo $TMT_TREE | sed 's#^.*/run-\([0-9]*\)/.*#\1#')-$TMT_TEST_SERIAL_NUMBER"
fi
echo "XTRA=$XTRA"

# double check nmap is installed (requires are not installed with direct library load)
rpm -q nmap-ncat hostname &> /dev/null || yum -y install nmap-ncat hostname

Expand Down

0 comments on commit d418ddf

Please sign in to comment.