summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-03-07 08:58:38 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-03-07 08:58:38 +0000
commit0da0e554bf12921df75c0975376b064b72e229c4 (patch)
treeaa602282dac51be719fb909e434fa3ceb7885bca
parent65c08b0b1756e96995444037720ffde628094220 (diff)
downloadjenkins-scripts-tcwg_gnu.tar.gz
tcwg_gnu-build.sh: Update after merge.tcwg_gnu
Change-Id: I9edf99b8a3c3f912a587be24093ffd3941d302cc
-rwxr-xr-xtcwg_gnu-build.sh42
1 files changed, 14 insertions, 28 deletions
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh
index 2e040d4d..905496cc 100755
--- a/tcwg_gnu-build.sh
+++ b/tcwg_gnu-build.sh
@@ -4,36 +4,35 @@ set -euf -o pipefail
scripts=$(dirname $0)
. $scripts/jenkins-helpers.sh
+. $scripts/round-robin.sh
convert_args_to_variables "$@"
obligatory_variables rr[ci_config]
-# Execution mode: baseline, bisect, continue, jenkins-full
+# Execution mode: baseline, bisect, jenkins-full
rr[mode]="${rr[mode]-baseline}"
-case "${rr[mode]}" in
- "jenkins-full")
- obligatory_variables rr[current_project] rr[current_branch]
- ;;
-esac
-
# Set custom revision for one of the projects, and use baseline revisions
# for all other projects.
rr[ci_project]="${rr[ci_project]-tcwg_gnu}"
rr[baseline_branch]="${rr[baseline_branch]-linaro-local/ci/${rr[ci_project]}/${rr[ci_config]}}"
-rr[current_branch]="${rr[current_branch]-default}"
-rr[current_project]="${rr[current_project]-none}"
rr[reset_baseline]="${rr[reset_baseline]-false}"
rr[top_artifacts]="${rr[top_artifacts]-$(pwd)/artifacts}"
-# {toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}
+# {toolchain_name}-{toolchain_ver}-{target}-{bootstrap_config}
IFS=- read -a ci_config <<EOF
${rr[ci_config]}
EOF
-rr[toolchain_name]=${rr[toolchain_name]-${ci_config[0]}}
rr[target]="native"
bootstrap_config=${cflags-${ci_config[3]}}
+rr[components]="gcc"
+
+# Use baseline branches by default.
+for c in ${rr[components]}; do
+ rr[${c}_branch]=${rr[${c}_branch]-baseline}
+ obligatory_variables rr[${c}_url]
+done
start_at="${start_at-default}"
finish_at="${finish_at-default}"
@@ -47,27 +46,17 @@ trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\"" EXIT
# Set start and finish steps for different modes.
default_start_at=""
default_finish_at=""
-base_artifacts_opt="base-artifacts"
case "${rr[mode]}" in
"baseline")
default_finish_at="update_baseline"
;;
"bisect")
- case "${rr[toolchain]}:${rr[current_project]}" in
- gnu:binutils) default_start_at="build_abe-binutils" ;;
- gnu:gcc) default_start_at="build_abe-stage1" ;;
- llvm:llvm) default_start_at="build_llvm" ;;
+ case "$(print_single_updated_component)" in
+ gcc) default_start_at="build_abe-$bootstrap_config" ;;
+ *) assert false ;;
esac
default_finish_at="check_regression"
;;
- "continue")
- # Developer mode.
- case "${rr[toolchain]}" in
- "gnu") default_start_at="prepare_abe" ;;
- "llvm") default_start_at="build_llvm" ;;
- esac
- base_artifacts_opt=""
- ;;
"jenkins-full") ;;
esac
if [ x"$start_at" = x"default" ]; then
@@ -77,9 +66,7 @@ if [ x"$finish_at" = x"default" ]; then
finish_at="$default_finish_at"
fi
-run_step_init "$start_at" "$finish_at" "${rr[top_artifacts]}" "$base_artifacts_opt" "$verbose"
-
-. $scripts/round-robin.sh
+run_step_init "$start_at" "$finish_at" "${rr[top_artifacts]}" "$verbose"
# Exit with code 0 if no regression compared to base-artifacts/results.
no_regression_p ()
@@ -106,7 +93,6 @@ no_regression_p ()
run_step stop_on_fail -10 reset_artifacts
run_step stop_on_fail x prepare_abe
run_step skip_on_fail -5 build_abe ${bootstrap_config}
-
run_step reset_on_fail x check_regression
run_step stop_on_fail x update_baseline
run_step stop_on_fail x push_baseline