Skip to content

Commit 28421fa

Browse files
authored
Merge pull request #12 from RyeMutt/cpu-count-override
Add support for overriding AUTOBUILD_CPU_COUNT from environment
2 parents 2b22ae3 + edf339e commit 28421fa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ For more information, see [Autobuild's wiki page][wiki].
2525
| AUTOBUILD_BUILD_ID | - | Build identifier |
2626
| AUTOBUILD_CONFIGURATION | - | Target build configuration |
2727
| AUTOBUILD_CONFIG_FILE | autobuild.xml | Autobuild configuration filename |
28+
| AUTOBUILD_CPU_COUNT | - | Build system cpu core count |
2829
| AUTOBUILD_GITHUB_TOKEN | - | GitHub HTTP authorization token to use during package download |
2930
| AUTOBUILD_GITLAB_TOKEN | - | GitLab HTTP authorization token to use during package download |
3031
| AUTOBUILD_INSTALLABLE_CACHE | - | Location of local download cache |

autobuild/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def establish_platform(specified_platform=None, addrsize=DEFAULT_ADDRSIZE):
164164
os.environ['AUTOBUILD_ADDRSIZE'] = str(addrsize) # for spawned commands
165165
os.environ['AUTOBUILD_PLATFORM'] = Platform # for spawned commands
166166
os.environ['AUTOBUILD_PLATFORM_OVERRIDE'] = Platform # for recursive invocations
167-
os.environ['AUTOBUILD_CPU_COUNT'] = str(multiprocessing.cpu_count())
167+
os.environ['AUTOBUILD_CPU_COUNT'] = os.environ.get('AUTOBUILD_CPU_COUNT', str(multiprocessing.cpu_count()))
168168

169169
logger.debug("Specified platform %s address-size %d: result %s" \
170170
% (specified_platform, specified_addrsize, Platform))

0 commit comments

Comments
 (0)