#!/bin/bash
#------------------------------------------------------------------------------
# This updates CBD files in the unversioned 'shared/cbd' folder, which is
# shared with the Vagrant-initialized helix-01 VM used for testing.
set -u
set -e
function bail () { echo -e "\nError: ${1:-Unknown Error}\n"; exit ${2:-1}; }
declare SourceDir="$(dirname $PWD)"
declare TargetDir="$PWD/shared/cbd"
declare TargetLibDir="$PWD/shared/lib"
declare -i FilesUpdated=0
/bin/rm -rf "$TargetDir"
/bin/mkdir -p "$TargetDir/scripts" "$TargetDir/triggers" "$TargetDir/test" "$TargetLibDir"
for f in Cbd.py CbdDev.py wssync.sh wssync.dev.sh wssync.py wssync.dev.py sbi.pl; do
cp -pf $SourceDir/scripts/$f $TargetDir/scripts/. ||\
bail "Failed to update $TargetDir/scripts/$f"
FilesUpdated=$((FilesUpdated+1))
done
for f in test_cbd.sh ti.sh auto_test_cbd_vagrant.sh auto_test_cbd.sh manual_test_env.sh; do
cp -pf $SourceDir/test/$f $TargetDir/test/. ||\
bail "Failed to update $TargetDir/scripts/$f"
FilesUpdated=$((FilesUpdated+1))
done
for f in SSTemplateUpdate.py WSTemplateUpdate.py; do
cp -pf $SourceDir/triggers/$f $TargetDir/triggers/. ||\
bail "Failed to update $TargetDir/scripts/$f"
FilesUpdated=$((FilesUpdated+1))
done
# Make sure your own local SDP is has an updated lib folder
# before running this.
rsync -a --delete /p4/common/lib/ $TargetLibDir ||:
diff -q -r /p4/common/lib $TargetLibDir ||\
bail "Failed to rsync copy SDP libs."
echo "Updated $FilesUpdated CBD files in $TargetDir, plus SDP libs in $TargetLibDir."
exit 0
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #2 | 15022 | C. Thomas Tyler |
Copy-Up to main from ntx64: * Fixed Cbd.py issue with an exception handling bug for Host field. * Rebased CbdDev.py to Cbd.py * Simplified test operations. * Fixed a cosmetic typo in test doc/data. |
||
| #1 | 15009 | C. Thomas Tyler | Promoted CBD development work to main from dev. | ||
| //guest/perforce_software/cbd/dev/test/run_before_vagrant_up.sh | |||||
| #4 | 14999 | C. Thomas Tyler | Tweaked. | ||
| #3 | 14960 | C. Thomas Tyler | Added sbi.pl. | ||
| #2 | 14935 | C. Thomas Tyler | Added more test suite scripts to the shared area. | ||
| #1 | 14928 | C. Thomas Tyler | Tweakes to Vagrant test flow. | ||