<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The solution we arrived at was to write a <a href="https://behat.org/" class="">https://behat.org/</a> backend to perform automated tests of our incremental builds. The Behat backend copies the project's source tree to a temporary folder, then runs a scripted test suite on it, which looks like this:<br class=""><br class=""> Feature: Incremental builds<br class=""> Check that modifying certain source files causes certain build steps to be performed (or not performed).<br class=""><br class=""> Scenario: Editing a core type header<br class=""> Given a completed build<br class=""> When I edit type/integer.h<br class=""> And I build<br class=""><br class=""> Then it should update lib/MyFramework.framework/Headers/integer.h<br class=""> And it should update lib/MyFramework.framework/MyFramework<br class=""> And it should update bin/MyApp.app/Contents/Frameworks/MyFramework.framework/Headers/integer.h<br class=""> And it should update bin/MyApp.app/Contents/Frameworks/MyFramework.framework/MyFramework<br class=""> And it should update the compiler's cache<br class=""><br class=""> Scenario: …<br class=""><br class=""> Feature: Compiler developer mode<br class=""> Check that compiler developer mode properly reduces build dependencies,<br class=""> to reduce edit-compile-run cycle time when working on the compiler.<br class=""><br class=""> Scenario: Enabling compiler developer mode<br class=""> Given a completed build<br class=""> When I run CMake with arguments "-DCOMPILER_DEVELOPER=ON"<br class=""> And I build<br class=""> Then it shouldn't do anything<br class=""><br class=""> Scenario: Editing a compiler source file when in compiler developer mode<br class=""> Given a completed build<br class=""> When I edit compiler/<a href="http://compiler.cc" class="">compiler.cc</a><br class=""> And I build<br class=""><br class=""> Then it should update lib/libMyCompiler.a<br class=""> And it should update bin/my-compiler<br class=""><br class=""> But it shouldn't update the compiler's cache<br class=""> And it shouldn't update bin/something-compiled-using-my-compiler<br class=""><br class=""> Scenario: …<div class=""><br class=""></div></body></html>