From 439fcf691d5251b3a671a013c9d706be7c69edfa Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 15 Sep 2023 09:57:40 +0000 Subject: tcwg_gnu-config.sh (settings_for_ci_project_and_config): add pretty_project and pretty_config Implement gnu_print_config in round-robin-notify.sh, as a specialized version of gnu_print that calls settings_for_ci_project_and_config. ci_project and ci_config are not easy to understand by external contributors, so try to display more meaningful information. For ci_project: - for tcwg_gnu* and tcwg_gcc*, we just omit it: the involved project should be obvious from the notification subject. - for other CI projects, remove the leading 'tcwg_' For ci_config: - for tcwg_gnu_embed* return arm-eabi followed by short description of the configuration - for other cases, keep CI config Change-Id: Ib0d03f6f9da4aaab9ecbfca581bf44040b37970e --- round-robin-notify.sh | 43 ++++++++++++++++++++++++++++++++++++++++++- tcwg_gnu-config.sh | 24 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/round-robin-notify.sh b/round-robin-notify.sh index b70c1636..0af06fcd 100755 --- a/round-robin-notify.sh +++ b/round-robin-notify.sh @@ -69,7 +69,7 @@ fi # #======================================================================================== -# affect the following glabal variables +# affect the following global variables declare top_artifacts ci_project ci_config setup_notify_environment () { @@ -233,6 +233,7 @@ setup_stages_to_run () tcwg_binutils*|tcwg_bootstrap*|tcwg_gcc*|tcwg_gdb*|tcwg_glibc*|tcwg_gnu*) print_result_f=gnu_print_result generate_extra_details_f=gnu_generate_extra_details + print_config_f=gnu_print_config ;; tcwg_bmk*) print_result_f=bmk_print_result @@ -598,6 +599,46 @@ print_artifacts_url () # *GNU* PRINT ROUTINES #========================================== +###### PRINT the configuration of this build +# --oneline : target short name (eg: arm/aarch64) +# --short : short "pretty" version suitable for summary +# --long : full details +gnu_print_config() +{ + ( + $dump_model_only && echo "<<${FUNCNAME[0]} $*>>" && return + + # shellcheck source=tcwg_gnu-config.sh + . $scripts/tcwg_gnu-config.sh + + # We don't use these in this script, but + # settings_for_ci_project_and_config() updates them + # shellcheck disable=SC2034 + local -a gcc_override_configure=() + # shellcheck disable=SC2034 + local -a gcc_target_board_options=() + # shellcheck disable=SC2034 + local -a qemu_cpu=() + + local pretty_project pretty_config + + # Define the above variables appropriately + # For the reports, we are interested in pretty_project and + # pretty_config + settings_for_ci_project_and_config "$ci_project" "$ci_config" + + local print_arg=$1 + case "$print_arg" in + --oneline|--long) + print_config "$print_arg" + ;; + --short) + echo "$pretty_project $pretty_config" + ;; + esac + ) +} + # most of them mapped to generic implementation gnu_print_result() { diff --git a/tcwg_gnu-config.sh b/tcwg_gnu-config.sh index 3292cd50..eb4f344e 100644 --- a/tcwg_gnu-config.sh +++ b/tcwg_gnu-config.sh @@ -11,6 +11,10 @@ settings_for_ci_project_and_config () obligatory_variables gcc_override_configure gcc_target_board_options \ qemu_cpu + obligatory_variables pretty_project pretty_config + + pretty_project="" + pretty_config="$config" # Build the right libs depending on the target. Hardcode the # arch/cpu/float-abi/mode to speed up toolchain builds: the @@ -33,6 +37,7 @@ settings_for_ci_project_and_config () "--set target_board_options={-marm/-march=armv7-a/-mfpu=auto/-mfloat-abi=soft}" ) qemu_cpu+=(--qemu-cpu cortex-a9) + pretty_config="arm-eabi v7-a soft" ;; tcwg_gnu_embed*/*-arm_v7a_softfp_eabi) @@ -47,6 +52,7 @@ settings_for_ci_project_and_config () "--set target_board_options={-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp}" ) qemu_cpu+=(--qemu-cpu cortex-a9) + pretty_config="arm-eabi v7-a softfp" ;; tcwg_gnu_embed*/*-thumb_v8a_hard_eabi) @@ -64,6 +70,7 @@ settings_for_ci_project_and_config () # cortex-a15, which is v7-a. Use "any" so that it # supports v8-a instructions. qemu_cpu+=(--qemu-cpu any) + pretty_config="arm-eabi thumb v8-a hard" ;; tcwg_gnu_embed*/*-thumb_m0_eabi) @@ -77,6 +84,7 @@ settings_for_ci_project_and_config () "--set target_board_options={-mthumb/-march=armv6s-m/-mtune=cortex-m0/-mfloat-abi=soft/-mfpu=auto}" ) qemu_cpu+=(--qemu-cpu cortex-m0) + pretty_config="arm-eabi cortex-m0 soft" ;; tcwg_gnu_embed*/*-thumb_m3_eabi) @@ -91,6 +99,7 @@ settings_for_ci_project_and_config () "--set target_board_options={-mthumb/-march=armv7-m/-mtune=cortex-m3/-mfloat-abi=softfp/-mfpu=auto}" ) qemu_cpu+=(--qemu-cpu cortex-m3) + pretty_config="arm-eabi cortex-m3 softfp" ;; tcwg_gnu_embed*/*-thumb_m7_eabi) @@ -104,6 +113,7 @@ settings_for_ci_project_and_config () "--set target_board_options={-mthumb/-march=armv7e-m+fp.dp/-mtune=cortex-m7/-mfloat-abi=hard/-mfpu=auto}" ) qemu_cpu+=(--qemu-cpu cortex-m7) + pretty_config="arm-eabi cortex-m7 hard" ;; tcwg_gnu_embed*/*-thumb_m23_eabi) @@ -118,6 +128,7 @@ settings_for_ci_project_and_config () ) # qemu does not support m23, use m33 as a superset (v8-m.base vs v8-m.main) qemu_cpu+=(--qemu-cpu cortex-m33) + pretty_config="arm-eabi cortex-m23 soft" ;; tcwg_gnu_embed*/*-thumb_m33_eabi) @@ -131,6 +142,7 @@ settings_for_ci_project_and_config () "--set target_board_options={-mthumb/-march=armv8-m.main+dsp+fp/-mtune=cortex-m33/-mfloat-abi=hard/-mfpu=auto}" ) qemu_cpu+=(--qemu-cpu cortex-m33) + pretty_config="arm-eabi cortex-m33 hard" ;; tcwg_gnu_embed*/*-thumb_m55_hard_eabi) @@ -144,6 +156,18 @@ settings_for_ci_project_and_config () "--set target_board_options={-mthumb/-march=armv8.1-m.main+mve.fp+fp.dp/-mtune=cortex-m55/-mfloat-abi=hard/-mfpu=auto}" ) qemu_cpu+=(--qemu-cpu cortex-m55) + # shellcheck disable=SC2034 + pretty_config="arm-eabi cortex-m55 hard" + ;; + + tcwg_gnu*/*|tcwg_gcc/**) ;; + + */*) + # Remove useless leading "tcwg_" + # shellcheck disable=SC2034 + pretty_project=$(echo $project | sed 's/^tcwg_//') + ;; + esac } -- cgit v1.2.3