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

log test fails if $GOROOT has a dot in it #27

Closed
gopherbot opened this issue Nov 11, 2009 · 5 comments
Closed

log test fails if $GOROOT has a dot in it #27

gopherbot opened this issue Nov 11, 2009 · 5 comments

Comments

@gopherbot
Copy link
Contributor

by qwertymaniac:

What steps will reproduce the problem?
1. Checkout the source, set the environment vars properly.
2. Browse to src/ dir.
3. Run ./all.bash

What is the expected output? What do you see instead?

Build (Testing of log module, specifically) fails with the following
message (tail):

make[2]: Leaving directory `/home/hack/.go/src/pkg/json'
PASS
make[1]: Leaving directory `/home/hack/.go/src/pkg/json'
cd log && make test
make[1]: Entering directory `/home/hack/.go/src/pkg/log'
gotest
make[2]: Entering directory `/home/hack/.go/src/pkg/log'
rm -f _test/log.a _gotest_.6
make[2]: Leaving directory `/home/hack/.go/src/pkg/log'
make[2]: Entering directory `/home/hack/.go/src/pkg/log'
6g -o _gotest_.6 log.go    log_test.go
rm -f _test/log.a
gopack grc _test/log.a _gotest_.6
make[2]: Leaving directory `/home/hack/.go/src/pkg/log'
--- FAIL: log.TestAllLog
        log output should match "^/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23
world$" is "/home/hack/.go/src/pkg/log/log_test.go:60: hello 23 world"
        log output should match "^/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23
world$" is "/home/hack/.go/src/pkg/log/log_test.go:58: hello 23 world"
        log output should match
"^XXX[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]
[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9][0-9][0-9][0-9]
/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23 world$" is "XXX2009/11/11
11:41:08.716400 /home/hack/.go/src/pkg/log/log_test.go:60: hello 23 world"
        log output should match
"^XXX[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]
[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9][0-9][0-9][0-9]
/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23 world$" is "XXX2009/11/11
11:41:08.716556 /home/hack/.go/src/pkg/log/log_test.go:58: hello 23 world"
FAIL
make[1]: *** [test] Error 1
make[1]: Leaving directory `/home/hack/.go/src/pkg/log'
make: *** [log.test] Error 2

What is your $GOOS?  $GOARCH?

linux/amd64


Which revision are you sync'ed to?  (hg log -l 1)

changeset:   3976:cf1b54c30bc1
tag:         tip
user:        Russ Cox <[email protected]>
date:        Tue Nov 10 20:11:16 2009 -0800
summary:     move release tag

Please provide any additional information below.
@gopherbot
Copy link
Contributor Author

Comment 1 by rufius:

I have reproduced this as well on Mac OS X (10.6.2). More information below...
*What steps will reproduce the problem?*
1. Checkout the source, set the environment vars properly.
2. Browse to src/ dir.
3. Run ./all.bash
*What is the expected output? What do you see instead?*
gopack grc _test/json.a _gotest_.6 
PASS
cd log && make test
gotest
rm -f _test/log.a _gotest_.6
6g -o _gotest_.6 log.go    log_test.go
rm -f _test/log.a
gopack grc _test/log.a _gotest_.6 
--- FAIL: log.TestAllLog
        log output should match "^/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23 world$" is
"/Users/zbrown/Code/go.hg/src/pkg/log/log_test.go:60: hello 23 world"
        log output should match "^/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23 world$" is
"/Users/zbrown/Code/go.hg/src/pkg/log/log_test.go:58: hello 23 world"
        log output should match "^XXX[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]
[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9][0-9][0-9][0-9]
/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23 world$" is "XXX2009/11/11 05:51:11.745999
/Users/zbrown/Code/go.hg/src/pkg/log/log_test.go:60: hello 23 world"
        log output should match "^XXX[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]
[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9][0-9][0-9][0-9]
/[A-Za-z0-9_/\\-]+\\.go:[0-9]+: hello 23 world$" is "XXX2009/11/11 05:51:11.746300
/Users/zbrown/Code/go.hg/src/pkg/log/log_test.go:58: hello 23 world"
FAIL
make[1]: *** [test] Error 1
make: *** [log.test] Error 2
*What is your $GOOS?  $GOARCH?*
darwin/amd64
*Which revision are you sync'ed to?  (hg log -l 1)*
changeset:   3977:a522a4541e0e
tag:         tip
user:        Russ Cox <[email protected]>
date:        Tue Nov 10 23:42:21 2009 -0800
summary:     lib9: rip out platform specific code that breaks on pclinuxos

@gopherbot
Copy link
Contributor Author

Comment 2 by [email protected]:

I'm also seeing the same thing on OS X 10.6.1.  The only thing I can think of that would
make my system 
different from a vanilla system is having /opt/local in the $PATH for macports.

@gopherbot
Copy link
Contributor Author

Comment 3 by [email protected]:

I believe that in my case it's because I have my $GOROOT set to a directory with a "."
in the name: go.hg.  I will 
change it for now but it would be nice if this were fixed.

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 4:

It is because of the dot in the directory name.

Owner changed to [email protected].

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 5:

This issue was closed by revision 8515a9f.

Status changed to Fixed.

Merged into issue #-.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
Fixes golang#27

Change-Id: I3f6c381aa375c0177f6b56e09d094c582691f309
mwhudson added a commit to mwhudson/go that referenced this issue May 22, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
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

2 participants