#!/bin/bash set -u # Entry file for running plain Docker containers # Runs the tests saves output in shared folder # Note that the output file is collected by script run_docker_tests.sh # This is executed as 'root'. declare SDPTestOutputDir="/sdp/test/output" declare Cmd= declare Log="$SDPTestOutputDir/test-${TESTOS}.out" function msg () { echo -e "$*"; } function bail () { msg "\\nError: ${1:-Unknown Error}\\n"; exit "${2:-1}"; } msg TESTOS=${TESTOS:-Unset} [[ "$TESTOS" == "Unset" ]] && bail "Required environment var TESTOS not set. Should be 'centos7' or simmilar\\nvalue. Aborting.\\n" if [[ ! -d "$SDPTestOutputDir" ]]; then Cmd="sudo mkdir -p $SDPTestOutputDir" msg "Running: $Cmd" $Cmd || bail "Failed to create dir: $SDPTestOutputDir" fi Cmd="sudo chown -R perforce:perforce ${SDPTestOutputDir%/*}" msg "Running: $Cmd" $Cmd || bail "Failed: chown -R perforce:perforce /sdp/test" Cmd="su -l perforce -c /p4/test_sdp.sh" msg "Running: $Cmd\\nLogging to: $Log" $Cmd > "$Log" 2>&1
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 27083 | C. Thomas Tyler | p4 undo //...@27080,@27080 | ||
#2 | 27080 | C. Thomas Tyler |
Fixed Docker test suite bootstrapping issue with missing output directory. |
||
#1 | 25258 | Robert Cowham |
Rework the containers in preparation for multi container testing mkrep changes: Remove -c cfg option which was unused anyway Converted tabs to spaces Fixed logic error causing forwarding replicas to bail due to unsupported p4d version Standby servers require ReplicatingFrom field Add seconds to log file name (useful for testing to avoid overwriting files) |