src: add race.bash
Add race.bash so anyone with suitable hardware can run a race detector build. race.bash can be called from the dashboard builder by passing -cmd="race.bash".
Original source for race.bash is here, http://code.google.com/p/go-wiki/wiki/DashboardBuilders
TODO: add race.bat for windows/amd64
On 2013/01/23 00:09:08, dfc wrote: > Hello mailto:dvyukov@google.com (cc: mailto:fullung@gmail.com, mailto:golang-dev@googlegroups.com), > > I'd like ...
11 years, 2 months ago
(2013-01-23 07:04:31 UTC)
#2
On 2013/01/23 00:09:08, dfc wrote:
> Hello mailto:dvyukov@google.com (cc: mailto:fullung@gmail.com,
mailto:golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go
LGTM
Yup, that's what I am currently using.
thanks!
race.bat is in https://codereview.appspot.com/7133064 https://codereview.appspot.com/7179052/diff/6001/src/race.bash File src/race.bash (right): https://codereview.appspot.com/7179052/diff/6001/src/race.bash#newcode5 src/race.bash:5: perhaps add some comments here ...
11 years, 2 months ago
(2013-01-23 09:58:40 UTC)
#3
> https://codereview.appspot.com/7179052/diff/6001/src/race.bash#newcode8 > src/race.bash:8: if [ $(uname -m) != "x86_64" ]; then > i believe ...
11 years, 2 months ago
(2013-01-23 10:01:20 UTC)
#4
> https://codereview.appspot.com/7179052/diff/6001/src/race.bash#newcode8
> src/race.bash:8: if [ $(uname -m) != "x86_64" ]; then
> i believe $(uname -m) on Darwin won't ever return x86_64.
> you need to consult whether `sysctl machdep.cpu.extfeatures`
> contains "EM64T".
Sure it does,
Darwin odessa.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23
16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
odessa:~ dfc$ uname -m
x86_64
On Wed, Jan 23, 2013 at 6:01 PM, Dave Cheney <dave@cheney.net> wrote: > > https://codereview.appspot.com/7179052/diff/6001/src/race.bash#newcode8 ...
11 years, 2 months ago
(2013-01-23 10:04:35 UTC)
#5
On Wed, Jan 23, 2013 at 6:01 PM, Dave Cheney <dave@cheney.net> wrote:
> > https://codereview.appspot.com/7179052/diff/6001/src/race.bash#newcode8
> > src/race.bash:8: if [ $(uname -m) != "x86_64" ]; then
> > i believe $(uname -m) on Darwin won't ever return x86_64.
> > you need to consult whether `sysctl machdep.cpu.extfeatures`
> > contains "EM64T".
>
> Sure it does,
>
> Darwin odessa.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23
> 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
> odessa:~ dfc$ uname -m
> x86_64
>
But it doesn't do that in older version of Mac OS X (for example, 10.6).
That's why cmd/dist has this code block:
#if defined(__APPLE__)
gohostos = "darwin";
// Even on 64-bit platform, darwin uname -m prints i386.
run(&b, nil, 0, "sysctl", "machdep.cpu.extfeatures", nil);
if(contains(bstr(&b), "EM64T"))
gohostarch = "amd64";
Hello dvyukov@google.com, minux.ma@gmail.com (cc: fullung@gmail.com, golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 2 months ago
(2013-01-23 10:54:48 UTC)
#6
https://codereview.appspot.com/7179052/diff/18001/src/race.bash File src/race.bash (right): https://codereview.appspot.com/7179052/diff/18001/src/race.bash#newcode26 src/race.bash:26: echo 'race detector is only supported on linux/amd64 and ...
11 years, 2 months ago
(2013-01-23 11:12:14 UTC)
#7
Please take another look. As an experiment I tried to use the dist tool to ...
11 years, 2 months ago
(2013-01-24 01:39:42 UTC)
#8
Please take another look.
As an experiment I tried to use the dist tool to solve the problem of
determining the platform, but ran into a chicken and egg problem in that
./make.bash --dist-tool
will move the dist tool to $GOTOOLDIR, however to discover $GOTOOLDIR, you need
to run eval $(dist env), which means you need to know $GOOS and $GOARCH.
This could probably be solved with a small change to make.bash, which I may do
in a followup CL.
https://codereview.appspot.com/7179052/diff/18001/src/race.bash
File src/race.bash (right):
https://codereview.appspot.com/7179052/diff/18001/src/race.bash#newcode26
src/race.bash:26: echo 'race detector is only supported on linux/amd64 and
darwin/amd64' 1>&2
On 2013/01/23 11:12:14, minux wrote:
> this very string is replicated three times... hmm..
Done.
On Thursday, January 24, 2013, wrote: > Please take another look. > > As an ...
11 years, 2 months ago
(2013-01-24 03:04:36 UTC)
#9
On Thursday, January 24, 2013, wrote:
> Please take another look.
>
> As an experiment I tried to use the dist tool to solve the problem of
> determining the platform, but ran into a chicken and egg problem in that
>
> ./make.bash --dist-tool
>
> will move the dist tool to $GOTOOLDIR, however to discover $GOTOOLDIR,
> you need to run eval $(dist env), which means you need to know $GOOS and
> $GOARCH.
>
> This could probably be solved with a small change to make.bash, which I
> may do in a followup CL.
>
two possible solutions without changes to make.bash:
1. ./make.bash --dist-tool /path/to/where/you/want/dist/to/live
2. . ./make.bash --dist-tool
and then you can use $GOHOSTARCH directly.
> two possible solutions without changes to make.bash: > 1. ./make.bash --dist-tool /path/to/where/you/want/dist/to/live > 2. ...
11 years, 2 months ago
(2013-01-24 08:14:00 UTC)
#10
> two possible solutions without changes to make.bash:
> 1. ./make.bash --dist-tool /path/to/where/you/want/dist/to/live
> 2. . ./make.bash --dist-tool
> and then you can use $GOHOSTARCH directly.
I've had a little play with both those options, #2 does not work because
sourcing a script that calls exit 0 will exit the source'ee, #1 has more
potential but I think what we have right now is sufficient. I'm happy to
continue to work on it in future CLs.
Issue 7179052: code review 7179052: src: add race.bash
(Closed)
Created 11 years, 2 months ago by dfc
Modified 11 years, 2 months ago
Reviewers:
Base URL:
Comments: 5