Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/review/git-codereview: tests are broken #9602

Closed
bradfitz opened this issue Jan 15, 2015 · 9 comments
Closed

x/review/git-codereview: tests are broken #9602

bradfitz opened this issue Jan 15, 2015 · 9 comments

Comments

@bradfitz
Copy link
Contributor

Two test failures across the board for git-codereview on build.golang.org at the bottom:

--- FAIL: TestGofmtFastForwardMerge (0.37s)
    util_test.go:167: in git-client/, ran [git change dev.branch]: exit status 1
        git: 'change' is not a git command. See 'git --help'.

        Did you mean this?
            whatchanged
--- FAIL: TestHookCommitMsgBranchPrefix (0.24s)
    util_test.go:167: in git-client/, ran [git change dev.cc]: exit status 1
        git: 'change' is not a git command. See 'git --help'.

        Did you mean this?
            whatchanged
FAIL
FAIL    golang.org/x/review/git-codereview  27.941s

and

--- FAIL: TestLoadAuth (0.23s)
    util_test.go:167: in git-client/, ran [git branch --set-upstream-to origin/master]: exit status 129
        error: unknown option `set-upstream-to'
        usage: git branch [options] [-r | -a] [--merged | --no-merged]
           or: git branch [options] [-l] [-f] <branchname> [<start-point>]
           or: git branch [options] [-r] (-d | -D) <branchname>...
           or: git branch [options] (-m | -M) [<oldbranch>] <newbranch>

        Generic options
            -v, --verbose         show hash and subject, give twice for upstream branch
            -t, --track           set up tracking mode (see git-pull(1))
            --set-upstream        change upstream info
            --color[=<when>]      use colored output
            -r, --remotes         act on remote-tracking branches
            --contains <commit>   print only branches that contain the commit
            --abbrev[=<n>]        use <n> digits to display SHA-1s

        Specific git-branch actions:
            -a, --all             list both remote-tracking and local branches
            -d, --delete          delete fully merged branch
            -D                    delete branch (even if not merged)
            -m, --move            move/rename a branch and its reflog
            -M                    move/rename a branch, even if target exists
            --list                list branch names
            -l, --create-reflog   create the branch's reflog
            --edit-description    edit the description for the branch
            -f, --force           force creation (when already exists)
            --no-merged <commit>  print only not merged branches
            --merged <commit>     print only merged branches

git rev-parse --abbrev-ref newbranch@{u}
error: No upstream branch found for 'newbranch'
error: No upstream branch found for 'newbranch'
fatal: ambiguous argument 'newbranch@{u}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
newbranch@{u}

/tmp/go-build208545717/golang.org/x/review/git-codereview/_test/git-codereview.test: exit status 128
FAIL    golang.org/x/review/git-codereview  0.427s

/cc @minux @adg

@josharian
Copy link
Contributor

I see a different set of broken tests locally (at commit ca224e1, Jan 30 2015).

@bradfitz what is the git version on the builders? I've got 2.2.1 on OS X here. We might need to have multiple versions represented on the builders (or have git-codereview enforce a minimum version for sanity).

--- FAIL: TestCurrentBranch (0.22s)
    branch_test.go:17: on master
    branch_test.go:20: on newbranch
    branch_test.go:53: b.OriginBranch() = "master", want "origin/master"
    branch_test.go:24: making change
    branch_test.go:53: b.OriginBranch() = "master", want "origin/master"
    branch_test.go:29: on dev.branch
    branch_test.go:33: on newdev
    branch_test.go:37: making change
    branch_test.go:42: detached head mode
--- FAIL: TestPendingNoneBranch (0.16s)
    util_test.go:242: git-codereview pending
    pending_test.go:468: invalid pending output:
        work (current branch, tracking master)


        want:
        work (current branch)

    pending_test.go:470: diff want actual:
        --- /var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm390cfb/T/gofmt754016800 2015-02-03 14:15:16.000000000 -0800
        +++ /var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm390cfb/T/gofmt563753727 2015-02-03 14:15:16.000000000 -0800
        @@ -1,2 +1,2 @@
        -work (current branch)
        +work (current branch, tracking master)

--- FAIL: TestSyncRebase (0.72s)
    util_test.go:242: git-codereview sync
    util_test.go:242: git-codereview sync
    sync_test.go:90: CL hashes DID NOT change during sync after submit
FAIL
FAIL    golang.org/x/review/git-codereview  19.693s

@bradfitz
Copy link
Contributor Author

bradfitz commented Feb 3, 2015

https://github.com/golang/build/tree/master/env describes the new-style builders.

@adg knows about OS X.

@mikioh mikioh changed the title review: tests are broken git-codereview: tests are broken Feb 3, 2015
@josharian
Copy link
Contributor

Looks like they're running git 1.7.10.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title git-codereview: tests are broken x/review/git-codereview: tests are broken Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-review label Apr 14, 2015
@osocurioso
Copy link
Contributor

Mailed http://golang.org/cl/9256 for deflaking TestSyncRebase.

Strange observation: I get different test failures depending on whether I'm on master or a topic branch (linux/amd64 if that has any impact).

Edit: That is, master or topic branch in golang.org/x/review repo.

@gopherbot
Copy link

CL https://golang.org/cl/9256 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/9312 mentions this issue.

adg pushed a commit to golang/review that referenced this issue May 11, 2015
In order to guarantee different hashes on "client" and "server" we need
to generate different commit histories.

Fixes golang/go#10048, updates golang/go#9602.

Change-Id: I42a50dc890598dd3a3b6c626c6db70ffe06c14d3
Reviewed-on: https://go-review.googlesource.com/9256
Reviewed-by: Andrew Gerrand <adg@golang.org>
adg pushed a commit to golang/review that referenced this issue May 12, 2015
Commit 8ef20ce (set x.mailed tag to mailed commit instead of HEAD) broke
TestMail, TestMailShort, and TestMailTopic.

Possibly related to golang/go#9602.

Change-Id: Iac5ea98d034ee4815b3b7ea2d5cc3f523944b953
Reviewed-on: https://go-review.googlesource.com/9312
Reviewed-by: Andrew Gerrand <adg@golang.org>
@gopherbot
Copy link

CL https://golang.org/cl/9951 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/9952 mentions this issue.

adg pushed a commit to golang/review that referenced this issue May 13, 2015
In order to guarantee different hashes on "client" and "server" we need to generate different
commit histories.

Fixes golang/go#10048.
Updates golang/go#9602.

Change-Id: I511f517639230d7aca74b3d2ce3bfa6a2c299a5c
Reviewed-on: https://go-review.googlesource.com/9951
Reviewed-by: Andrew Gerrand <adg@golang.org>
@rsc
Copy link
Contributor

rsc commented Jan 29, 2016

I don't see these failures anymore.

@rsc rsc closed this as completed Jan 29, 2016
gopherbot pushed a commit to golang/review that referenced this issue Mar 2, 2016
Sample output when modifying one of the git commands:

--- FAIL: TestSync (0.36s)
	util_test.go:250: git-codereview change work
	util_test.go:250: git-codereview sync
	util_test.go:207: in git-client/, ran [git add --does-not-exist file1] with git version 1.9.1:
		exit status 129
		error: unknown option `does-not-exist'
		usage: git add [options] [--] <pathspec>...

		    -n, --dry-run         dry run
		    -v, --verbose         be verbose

		    -i, --interactive     interactive picking
		    -p, --patch           select hunks interactively
		    -e, --edit            edit current diff and apply
		    -f, --force           allow adding otherwise ignored files
		    -u, --update          update tracked files
		    -N, --intent-to-add   record only the fact that the path will be added later
		    -A, --all             add changes from all tracked and untracked files
		    --ignore-removal      ignore paths removed in the working tree (same as --no-all)
		    --refresh             don't add, only refresh the index
		    --ignore-errors       just skip files which cannot be added because of errors
		    --ignore-missing      check if - even missing - files are ignored in dry run

Updates golang/go#9602.

Change-Id: Ibeb93b1f3f4da43d1f95fd0eb5f2c372210cd6b3
Reviewed-on: https://go-review.googlesource.com/9952
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Feb 3, 2017
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants