[users at bb.net] Question on passing state between steps

Hugh Sorby h.sorby at auckland.ac.nz
Tue May 7 22:14:38 UTC 2019

I set the worker properties with the following:

        self._properties['env'] = {'APPVER': '6.1', 'CL': '/AI C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319', 'CommandPromptType': 'Native',

                                   'Configuration': 'Release', 'CURRENT_CPU': 'x64', 'FrameworkVersion': 'v4.0.30319',

                                   'INCLUDE': ['C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE', 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE', 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE\\gl'],

                                   'LIB': ['C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib\\amd64', 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib\\X64'],

                                   'LIBPATH': ['C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework64\\v3.5', 'C:\\Windows\\Microsoft.NET\\Framework\\v3.5', 'C:\\Program Files (x80\\VC\\Lib\\amd64'],

                                   'PATH': ['C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework64\\v3.5', 'C:\\Windows\\Microsoft.NET\\Framework\\v3.5', 'C:\\Program Files (x86)\\ommon7\\IDE', 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools', 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\amd64', 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\VCPacoft SDKs\\Windows\\v7.1\\Bin\\NETFX 4.0 Tools\\x64', 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin\\x64', 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin', 'C:\\python27', 'C:\\python27\\Scripts', 'C:\\python34', 'C:\\python34\\Scripts', 'C:\\cygwin64\\bin', '${PATH}'],

                                   'PlatformToolset': 'Windows7.1SDK', 'sdkdir': 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\',

                                   'TARGET_CPU': 'x64', 'TARGET_PLATFORM': 'WIN7', 'ToolsVersion': '4.0',

                                   'WindowsSDKDir': 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\', 'WindowsSDKVersionOverride': 'v7.1'}

It is a bit of a pain getting it done initially but then the environment is well controlled under the execution of the factory build steps.  I have found this to be the best way for me.  It is much better than trying to run vcvarsall.bat at every step.

From: users <users-bounces at buildbot.net> on behalf of Greg Bullock <greg at nwra.com>
Sent: Wednesday, May 8, 2019 8:55 AM
To: users at buildbot.net
Subject: Re: [users at bb.net] Question on passing state between steps

I faced a similar problem.  To work around it, I have a batch file (see below) to run consecutively all the steps that need to share the environment.

It's not perfect.  In particular, I've had trouble getting useful stdout/stderr logs and error code back to the builder when one of the steps fails.

I'd appreciate your sharing back any improvements you make on this.

echo off

set THREAD_CFG=%~1
if /i "%~1"=="" set THREAD_CFG=single
if /i "%~2"=="" set LIB_LINKING=shared
if /i "%~3"=="" set CMAKE_BUILD_TYPE=Release
if /i "%~4"=="" set PROJ_FOLDER=Main_Project

:: For the log, show the command line we're about to run
set a_cmd=cd ..\build_out
echo %a_cmd%

:: For the log, show the command line we're about to run
set a_cmd=set path=C:\Program Files (x86)\CMake\bin;G:\TDM-GCC-64\bin;%path%
:: set a_cmd=set path=C:\Program Files (x86)\CMake\bin;%path%
echo %a_cmd%

echo %path%
:: set path=G:\TDM-GCC-64\bin;%path%   -- The TDM builds cause a runtime error. Disable for now.
:: set path=G:\mingw-w64\x86_64-5.4.0-posix-seh-rt_v5-rev0\mingw64\bin;%path%  -- Should not be necessary, as it's on the buildbot BuilderConfig PATH environment variable.

:: For the log, show the command line we're about to run
set a_cmd=cmake -G "MinGW Makefiles" -DCMAKE_Threading="%THREAD_CFG%" -DLIB_LINKING="%LIB_LINKING%" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" ..\build\Projects\cmake\%PROJ_FOLDER%
echo %a_cmd%

:: For the log, show the command line we're about to run
set a_cmd=mingw32-make
echo %a_cmd%


On 5/7/2019 1:22 PM, Trung Tran wrote:
I current doing a simple build steps that include
"Setup enviroments" (running vcvarsall.bat")
"Run Cmake"
"Run MsBuild"
I notice that all steps are not sharing any state between them. This is the issue for my setup environment steps because I need that for both sub sequence step.
What is the right way to do this?

users mailing list
users at buildbot.net<mailto:users at buildbot.net>

Greg Bullock
NorthWest Research Associates
301 Webster St.
Monterey, CA  93940
(831) 582-4907
greg at nwra.com<mailto:greg at nwra.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20190507/ca9f6b21/attachment.html>

More information about the users mailing list