Boost logo

Boost :

Subject: Re: [boost] Travis/Appveyor improvements for the superproject
From: Daniel James (dnljms_at_[hidden])
Date: 2017-09-22 14:15:46


On 20 September 2017 at 14:33, Peter Dimov via Boost
<boost_at_[hidden]> wrote:
> Travis and Appveyor tests for the Boost superproject have been improved to
> automatically run the tests for the library mentioned in the commit message.
> For example, if the message is "Update iterator from develop", the
> corresponding CI job runs the tests of the Iterator library (among other
> things).

This seems like a bad idea. There are already modules it won't work
for, and it won't work for manual commits, for which testing is
probably more important. It would be better to get the paths from git
than scraping it from a commit message. You should already have a
checkout of the super project, so something like this should work:

import subprocess, re

repo_path = '.'
commit = 'HEAD'

raw_diff = subprocess.check_output(['git', '-C', repo_path, 'diff',
commit + '^', commit, '--raw'])
paths = re.findall(r'^:\d{6} 160000 [a-z0-9.]+ [a-z0-9.]+
[A-Z]\t(.*)$', raw_diff, re.M)
print paths


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk