From 428489e5b85f8b80acec8607441e7c773a4a2e88 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 2 Oct 2024 22:57:05 +0200 Subject: [PATCH 01/17] Debug why the full reframe report is not printed --- bot/check-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/check-test.sh b/bot/check-test.sh index 8ea6eddcb0..3ed6c36a2b 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -80,6 +80,7 @@ else grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success}") grep_reframe_result=${grep_reframe_success_full} fi +echo "grep_reframe_result: ${grep_reframe_result}" echo "[TEST]" > ${job_test_result_file} if [[ ${SLURM_OUTPUT_FOUND} -eq 0 ]]; then From 860d9ac8220a3cc2a56ae30b97ea8df3763ccca4 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 2 Oct 2024 23:27:08 +0200 Subject: [PATCH 02/17] more debugging output --- bot/check-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/check-test.sh b/bot/check-test.sh index 3ed6c36a2b..fff9a71491 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -79,6 +79,7 @@ else GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success}") grep_reframe_result=${grep_reframe_success_full} + echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi echo "grep_reframe_result: ${grep_reframe_result}" From 06ddb081ffb3593a39824a28b3663cce2b010d91 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 3 Oct 2024 17:57:30 +0200 Subject: [PATCH 03/17] Fix name of pattern to pass to grep --- bot/check-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index fff9a71491..2d4e1231b4 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -77,7 +77,7 @@ if [[ ! -z ${grep_reframe_failed} ]]; then else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' - grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success}") + grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full}") grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi From edc5bca0563fb3946ea2cfa9e0e098a96b5e05af Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 3 Oct 2024 17:59:10 +0200 Subject: [PATCH 04/17] Trim trailing null character which is the result of using the -z argument for grep --- bot/check-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 2d4e1231b4..1b973fcb3d 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -77,7 +77,7 @@ if [[ ! -z ${grep_reframe_failed} ]]; then else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' - grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full}") + grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full} | tr -d '\0'") grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi From 7374ee719151c8eb7cfb4a5fc61593ace5745e6b Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 4 Oct 2024 21:53:51 +0200 Subject: [PATCH 05/17] Fix quote location and change null characters back to newlines --- bot/check-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 1b973fcb3d..3e1209781f 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -77,7 +77,8 @@ if [[ ! -z ${grep_reframe_failed} ]]; then else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' - grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full} | tr -d '\0'") + # tr '\0' '\n' places back the newline characters that the -z option of grep turned into null characters + grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full}" | tr '\0' '\n') grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi From c764572b9cc68a0969efeba80fa35f0e89426a72 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 4 Oct 2024 22:29:21 +0200 Subject: [PATCH 06/17] Add newline char --- bot/check-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 3e1209781f..bd703d9ce7 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -78,7 +78,7 @@ else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' # tr '\0' '\n' places back the newline characters that the -z option of grep turned into null characters - grep_reframe_success_full=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full}" | tr '\0' '\n') + grep_reframe_success_full=$(echo -e "$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full}" | tr '\0' '\n')\n") grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi From 8e0560a6707841bdaba79e457e3646d85721e905 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 4 Oct 2024 23:31:48 +0200 Subject: [PATCH 07/17] Make sure all null and new-line characters are replaced by
--- bot/check-test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index bd703d9ce7..d439fc6380 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -78,7 +78,12 @@ else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' # tr '\0' '\n' places back the newline characters that the -z option of grep turned into null characters - grep_reframe_success_full=$(echo -e "$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep -Pzo "${GP_success_full}" | tr '\0' '\n')\n") + grep_reframe_success_full=$( \ + grep -v "^>> searching for " ${job_dir}/${job_out} | \ + grep -Pzo "${GP_success_full}" | \ + sed 's/\x00//g' | + sed ':a;N;$!ba;s/\n//g' \ + ) grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi From 6b3ada5256f27ac4abc47330ee1927d015f54bb6 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 7 Oct 2024 09:19:21 +0200 Subject: [PATCH 08/17] See if we can excape % sign with backslash character --- bot/check-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index d439fc6380..8e92532090 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -82,7 +82,8 @@ else grep -v "^>> searching for " ${job_dir}/${job_out} | \ grep -Pzo "${GP_success_full}" | \ sed 's/\x00//g' | - sed ':a;N;$!ba;s/\n//g' \ + sed ':a;N;$!ba;s/\n//g' | + sed 's/%/\%/g \ ) grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" From eb41886d46c90b0f7f0b8ad2f34d0fe69577d645 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 7 Oct 2024 14:31:50 +0200 Subject: [PATCH 09/17] Forgot closing quote --- bot/check-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 8e92532090..7b2e4b6a11 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -83,7 +83,7 @@ else grep -Pzo "${GP_success_full}" | \ sed 's/\x00//g' | sed ':a;N;$!ba;s/\n//g' | - sed 's/%/\%/g \ + sed 's/%/\%/g' \ ) grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" From cf21c2536e433582cf0788086eb9472618992c6b Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 7 Oct 2024 20:12:05 +0200 Subject: [PATCH 10/17] Escape the escape character --- bot/check-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 7b2e4b6a11..e18ed64a84 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -81,9 +81,9 @@ else grep_reframe_success_full=$( \ grep -v "^>> searching for " ${job_dir}/${job_out} | \ grep -Pzo "${GP_success_full}" | \ - sed 's/\x00//g' | - sed ':a;N;$!ba;s/\n//g' | - sed 's/%/\%/g' \ + sed 's/\x00//g' | # Replace null character with
+ sed ':a;N;$!ba;s/\n//g' | # Replace new line characters with
+ sed 's/%/\\%/g' \ # Replace % with \%. Use \\% to interpret \ as character, instead of escape character ) grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" From ebb8dac4657aa7af9af891c75b4c08d4cf7ea1fc Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 7 Oct 2024 22:02:56 +0200 Subject: [PATCH 11/17] Escape first percent sign once --- bot/check-test.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index e18ed64a84..cb426f7468 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -77,13 +77,15 @@ if [[ ! -z ${grep_reframe_failed} ]]; then else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' - # tr '\0' '\n' places back the newline characters that the -z option of grep turned into null characters + # Replace null character with
+ # Replace new line characters with
+ # Replace % with \%. Use \\% to interpret \ as character, instead of escape character grep_reframe_success_full=$( \ grep -v "^>> searching for " ${job_dir}/${job_out} | \ grep -Pzo "${GP_success_full}" | \ - sed 's/\x00//g' | # Replace null character with
- sed ':a;N;$!ba;s/\n//g' | # Replace new line characters with
- sed 's/%/\\%/g' \ # Replace % with \%. Use \\% to interpret \ as character, instead of escape character + sed 's/\x00//g' | + sed ':a;N;$!ba;s/\n//g' | + sed 's/\%/\\%/g' \ ) grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" From e6697680f6618ac790e080665f10ba36ba20e1c3 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 7 Oct 2024 23:36:18 +0200 Subject: [PATCH 12/17] Escaping % is done with %% --- bot/check-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index cb426f7468..1f66514bb2 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -79,13 +79,13 @@ else GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' # Replace null character with
# Replace new line characters with
- # Replace % with \%. Use \\% to interpret \ as character, instead of escape character + # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters grep_reframe_success_full=$( \ grep -v "^>> searching for " ${job_dir}/${job_out} | \ grep -Pzo "${GP_success_full}" | \ sed 's/\x00//g' | sed ':a;N;$!ba;s/\n//g' | - sed 's/\%/\\%/g' \ + sed 's/\%/\%\%/g' \ ) grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" From e9ede03e72a46b4ea79ad3ca37c4a5e81af2d376 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 8 Oct 2024 16:52:35 +0200 Subject: [PATCH 13/17] Shorten the ReFrame output, only get the relevant lines from it --- bot/check-test.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 1f66514bb2..2e58535c4a 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -77,16 +77,25 @@ if [[ ! -z ${grep_reframe_failed} ]]; then else # Grep the entire output of ReFrame, so that we can report it in the foldable section of the test report GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*' - # Replace null character with
- # Replace new line characters with
- # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters + # Grab the full ReFrame report, than cut the irrelevant parts + # Note that the character limit for messages in github is around 65k, so cutting is important grep_reframe_success_full=$( \ grep -v "^>> searching for " ${job_dir}/${job_out} | \ - grep -Pzo "${GP_success_full}" | \ - sed 's/\x00//g' | - sed ':a;N;$!ba;s/\n//g' | - sed 's/\%/\%\%/g' \ + grep -Pzo "${GP_success_full}" | \ # Use -z + sed 's/\x00/\n/g' | \ # Replace null character with newline, to undo the -z option + grep -v -P '\[\s*RUN\s*]' | \ # Remove the [ RUN ] lines from reframe, they are not very informative + grep -v '\[-*\]' | \ # Remove the line '[----------] all spawned checks have finished' + grep -v '\[=*\]' | \ # Remove the line '[==========] Finished on Mon Oct 7 21' + grep -v '^$' | \ # Remove blank line(s) from the report + sed ':a;N;$!ba;s/\n//g' | \ # Replace all newline characters with
+ sed 's/\%/\%\%/g' \ # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters ) + # TODO (optional): we could impose a character limit here, and truncate if too long + # (though we should do that before inserting the
statements). + # If we do, we should probably re-append the final summary, e.g. + # [ PASSED ] Ran 10/10 test case(s) from 10 check(s) (0 failure(s), 0 skipped, 0 aborted) + # so that that is always displayed + # However, that's not implemented yet - let's see if this ever even becomes an issue grep_reframe_result=${grep_reframe_success_full} echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi From 3ff1b30e9f56b9ea9eff6f4d78b110189b4d6c35 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 8 Oct 2024 16:56:25 +0200 Subject: [PATCH 14/17] Strip color coding characters --- bot/check-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/check-test.sh b/bot/check-test.sh index 2e58535c4a..a8190e5e0d 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -87,6 +87,7 @@ else grep -v '\[-*\]' | \ # Remove the line '[----------] all spawned checks have finished' grep -v '\[=*\]' | \ # Remove the line '[==========] Finished on Mon Oct 7 21' grep -v '^$' | \ # Remove blank line(s) from the report + sed 's/\x1B\[[0-9;]*m//g' | \ # Strip color coding characters sed ':a;N;$!ba;s/\n//g' | \ # Replace all newline characters with
sed 's/\%/\%\%/g' \ # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters ) From fe64129fd9312a68a1910a2ee68f646eac3307f9 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 8 Oct 2024 22:56:52 +0200 Subject: [PATCH 15/17] Don't have comments after line breaks --- bot/check-test.sh | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index a8190e5e0d..625e88d8eb 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -81,15 +81,24 @@ else # Note that the character limit for messages in github is around 65k, so cutting is important grep_reframe_success_full=$( \ grep -v "^>> searching for " ${job_dir}/${job_out} | \ - grep -Pzo "${GP_success_full}" | \ # Use -z - sed 's/\x00/\n/g' | \ # Replace null character with newline, to undo the -z option - grep -v -P '\[\s*RUN\s*]' | \ # Remove the [ RUN ] lines from reframe, they are not very informative - grep -v '\[-*\]' | \ # Remove the line '[----------] all spawned checks have finished' - grep -v '\[=*\]' | \ # Remove the line '[==========] Finished on Mon Oct 7 21' - grep -v '^$' | \ # Remove blank line(s) from the report - sed 's/\x1B\[[0-9;]*m//g' | \ # Strip color coding characters - sed ':a;N;$!ba;s/\n//g' | \ # Replace all newline characters with
- sed 's/\%/\%\%/g' \ # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters + # Use -z + grep -Pzo "${GP_success_full}" | \ + # Replace null character with newline, to undo the -z option + sed 's/\x00/\n/g' | \ + # Remove the [ RUN ] lines from reframe, they are not very informative + grep -v -P '\[\s*RUN\s*]' | \ + # Remove the line '[----------] all spawned checks have finished' + grep -v '\[-*\]' | \ + # Remove the line '[==========] Finished on Mon Oct 7 21' + grep -v '\[=*\]' | \ + # Remove blank line(s) from the report + grep -v '^$' | \ + # Strip color coding characters + sed 's/\x1B\[[0-9;]*m//g' | \ + # Replace all newline characters with
+ sed ':a;N;$!ba;s/\n//g' | \ + # Replace % with %%. Use \%\% to interpret both %% as (non-special) characters + sed 's/\%/\%\%/g' \ ) # TODO (optional): we could impose a character limit here, and truncate if too long # (though we should do that before inserting the
statements). From a0a948d67f50bf7f2126c3612c2ec154982089c1 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 9 Oct 2024 10:58:12 +0200 Subject: [PATCH 16/17] Remove echo that was only there for debugging --- bot/check-test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bot/check-test.sh b/bot/check-test.sh index 625e88d8eb..79ae0be61f 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -107,7 +107,6 @@ else # so that that is always displayed # However, that's not implemented yet - let's see if this ever even becomes an issue grep_reframe_result=${grep_reframe_success_full} - echo "grep_reframe_success_full: ${grep_reframe_success_full}" fi echo "grep_reframe_result: ${grep_reframe_result}" From e9c2472b75a6527a57862ba9da27402a3abcbe2c Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 9 Oct 2024 15:06:44 +0200 Subject: [PATCH 17/17] Remove warning as well for the local spawner not having memory request support - we know that --- bot/check-test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot/check-test.sh b/bot/check-test.sh index 79ae0be61f..2731e75464 100755 --- a/bot/check-test.sh +++ b/bot/check-test.sh @@ -93,6 +93,8 @@ else grep -v '\[=*\]' | \ # Remove blank line(s) from the report grep -v '^$' | \ + # Remove warnings about the local spawner not supporting memory requests + grep -v 'WARNING\: hooks\.req_memory_per_node does not support the scheduler you configured .local.*$' | \ # Strip color coding characters sed 's/\x1B\[[0-9;]*m//g' | \ # Replace all newline characters with