Lines Matching +full:buildroot +full:- +full:pipeline
2 set -e
4 TOOLCHAINS_CSV='support/config-fragments/autobuild/toolchain-configs.csv'
8 if [ ! -z "${TEMP_CONF}" ]; then
9 rm -f "${TEMP_CONF}"
17 local -a toolchains
21 … O='help,all,keep,prepare-only,config-snippet:,build-dir:,number:,package:,random:,toolchains-csv:'
22 opts="$(getopt -n "${my_name}" -o "${o}" -l "${O}" -- "${@}")"
23 eval set -- "${opts}"
32 while [ ${#} -gt 0 ]; do
34 (-h|--help)
37 (-a|--all)
40 (-k|--keep)
43 (--prepare-only)
46 (-c|--config-snippet)
49 (-d|--build-dir)
52 (-n|--number)
55 (-p|--package)
58 (-r|--random)
61 (-t|--toolchains-csv)
64 (--)
72 if [ -z "${cfg}" ]; then
73 pkg_br_name="${pkg//-/_}"
75 TEMP_CONF=$(mktemp /tmp/test-${pkg}-config.XXXXXX)
79 if [ ! -e "${cfg}" ]; then
82 if [ -z "${dir}" ]; then
83 dir="${HOME}/br-test-pkg"
86 if [ ${random} -gt 0 ]; then
90 if [ ${number} -gt 0 ]; then
94 if [ ${all} -eq 1 ]; then
100 if [ ${mode} -eq 0 ] ; then
102 elif [ ${mode} -gt 1 ] ; then
103 printf "error: --all, --number and --random are mutually exclusive\n" >&2; exit 1
108 # --> http://server/path/to/name.config
109 toolchains=($(sed -r -e 's/,.*//; /internal/d; /^#/d; /^$/d;' "${toolchains_csv}" \
110 |if [ ${random} -gt 0 ]; then \
111 sort -R |head -n ${random}
112 elif [ ${number} -gt 0 ]; then \
113 head -n ${number}
121 if [ ${nb_tc} -eq 0 ]; then
143 printf "%d builds, %d skipped, %d build failed, %d legal-info failed\n" \
156 mkdir -p "${dir}"
158 CONFIG_= support/kconfig/merge_config.sh -O "${dir}" \
159 "${toolchainconfig}" "support/config-fragments/minimal.config" "${cfg}" \
161 # We want all the options from the snippet to be present as-is (set
167 comm -23 <(sort "${cfg}") <(sort "${dir}/.config") >"${dir}/missing.config"
168 if [ -s "${dir}/missing.config" ]; then
169 if [ ${keep} -ne 1 ]; then
171 rm -f "${dir}/.config"
176 rm -f "${dir}/missing.config"
178 # Defer building the job to the caller (e.g. a gitlab pipeline)
179 if [ ${prepare_only} -eq 1 ]; then
183 if [ -n "${pkg}" ]; then
184 if ! make O="${dir}" "${pkg}-dirclean" >> "${dir}/logfile" 2>&1; then
194 # legal-info done systematically, because some packages have different
195 # sources depending on the configuration (e.g. lua-5.2 vs. lua-5.3)
196 if ! make O="${dir}" legal-info >> "${dir}/logfile" 2>&1; then
202 if [ ${keep} -ne 1 ]; then
209 test-pkg: test-build a package against various toolchains and architectures
217 In case failures are noticed, you can fix the package and just re-run the
218 same command again; it will re-run the test where it failed. If you did
219 specify a package (with -p), the package build dir will be removed first.
222 Only the external toolchains are tried, because building a Buildroot toolchain
224 the -t option. This file should have lines consisting of the path to the
230 toolchains can be tested (-a), an arbitrary number of toolchains (-n
231 in order, -r for random).
235 -h, --help
238 -c CFG, --config-snippet CFG
242 -d DIR, --build-dir DIR
243 Do the builds in directory DIR, one sub-dir per toolchain.
245 -p PKG, --package PKG
246 Test-build the package PKG, by running 'make PKG'; if not specified,
249 -a, --all
251 Buildroot developers.
253 -n N, --number N
257 -r N, --random N
260 -t CSVFILE, --toolchains-csv CSVFILE
265 -k, --keep
270 --prepare-only