From b1cd2a9db24b41ea38e224a3ac85f6b11ef58e4d Mon Sep 17 00:00:00 2001 From: David Valin Date: Sat, 14 Mar 2026 05:29:15 -0400 Subject: [PATCH 1/5] Update pull test_tools --- streams/streams_run | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/streams/streams_run b/streams/streams_run index 85ef2c6..76d6e9e 100755 --- a/streams/streams_run +++ b/streams/streams_run @@ -61,15 +61,44 @@ TOOLS_BIN="${HOME}/test_tools" export TOOLS_BIN tools_git=https://github.com/redhat-performance/test_tools-wrappers -if [ ! -d "${TOOLS_BIN}" ]; then - git clone $tools_git ${TOOLS_BIN} - if [ $? -ne 0 ]; then - echo pulling git $tools_git failed. - exit 101 +attempt_tools_wget() +{ + if [[ ! -d "$TOOLS_BIN" ]]; then + wget ${tools_git}/archive/refs/heads/main.zip + if [[ $? -eq 0 ]]; then + unzip -q main.zip + mv test_tools-wrappers-main ${TOOLS_BIN} + rm main.zip + fi fi -else - echo Found an existing test_tools directory, using it. -fi +} + +attempt_tools_curl() +{ + if [[ ! -d "$TOOLS_BIN" ]]; then + curl -L -O ${tools_git}/archive/refs/heads/main.zip + if [[ $? -eq 0 ]]; then + unzip -q main.zip + mv test_tools-wrappers-main ${TOOLS_BIN} + rm main.zip + fi + fi +} + +attempt_tools_git() +{ + if [[ ! -d "$TOOLS_BIN" ]]; then + git clone $tools_git "$TOOLS_BIN" + if [ $? -ne 0 ]; then + exit_out "Error: pulling git $tools_git failed." 101 + fi + fi +} + +attempt_tools_wget +attempt_tools_curl +attempt_tools_git + source ${TOOLS_BIN}/error_codes # From fb9df64b91422e0a9e9a2dc328ff9002268e8aed Mon Sep 17 00:00:00 2001 From: David Valin Date: Wed, 25 Mar 2026 05:18:37 -0400 Subject: [PATCH 2/5] Update loading of tools --- streams/streams_run | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/streams/streams_run b/streams/streams_run index 76d6e9e..30179fd 100755 --- a/streams/streams_run +++ b/streams/streams_run @@ -61,22 +61,11 @@ TOOLS_BIN="${HOME}/test_tools" export TOOLS_BIN tools_git=https://github.com/redhat-performance/test_tools-wrappers -attempt_tools_wget() +attempt_tools_generic() { + method="$1" if [[ ! -d "$TOOLS_BIN" ]]; then - wget ${tools_git}/archive/refs/heads/main.zip - if [[ $? -eq 0 ]]; then - unzip -q main.zip - mv test_tools-wrappers-main ${TOOLS_BIN} - rm main.zip - fi - fi -} - -attempt_tools_curl() -{ - if [[ ! -d "$TOOLS_BIN" ]]; then - curl -L -O ${tools_git}/archive/refs/heads/main.zip + $method ${tools_git}/archive/refs/heads/main.zip if [[ $? -eq 0 ]]; then unzip -q main.zip mv test_tools-wrappers-main ${TOOLS_BIN} @@ -95,8 +84,8 @@ attempt_tools_git() fi } -attempt_tools_wget -attempt_tools_curl +attempt_tools_generic "wget" +attempt_tools_generic "curl -L -O " attempt_tools_git source ${TOOLS_BIN}/error_codes From 72938a90471ff6edf8869035cc835d385e32b639 Mon Sep 17 00:00:00 2001 From: David Valin Date: Wed, 25 Mar 2026 05:23:59 -0400 Subject: [PATCH 3/5] Use exit not exit_out as it has not been defined. --- streams/streams_run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streams/streams_run b/streams/streams_run index 30179fd..6d4550e 100755 --- a/streams/streams_run +++ b/streams/streams_run @@ -79,7 +79,7 @@ attempt_tools_git() if [[ ! -d "$TOOLS_BIN" ]]; then git clone $tools_git "$TOOLS_BIN" if [ $? -ne 0 ]; then - exit_out "Error: pulling git $tools_git failed." 101 + exit "Error: pulling git $tools_git failed." 101 fi fi } From 6a0475bf3c121c781e6540c59ab1f8549de2da38 Mon Sep 17 00:00:00 2001 From: David Valin Date: Thu, 26 Mar 2026 17:26:24 -0400 Subject: [PATCH 4/5] Fix exiting --- streams/streams_run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streams/streams_run b/streams/streams_run index 6d4550e..4563dca 100755 --- a/streams/streams_run +++ b/streams/streams_run @@ -79,7 +79,8 @@ attempt_tools_git() if [[ ! -d "$TOOLS_BIN" ]]; then git clone $tools_git "$TOOLS_BIN" if [ $? -ne 0 ]; then - exit "Error: pulling git $tools_git failed." 101 + echo "Error: pulling git $tools_git failed." + exit 101 fi fi } From 6987606d8806ac82bd4a0cd15ae8543909511e19 Mon Sep 17 00:00:00 2001 From: David Valin Date: Fri, 27 Mar 2026 04:49:55 -0400 Subject: [PATCH 5/5] Echo error message to standard error. --- streams/streams_run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streams/streams_run b/streams/streams_run index 4563dca..5b0df4b 100755 --- a/streams/streams_run +++ b/streams/streams_run @@ -79,7 +79,7 @@ attempt_tools_git() if [[ ! -d "$TOOLS_BIN" ]]; then git clone $tools_git "$TOOLS_BIN" if [ $? -ne 0 ]; then - echo "Error: pulling git $tools_git failed." + echo "Error: pulling git $tools_git failed." >&2 exit 101 fi fi