Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2135)

Issue 4280087: code review 4280087: gotest: execute gomake properly on Windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by brainman
Modified:
13 years, 11 months ago
Reviewers:
peterGo
CC:
rsc, Joe Poirier, golang-dev
Visibility:
Public.

Description

gotest: execute gomake properly on Windows

Patch Set 1 #

Patch Set 2 : diff -r 9bb646cecf58 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 9bb646cecf58 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 1196d99743dd https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M src/cmd/gotest/gotest.go View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 5
brainman
Hello peterGo, rsc, Joe Poirier (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
13 years, 11 months ago (2011-03-31 23:00:37 UTC) #1
brainman
Peter, I appreciate the effort. I was hoping you'll submit my patch, but I'll do ...
13 years, 11 months ago (2011-03-31 23:01:15 UTC) #2
rsc
Lgtm On Mar 31, 2011 7:01 PM, <alex.brainman@gmail.com> wrote: > Peter, I appreciate the effort. ...
13 years, 11 months ago (2011-03-31 23:05:57 UTC) #3
brainman
*** Submitted as http://code.google.com/p/go/source/detail?r=b12cf7a0a9f4 *** gotest: execute gomake properly on Windows R=peterGo, rsc, Joe Poirier ...
13 years, 11 months ago (2011-03-31 23:10:23 UTC) #4
peterGo
13 years, 11 months ago (2011-04-01 14:36:29 UTC) #5
Alex,

On 2011/03/31 23:01:15, brainman wrote:
> Peter, I appreciate the effort. I was hoping you'll submit my patch, but I'll
do it myself.

I only publish tested working code.

On Mar 31, 8:00 am, alex.brain...@gmail.com wrote:
> diff -r 9bb646cecf58 src/cmd/gotest/gotest.go
> --- a/src/cmd/gotest/gotest.go  Thu Mar 31 15:16:18 2011 +1100
> +++ b/src/cmd/gotest/gotest.go  Thu Mar 31 22:57:49 2011 +1100
> @@ -250,6 +250,10 @@
>         if xFlag {
>                 fmt.Printf("gotest: %s\n", strings.Join(argv, " "))
>         }
> +       if runtime.GOOS == "windows" && argv[0] == "gomake" {
> +               // gomake is a shell script and it cannot be executed directly
on
> Windows.
> +               argv = append([]string{"cmd", "/c", "sh", "-c"},
strings.Join(argv, "
> "))
> +       }
>         var err os.Error
>         argv[0], err = exec.LookPath(argv[0])
>         if err != nil {

I didn't publish your patch because it doesn't work; it doesn't fix the Windows
build.

$cd $GOROOT\src
$./all.bash

--- cd pkg

make -C archive/tar testshort

make[1]: Entering directory `/c/gowin/src/pkg/archive/tar'

gotest -test.short -test.timeout=60

rm -f _test/archive/tar.a

8g -o _gotest_.8 common.go reader.go writer.go  reader_test.go

rm -f _test/archive/tar.a

gopack grc _test/archive/tar.a _gotest_.8

make: Nothing to be done for `writer_test.go'.

_testmain.go:13: undefined: tar.TestWriter

gotest: "c:\\gowin\\bin\\8g.exe -I _test _testmain.go" failed: exit status 1

make[1]: *** [testshort] Error 2

make[1]: Leaving directory `/c/gowin/src/pkg/archive/tar'

make: *** [archive/tar.testshort] Error 2


Peter
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b