Skip to content

Commit c777ea3

Browse files
committed
✅ Refine parallel builds
Followup to #28447
1 parent f6e00bf commit c777ea3

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

buildroot/bin/build_all_examples

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ build_all_examples [-a|--archive] - Copy the binary to the export locati
5050
}
5151

5252
# Assume the most recent configs
53-
BRANCH=import-2.1.x
5453
unset FIRST_CONF
5554
EXIT_USAGE=
5655
LIMIT=1000
@@ -99,6 +98,11 @@ shift $((OPTIND - 1))
9998

10099
# Check for mixed continue, skip, resume arguments. Only one should be used.
101100
((CONTINUE + CONTSKIP + ISRES + PURGE > 1)) && { echo "Don't mix -c, -p, -s, and -r options" ; echo ; EXIT_USAGE=2 ; }
101+
[[ -n $BRANCH && -n $CBASE ]] && { echo "Don't mix --branch ($BRANCH) and --base ($CBASE) options" ; echo ; EXIT_USAGE=2 ; }
102+
103+
# Assume import-2.1.x if no --base or --brancs is given.
104+
# If no --base is supplied, one will be created.
105+
[[ -z $BRANCH && -z $CBASE ]] && BRANCH=import-2.1.x
102106

103107
# Exit with helpful usage information
104108
((EXIT_USAGE)) && { usage ; let EXIT_USAGE-- ; exit $EXIT_USAGE ; }
@@ -162,9 +166,6 @@ export PAUSE=1
162166
# (not a pipeline subshell) so that exit 1 actually propagates.
163167
while IFS= read -r -d $'\0' CONF; do
164168

165-
# Remove the file name and slash from the end of the path
166-
CONF=${CONF%/*}
167-
168169
# Get a config's directory name
169170
DIR=${CONF#$CBASE/config/examples/}
170171

@@ -214,8 +215,7 @@ while IFS= read -r -d $'\0' CONF; do
214215

215216
export PAUSE=0
216217

217-
done < <(find "$CBASE"/config/examples -type d -name 'Configuration.h' -o -name 'Configuration_adv.h' -print0 \
218-
| LC_ALL=C sort -fz)
218+
done < <(find "$CBASE/config/examples" \( -name Configuration.h -o -name Configuration_adv.h \) -type f -exec dirname {} \; | LC_ALL=C sort -u)
219219

220220
echo "Exiting"
221221

File renamed without changes.

buildroot/bin/parallel-examples/fix_host_action_configs.py renamed to buildroot/bin/parallel-fix_host_action_configs.py

File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env python3
22
"""
3-
parallel_build_test.py — Run config-example loop tests in parallel across Marlin clones.
3+
parallel_build.py — Run config-example loop tests in parallel across Marlin clones.
44
55
Replaces parallel_build_test.sh. Uses argparse and subprocess directly instead
66
of shell argument parsing and eval.
77
88
Usage:
9-
python3 buildroot/bin/parallel_build_test.py [OPTIONS]
9+
python3 buildroot/bin/parallel_build.py [OPTIONS]
1010
1111
Options:
1212
--script=SCRIPT Loop script to run (default: fix_host_action_configs.py)
@@ -38,7 +38,7 @@
3838
# ---------------------------------------------------------------------------
3939
# Defaults
4040
# ---------------------------------------------------------------------------
41-
DEFAULT_SCRIPT = "buildroot/bin/fix_host_action_configs.py"
41+
DEFAULT_SCRIPT = "buildroot/bin/parallel-build_and_log.py"
4242
DEFAULT_CLONES = 4
4343
DEFAULT_PREFIX = "marlin-clone"
4444

0 commit comments

Comments
 (0)