Pin the customer_tests (#83964)

This commit is contained in:
Ian Hickson
2021-07-02 19:16:04 -07:00
committed by GitHub
parent 251ea4129d
commit 0b8174e0b0
4 changed files with 69 additions and 7 deletions

View File

@@ -45,10 +45,10 @@ String findCommit({
final Commit anchor;
if (primaryBranch == primaryTrunk) {
log('on $primaryTrunk, using last commit as anchor');
anchor = Commit.parse(git(primaryRepoDirectory, <String>['log', Commit.formatArgument, '--max-count=1', primaryBranch]));
anchor = Commit.parse(git(primaryRepoDirectory, <String>['log', Commit.formatArgument, '--max-count=1', primaryBranch, '--']));
} else {
final List<Commit> branchCommits = Commit.parseList(git(primaryRepoDirectory, <String>['log', Commit.formatArgument, primaryBranch]));
final List<Commit> trunkCommits = Commit.parseList(git(primaryRepoDirectory, <String>['log', Commit.formatArgument, primaryTrunk]));
final List<Commit> branchCommits = Commit.parseList(git(primaryRepoDirectory, <String>['log', Commit.formatArgument, primaryBranch, '--']));
final List<Commit> trunkCommits = Commit.parseList(git(primaryRepoDirectory, <String>['log', Commit.formatArgument, primaryTrunk, '--']));
if (branchCommits.isEmpty || trunkCommits.isEmpty || branchCommits.first.hash != trunkCommits.first.hash)
throw StateError('Branch $primaryBranch does not seem to have a common history with trunk $primaryTrunk.');
if (branchCommits.last.hash == trunkCommits.last.hash) {
@@ -68,6 +68,7 @@ String findCommit({
'--until=${anchor.timestamp.toIso8601String()}',
'--max-count=1',
secondaryBranch,
'--',
]);
}