@@ -64,3 +64,44 @@ characters), for example using KeePassX.
6464* Restart the buildbot server: ` make restart-master `
6565
6666Documentation: http://docs.buildbot.net/current/manual/configuration/workers.html#defining-workers
67+
68+ ## Testing changes locally
69+
70+ To test a change to the buildbot code locally, a worker is needed to run jobs.
71+ First create a ` settings.yaml ` file in the repository root. The settings file controls
72+ how the Builbot master should connect to workers. The simplest setup runs a worker in the
73+ same process as the Buildbot master on the local machine. The local environment must have any
74+ required dependencies for that worker environment. With the settings file created run:
75+
76+ ``` bash
77+ export PYBUILDBOT_SETTINGS_PATH=$( pwd) /settings.yaml
78+ ```
79+
80+ Then, update the settings file to include the following:
81+
82+ ``` yaml
83+ # Use a local in-process worker
84+ use_local_worker : true
85+ # Use one of the buildfactories found in master/custom/factories.py.
86+ # Here we use the WASI cross build factory. If unspecified, the default
87+ # is to use the UnixBuild factory
88+ local_worker_buildfactory : " Wasm32WasiCrossBuild"
89+ ` ` `
90+
91+ Then run
92+
93+ ` ` `
94+ make update-master
95+ ```
96+
97+ This updates the state database and starts the buildbot master.
98+ You can now open http://localhost:9011/ and use the local Buildbot master web UI.
99+ Under Builds -> Builders there should be one or more builders for the factory
100+ that was configured. After clicking on the relevant builder, clicking on the "force"
101+ button in the upper right corner will start a new build.
102+
103+ Finally, the master can be stopped when no longer needed by running
104+
105+ ```
106+ make stop-master
107+ ```
0 commit comments