Skip to content

Commit c46ebc2

Browse files
szedergitster
authored andcommitted
travis-ci: do not skip successfully tested trees in debug mode
Travis CI offers shell access to its virtual machine environment running the build jobs, called "debug mode" [1]. After restarting a build job in debug mode and logging in, the first thing I usually do is to install dependencies, i.e. run './ci/install-dependencies.sh'. This works just fine when I restarted a failed build job in debug mode. However, after restarting a successful build job in debug mode our CI scripts get all clever, and exit without doing anything useful, claiming that "This commit's tree has already been built and tested successfully" [2]. Our CI scripts are right, and we do want to skip building and testing already known good trees in "regular" CI builds. In debug mode, however, this is a nuisiance, because one has to delete the cache (or at least the 'good-trees' file in the cache) to proceed. Let's update our CI scripts, in particular the common 'ci/lib.sh', to not skip previously successfully built and tested trees in debug mode, so all those scripts will do what there were supposed to do even when a successful build job was restarted in debug mode. [1] https://docs.travis-ci.com/user/running-build-in-debug-mode/ [2] 9cc2c76 (travis-ci: record and skip successfully built trees, 2017-12-31) Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit c46ebc2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ci/lib.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ save_good_tree () {
3434
# successfully before (e.g. because the branch got rebased, changing only
3535
# the commit messages).
3636
skip_good_tree () {
37+
if test "$TRAVIS_DEBUG_MODE" = true
38+
then
39+
return
40+
fi
41+
3742
if ! good_tree_info="$(grep "^$(git rev-parse $CI_COMMIT^{tree}) " "$good_trees_file")"
3843
then
3944
# Haven't seen this tree yet, or no cached good trees file yet.

0 commit comments

Comments
 (0)