summaryrefslogtreecommitdiff
path: root/tcwg_kernel-build.sh
AgeCommit message (Collapse)Author
2019-02-26tcwg_kernel-build.sh: Restrict linking with LLD to defconfigMaxim Kuvyrkov
Many configurations seems to fail. Below are some examples: - llvm-master-aarch64-lts-allmodconfig -- produces 2k less .o files - llvm-master-arm-next-allmodconfig -- produces 4k less .o files - llvm-master-aarch64-next-allmodconfig -- produces 5k less .o files - llvm-release-aarch64-lts-allnoconfig -- can't boot - llvm-release-aarch64-mainline-allnoconfig -- can't boot Change-Id: I5e88e83579e6acbf75aaf850b3defcf5d4ed850a
2019-02-25tcwg_kernel-build.sh: Use LLD for LLVM Linux kernel link jobsPeter Smith
It is expected that developers using clang to build the linux kernel will also use LLD for the linker. We would like to test this in the LLVM builds of the linux kernel as much as possible. To use LLD in the kernel build we set LD=/path/to/linker when calling make. At the moment we use LLD for llvm-*-aarch64-*-* builds and for llvm-master-arm-*-* builds. Change-Id: Ib1d543480278abec193cde6aeba0f457bcd603aa
2019-02-22tcwg_kernel-build.sh: Update build step nameMaxim Kuvyrkov
I missed this change in the rename commit. Change-Id: I82e5e93fe52e8e53d0ca9cfc95b70dda8485e2fb
2019-02-22tcwg_kernel-build.sh: Add boot-testing of kernelMaxim Kuvyrkov
This implements https://projects.linaro.org/browse/TCWG-1503 . Count_linux_objs() was renamed to build_linux (with build_linux() renamed to build_linux_1()). New step boot_linux() was added to boot kernel with qemu. Defconfig configurations for aarch64 and arm seem to boot, allnoconfig doesn't boot, others -- will see. No_regression_p() was reworked to handle result hierarchy "boot" -> "all" -> "Number of objects". Change-Id: Ib3377c72de51745a537714d1c693303b3935188c
2019-02-22Trivial cleanupsMaxim Kuvyrkov
The "last-good" result is, in reality, just "good". We no longer kernel.release file (to troubleshoot ccache issues). Remove "if true". Change-Id: If64798625e693c9abfaf085f6e5b23f77eadf73f
2019-02-22jenkins-helpers.sh: Simplify run_step* functionsMaxim Kuvyrkov
Remove copying of entries from base-artifacts/STEP/ to artifacts/STEP/ for skipped steps. We used to rely on $run_step_prev_artifacts/build-ok markers to detect pass/fail conditions of the previous step -- something that we now explicitly handle with skip_/reset_/stop_on_on_fail modes of run_step(). So remove unused feature. Change-Id: I06e4298aa06ffb2aaf677d2c51e89da61ae9b119
2019-02-18[rr-many 1/N]: Support testing multiple projects in the same buildMaxim Kuvyrkov
This patch series is both a major cleanup and an optimization of round-robin jobs. We switch from testing each component (binutils, gcc, linux) in separate builds in round-robin fashion to testing all components in the same build, and, if there's a failure, re-triggering builds for individual components like we are doing now. Then if individual build fails, it triggers bisect on that one component. The cleanup part is that jenkins triggers are greatly simplified and we can remove all trigger jobs (of which we had hundreds). The optimization part is that successful builds (which is the majority) now consume N times less resources, where N is the number of components -- 3 in case of binutils, gcc, linux, -- because all components are updated and tested in the same build. This patch is the first in the series, and it replaces uses of $current_project and $current_branch with "baseline" keyword of components' branches. I.e., for testing LLVM in LLVM+Kernel jobs we currently use ==rr[llvm_branch] master ==rr[linux_branch] master \ ==rr[current_project] llvm ==rr[current_branch] SHA1 and it will change to ==rr[llvm_branch] SHA1 ==rr[linux_branch] baseline . IMO, the latter is significantly more intuitive. Change-Id: Ib47dcac1571381f870150e4872ec37be5d900a07
2019-02-07tcwg_kernel-*.sh: Avoid proxy variablesMaxim Kuvyrkov
... and use ${rr[X]} instead of $X. We make an exception for $current_project in tcwg_kernel-bisect.sh to do a mechanical change in a separate patch. Change-Id: Ib365552483d016e9096cc791f61a34015e50e32a
2019-01-22jenkins-helpers.sh: Improve run_step functionality.Maxim Kuvyrkov
This is partly fix, partly cleanup. At the moment in bisection mode artifacts/results are not populated until first step successfully executes. This means that for bisections of binutils, gcc, and llvm regressions the results file is empty if the build of these projects fails (i.e., no successful steps at all). This causes empty clauses in the bisection emails due to artifacts/results file being empty. We could have fixed this by adding === Starting Y build <value of successful previous step> === to the top of every build step, but instead we refactor and cleanup run_step support to handle constant-value result entries. In addition to current "stop_on_fail" mode we add "skip_on_fail" and "reset_on_fail" modes, which simplify error handling for most build steps. Change-Id: Ic2d1a15fa490ec25be741cdaf718442260c52e6d
2019-01-22tcwg_kernel-build.sh: Fix bisection of GCC regressionsMaxim Kuvyrkov
I forgot to change the name of GCC's build step from build_abe-gcc to build_abe-stage1 in commit 5d1de6f1 "tcwg_kernel-build.sh: Support building glibc and gcc-stage2", which caused GCC bisections to skip all build steps. We didn't have a GCC regression until last Friday. Change-Id: Ie1242ca5a78bc420d86f241241874b1eb64c7881
2019-01-22tcwg_kernel*: Correct names of *_rev variables.Maxim Kuvyrkov
At the moment *_rev variables, such as current_rev, accept both git branches and git revisions (SHA1s) as values, which is confusing and makes it difficult to write code for manifest generation (manifests need all GIT references resolved at the moment of generation so that reproduction runs sees the "old" state of world). This change standardize the meaning of *_branch and *_rev suffices: *_branch variables accept either SHA1s or git branches and *_rev variables accept only SHA1s. With the established meanings, $bad_rev and $baseline_rev parameters of tcwg_kernel-bisect.sh script can only be SHA1s (which they are anyway in all reasonable cases), which allowed to simplify handling of a few things in tcwg_kernel-bisect.sh script. Change-Id: Ifc52385e4d3aeab2a3b6945fa6e1c88bcc2c7b6d
2019-01-21tcwg_kernel-build.sh: Simplify reproduction logicMaxim Kuvyrkov
Remove "reproduce" mode and follow the manifest. Use dedicated variables for storing projects' SHA1s' in the manifest in clone_repo like we do in all other places. Change-Id: I5407c403cd553bb6103addda0829ba8d0f0869cb
2019-01-16tcwg_kernel-build.sh: Stabilize kernel build for ccacheMaxim Kuvyrkov
Kernel likes to include auto-generated stuff into main headers, which completely breaks ccache optimizations. KBUILD_BUILD_TIMESTAMP is the big one, it's different between builds from the same sources. SUBLEVEL and EXTRAVERSION change often enough to break large bisections. Same for LOCALVERSION. We save kernel.release in artifacts/ to have a record of release strings. Change-Id: I06ed87c554481b5202cde517ee4fbaa6c25e454b
2019-01-11tcwg_kernel-build.sh: Make sure manifest declares variables in the global ↵Maxim Kuvyrkov
namespace. Change-Id: Ic618e76d38a3dc446b6fd29e05caf9987770f01b
2018-12-18tcwg_kernel-build.sh: Add new --mode reproduceMaxim Kuvyrkov
... to reproduce a previous build using manifest. Change-Id: I21521204a3d8b409c7dbf1c45137ddb8c6f85f15
2018-12-18tcwg_kernel-build.sh: Improve checking of parameters.Maxim Kuvyrkov
Change-Id: Iba94ba9ea421f2dc326b8909a71807ebe46a52b4
2018-12-14round-robin.sh, tcwg_kernel-build.sh: Remove ${rr[git_read_only]}Maxim Kuvyrkov
This assert variable turned out to no be useful. Change-Id: Ibea06f6bab6e11ae2625bb1e440fbee1319decf7
2018-12-14tcwg_kernel-build.sh: Move round-robin helpers to round-robin.shMaxim Kuvyrkov
Change-Id: I6753fae4d94add85b5729ea1b121395ae5c679f0
2018-12-12tcwg_kernel-build.sh: Fix typo.Maxim Kuvyrkov
Change-Id: I6bd417e5f36d7df05d530d9633117fce4d9f315f
2018-12-12tcwg_kernel-build.sh: Document ${rr[]} elementsMaxim Kuvyrkov
Change-Id: Ib2b7461f191a0a47df5ee61f21c2279c20707268
2018-12-12Fix handling of $top_artifactsMaxim Kuvyrkov
Make handling of $top_artifacts same as all other rr[] variables Change-Id: I9343217bf819bd46fa8d418c6549c4be32e4afd3
2018-12-12tcwg_kernel-build.sh: Make check_regression depend only on ${rr[]}Maxim Kuvyrkov
rr[reset_baseline]="$reset_baseline" Change-Id: I101947234502348c8f9ea32463c0ce31d7598fe9
2018-12-12tcwg_kernel-build.sh: Make build_linux depend only on ${rr[]}Maxim Kuvyrkov
rr[linux_config]="$linux_config" rr[toolchain]="$toolchain" Change-Id: I3a8bb31e2c9cb6954810fa8cd3b3215356c8730d
2018-12-12tcwg_kernel-build.sh: Make build_abe_1 depend only on ${rr[]}Maxim Kuvyrkov
rr[target]="$target" Change-Id: Ie0807b4c57f67f34c0363ea322ca42b4d0c56bfe
2018-12-12tcwg_kernel-build.sh: Make reset_artifacts depend only on ${rr[]}Maxim Kuvyrkov
Rename rr[current_project]="$current_project" rr[current_rev]="$current_rev" rr[git_read_only]="$git_read_only" rr[mode]="$mode" Change-Id: I6bb6a946f9a78d5ae89456b1b7345f020de9734a
2018-12-12tcwg_kernel-build.sh: Rename reset_artifacts depend only on ${rr[]}Maxim Kuvyrkov
Rename $top_artifacts -> ${rr[top_artifacts]} $baseline -> ${rr[baseline_branch]} Change-Id: I87d07cf41bbbce2fe020c1b84c782ce412e6f596
2018-12-12tcwg_kernel*: Rename git_repo and git_branchMaxim Kuvyrkov
This is a mechanical change to rename: git_repo[X] -> rr[X_url] git_branch[X] -> rr[X_rev] Change-Id: Idda39b49950b414fa6bacdb0094d5cb125d1867d
2018-12-12tcwg_kernel*: Rename config[*] to rr[*].Maxim Kuvyrkov
This is beginning of a massive variable renaming patch series. The goal is to encapsulate all configuration variables that round-robin routines are using into "rr" associative array. This encapsulation will allow to move round-robin routines such as clone_repo, prepare_abe, build_abe, etc. into helper file and make it depend on a well-documented array of configuration variables "rr". Change-Id: Ie8aad82c1527ced79465fa8d21a1eaa0b11f5e7b
2018-12-12tcwg_kernel*: Stop using and remove default configurationMaxim Kuvyrkov
Rely on manifest snippets in tcwg_kernel/* instead. Also make obligatory_variables handle bash arrays by using "declare -p". User-visible change is that now developers will need to explicitly add "@@ ./tcwg_kernel/gnu-master.sh", etc., which have been default in the past. Change-Id: I788e7cdca098fddeb67e9087252f9d53691407bf
2018-12-11tcwg_kernel-build.sh: Remove unnecessary indirection via ${git_dirs[]}Maxim Kuvyrkov
Change-Id: I0a7c32c871d33044be172855d037f152b2f5f82f
2018-12-11tcwg_kernel-build.sh: Add --mode continueMaxim Kuvyrkov
Add new "--mode continue" for developer purposes. Preserve existing artifacts and continue build from specified step. Change-Id: I4694cd8ae08f8ea2a5ef9a6c891c731449dc572e
2018-12-11tcwg_kernel-build.sh: Support building glibc and gcc-stage2Maxim Kuvyrkov
Make ABE routines more generic to enable building glibc and gcc stage2. These routines are going to be moved to round-robin.sh helper files to share with other jobs. Change-Id: I81038aa53293075faba643e4ad93303d5bd18041
2018-12-11tcwg_kernel-*.sh: Remove --tidy supportMaxim Kuvyrkov
Now that we are sharing workspaces among all configurations, we no longer need to be super-careful about disk space. Change-Id: I2702fe9ced1b104a335f91982ec06b1798bc80e9
2018-12-07jenkins-helpers: Add manifest generation logic to convert_args_to_variablesMaxim Kuvyrkov
... and re-work bash sourcing logic "@@" to be more flexible / verbose. The idea is that specifying "%% ./manifest.sh" as the 1st argument on the command line will cause all subsequent arguments to be logged in ./manifest.sh. A reproducer build then can include "@@ ./manifest.sh" and reproduce the original build. Build environment that is not on the command line (e.g., repo revisions) can be added to the manifest with help of "manifest_out" helper. E.g., command-line argument "--current_rev master" will be logged in manifest as == current_rev="master" == and then logic in the script can override that with cat <<EOF | manifest_out current_rev=$(git rev-parse HEAD) EOF thus producing manifest with == current_rev="master" ... current_rev=abc123cab == Change-Id: I066be570c08eda4f80f148dccf475d1794eba229
2018-11-26tcwg_kernel-build.sh: Fix reset_artifacts to not delete artifacts/jenkins .Maxim Kuvyrkov
Change-Id: I32c37e5e8cfdff474aab187ec9985a1177644391
2018-11-26tcwg_kernel-build.sh: Preserve artifacts/jenkins in reset_artifactsMaxim Kuvyrkov
So that we can archive info provided by tcwg_kernel.yaml such as build-name and (in future) URL links to jobs. The latter will be helpful when browsing results history in base-artifacts.git repo. Also fix a bug that preserved all of "artifacts/1-reset_artifacts/*" files, instead of only artifacts/1-reset_artifacts/console.log. Change-Id: I549126e7284bd34452abecd35553160d325c79e7
2018-11-26Don't ignore "null" values in variable expansionsMaxim Kuvyrkov
Replace ${var:-default} with ${var-default}. I learned something new about shell scripting today. From bash manual: === When not performing substring expansion, using the form described below (e.g., ‘:-’), Bash tests for a parameter that is unset or null. Omitting the colon results in a test only for a parameter that is unset. Put another way, if the colon is included, the operator tests for both parameter’s existence and that its value is not null; if the colon is omitted, the operator tests only for existence. === The immediate problem I need to fix is handling of host_aarchXX_excludecheck and host_x86_64_excludecheck parameters in tcwg-buildfarm.sh. With ":-" syntax the empty ("null") values are replaced by defaults, causing GCC testsuite to be ignored on aarchXX hosts when "--host_aarchXX_excludecheck ''" is given. There happens to be a single usage ":-" in ${rw:-rw} in start-container-qemu.sh, where ":-" is actually needed. Change-Id: Ibc8e070b698e1c76e2161eb65d40639b8cdec1f3
2018-11-14tcwg_kernel-build.sh: Fill in update_baseline and push_baselineMaxim Kuvyrkov
... and add git_push helper. Change-Id: I2bdbbc14aa08f9bb10b1690780542c6e049c4b73
2018-11-14tcwg_kernel-build.sh: Fill in no_regression_p and check_regression.Maxim Kuvyrkov
Change-Id: I1725a201a7665d8728180bf021050e8c1c1378f7
2018-11-14tcwg_kernel-build.sh: Fill build_linux and count_linux_objsMaxim Kuvyrkov
Change-Id: I9cddd58582afd36e9dd6c10273c2d175dd9c076a
2018-11-14tcwg_kernel-build.sh: Fill build_llvm* functionsMaxim Kuvyrkov
... and add print_llvm_target helper. Change-Id: I20b048d4acd942a6e4a06acb2308489f00391a9a
2018-11-14tcwg_kernel-build.sh: Add logic to build Binutils and GCC using ABE.Maxim Kuvyrkov
Add several jenkins-helpers along the way. Change-Id: I6b654f6a5cfa5386d5f691452aacaac11ff89f5b
2018-11-13tcwg_kernel-build.sh: Fill in clone_repo and add git_init_linaro_local_remoteMaxim Kuvyrkov
Change-Id: I36ed5078a80360c42ed6079ae98f76fa94354de7
2018-11-08tcwg_kernel-build: Fill reset_artifacts.Maxim Kuvyrkov
Change-Id: Icec96100e32fc5df26f1536c0102c1431d7c971c
2018-11-07tcwg_kernel-build: New build scriptMaxim Kuvyrkov
This patch adds execution flow structure for tcwg_kernel-build script. The code for individual execution steps will be in separate patches for ease of review. Change-Id: I5e5adba01b6178addd3cdbae9dc18bdc0f7e7697