auto_test_cbd.sh #1

  • //
  • cbd/
  • main/
  • test/
  • auto_test_cbd.sh
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/bin/bash
#==============================================================================
# Copyright and license info is available in the LICENSE file included with
# the Component Based Development (CBD) project, and also available online:
# https://swarm.workshop.perforce.com/projects/perforce-software-cbd/view/main/LICENSE
#------------------------------------------------------------------------------
# This wrapper to test_cbd.sh defines recommended flags for use with continuous
# integration testing.  Use '-L off' (disable logging) since CI builds do their
# own log handling; there's no need to use the built-in self-logging feature.

set -u
set -e

export CBD_HOME=${CBD_HOME:-Undefined}
export BUILD_TAG=${BUILD_TAG:-Undefined}
declare Version=1.0.3

echo "Starting ${0##*/} v$Version at $(date)."

if [[ "${CBD_HOME}" == Undefined ]]; then
   echo -e "\nError: CBD_HOME not defined. Aborting.\n"
   exit 1
fi

export P4U_HOME="$(dirname $CBD_HOME)/p4/common/lib"
export P4U_LIB=$P4U_HOME

echo "Setting path to include python3+p4python."
export PATH="$(dirname $CBD_HOME)/p4/common/python/bin:$PATH"

echo "Build Tag: $BUILD_TAG"

$CBD_HOME/test/test_cbd.sh -a -L off -I

exit $?
# Change User Description Committed
#1 21633 C. Thomas Tyler Populate -o //guest/perforce_software/cbd/main/...
//cbd/main/....
//guest/perforce_software/cbd/main/test/auto_test_cbd.sh
#3 16664 C. Thomas Tyler Refactored logic to pull CBD from the Workshop by calling
the new get_workshop_cbd.sh script rather than using internal
code.  So auto_test_cbd_vagrant.sh once again pulls CBD, but
does so using the new script.

The test_cbd.sh script is no
longer responsible for pulling CBD (though the capability
could not easily be added if needed).

Added '-p bin/cbd' call to the Helix Installer SDP reset
script, to preserve the installed CBD directory.

Minor copyright tweaks too.
#2 16653 C. Thomas Tyler Adjusted CBD Test Suite to work with latest Helix Installer script
(and the SDP installer).

Moved logic to acquire CBD scripts from The Workshop, from the
auto_test_cbd_vagrant.sh script into test_cbd.sh, where it is
more accessible (and where it must be now that the latest
Helix Installer blasts the CBD files and the rest of the SDP
structure).

Enhanced logic acquring CBD to clone using remote specs (DVCS
features) rather than a flush/clean in a typical workspace.

Added '-b <branch>' flag to test_cbd.sh to specify which branch
in The Workshop to acquire CBD from.
#1 15009 C. Thomas Tyler Promoted CBD development work to main from dev.
//guest/perforce_software/cbd/dev/test/auto_test_cbd.sh
#2 14908 C. Thomas Tyler Added '-a' tag to indicate that we are running in Continuous
Integration Automation mode.  Presently, that just means to
shutdown the broker and p4d services started for testing after
the tests are done.

Updated automated test suite to call this.
#1 14199 C. Thomas Tyler Added test suite.