mmartell commented on a change in pull request #746: URL: https://github.com/apache/geode-native/pull/746#discussion_r578599761
########## File path: ci/lib/templates.lib.txt ########## @@ -0,0 +1,253 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +(@ load("@ytt:data", "data") -@) +(@ load("functions.lib.yml", + "gci_label_value", + "image_family_name") +-@) + +(@ def google_variables(): -@) +GOOGLE_PROJECT=(@=data.values.google.project @) +GOOGLE_ZONE=(@=data.values.google.zone @) +(@- end @) + + +(@ def instance_variables(): -@) +INSTANCE_USER=build +INSTANCE_DIR=$(pwd)/instance + +if [ ! -d "${INSTANCE_DIR}" ]; then + echo "${INSTANCE_DIR} not found." + exit 1 +fi +(@- end @) + +(@ def remote_functions(): -@) +(@=instance_variables() @) + +SSH_OPTIONS=${SSH_OPTIONS:-"-o StrictHostKeyChecking=no -o PasswordAuthentication=no"} + +ssh_key_file=${INSTANCE_DIR}/identity +if [ ! -r "${ssh_key_file}" ]; then + echo "${ssh_key_file} not readable." + exit 1 +fi + +instance_file=${INSTANCE_DIR}/instance.sh +if [ ! -r "${instance_file}" ]; then + echo "${instance_file} not readable." + exit 1 +fi + +external_ip=$(source ${instance_file} && echo -n ${networkInterfaces_accessConfigs_natIP}) + +function remote_shell { + ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} "$@" +} + +function remote_download { + scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "${INSTANCE_USER}@${external_ip}:${1}" "$2" +} + +function remote_download_directory { + ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} tar -C $(dirname ${1}) -czf - $(basename ${1}) | tar -C ${2} -zxf - +} + +function remote_upload { + scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "$1" "${INSTANCE_USER}@${external_ip}:${2}" +} + +(@- end @) + +(@ def run_cpp_unit_tests(): -@) +set -ueo pipefail +(@= remote_functions() @) +remote_shell cmake -E chdir build/cppcache/test ctest -C ${CMAKE_CONFIG} -j8 --timeout=500 --output-on-failure +(@- end @) + +(@ def run_cpp_integration_tests(): -@) +set -ueo pipefail +(@= remote_functions() @) +remote_shell cmake -E chdir build/cppcache/integration/test ctest -C ${CMAKE_CONFIG} -j6 --timeout=500 --output-on-failure --repeat until-pass:4 +(@- end @) + +(@ def run_cpp_legacy_integration_tests(): -@) +set -ueo pipefail +(@= remote_functions() @) +remote_shell cmake -E chdir build/cppcache/integration-test ctest -C ${CMAKE_CONFIG} -j4 --timeout=500 --output-on-failure --repeat until-pass:4 +(@- end @) + +(@ def run_net_unit_tests(): -@) +set -ueo pipefail +(@= remote_functions() @) +remote_shell cmake -E chdir build/clicache/test2 ../packages/xunit.runner.console.2.4.0/tools/net452/xunit.console.exe ${CMAKE_CONFIG}/Apache.Geode.Tests2.dll -parallel all Review comment: I have mixed feelings on that. If Concourse supported paginated output then -verbose is fine. But since it doesn't, having so much output sometimes takes too long before you find what you need. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
