From 5bdc4dc4c9fc34b2b48e9c92967829bc8944b52e Mon Sep 17 00:00:00 2001 From: Andrew Holcomb <holcombam@ornl.gov> Date: Thu, 11 Nov 2021 11:15:58 -0500 Subject: [PATCH] Add script to automate rebaselines Pass path to build/install/samtry as argument to script Only try to copy what exists --- sammy/samtry/copy_for_rebaseline.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sammy/samtry/copy_for_rebaseline.sh diff --git a/sammy/samtry/copy_for_rebaseline.sh b/sammy/samtry/copy_for_rebaseline.sh new file mode 100644 index 000000000..61c87055d --- /dev/null +++ b/sammy/samtry/copy_for_rebaseline.sh @@ -0,0 +1,17 @@ +# pass in path to your ${SAMMY_BUILD}/install/samtry location as argument to script +NEW_RESULTS_DIR=$1 + +# carry out rebase for all tests, copy each file in source samtry back +for dir in tr* +do + # suppress output of pushd/popd - remove '> /dev/null' to diagnose copy issues + pushd ${dir}/answers > /dev/null + for file in * + do + FILE=/etc/resolv.conf + if test -f "${NEW_RESULTS_DIR}/${dir}/results/${file}"; then + cp ${NEW_RESULTS_DIR}/${dir}/results/${file} . + fi + done + popd > /dev/null +done -- GitLab