summaryrefslogtreecommitdiff
path: root/misc/cgo/life
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-03-06 23:27:30 -0500
committerRuss Cox <rsc@golang.org>2012-03-06 23:27:30 -0500
commit934aed1ea316443d6786a972a8e1f5bfb5723212 (patch)
tree7482023078b10d495645ca573113efbd1675dec7 /misc/cgo/life
parent9c217e0c9a87b270fd72e580cd2c80ddf59b8498 (diff)
downloadgo-934aed1ea316443d6786a972a8e1f5bfb5723212.tar.gz
misc/cgo: re-enable some tests
The testso directory still needs to be enabled. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5731048
Diffstat (limited to 'misc/cgo/life')
-rw-r--r--misc/cgo/life/Makefile35
-rw-r--r--misc/cgo/life/main.go4
-rwxr-xr-xmisc/cgo/life/test.bash7
3 files changed, 8 insertions, 38 deletions
diff --git a/misc/cgo/life/Makefile b/misc/cgo/life/Makefile
deleted file mode 100644
index 1568a67f6..000000000
--- a/misc/cgo/life/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2010 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-include ../../../src/Make.inc
-
-TARG=life
-
-CGOFILES=\
- life.go\
-
-CGO_OFILES=\
- c-life.o\
-
-ifeq ($(GOOS),windows)
-ifeq ($(GOARCH),amd64)
-CGO_OFILES+=\
- lib64_libmingwex_a-wassert.o\
- lib64_libmingw32_a-mingw_helpers.o\
-
-lib64_libmingwex_a-wassert.o:
- ar -x /mingw/x86_64-w64-mingw32/lib/libmingwex.a lib64_libmingwex_a-wassert.o
-
-lib64_libmingw32_a-mingw_helpers.o:
- ar -x /mingw/x86_64-w64-mingw32/lib/libmingw32.a lib64_libmingw32_a-mingw_helpers.o
-endif
-endif
-
-CLEANFILES+=life
-
-include ../../../src/Make.pkg
-
-life: install main.go
- $(GC) $(GCFLAGS) $(GCIMPORTS) main.go
- $(LD) -o $@ main.$O
diff --git a/misc/cgo/life/main.go b/misc/cgo/life/main.go
index 9cfed434b..47ae0e18c 100644
--- a/misc/cgo/life/main.go
+++ b/misc/cgo/life/main.go
@@ -2,14 +2,16 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build ignore
+
// Run the game of life in C using Go for parallelization.
package main
import (
+ "."
"flag"
"fmt"
- "life"
)
const MAXDIM = 100
diff --git a/misc/cgo/life/test.bash b/misc/cgo/life/test.bash
index 5c5fba1a9..bb483522c 100755
--- a/misc/cgo/life/test.bash
+++ b/misc/cgo/life/test.bash
@@ -4,8 +4,11 @@
# license that can be found in the LICENSE file.
set -e
-gomake life
+go build -o life main.go
+
echo '*' life >run.out
./life >>run.out
diff run.out golden.out
-gomake clean
+
+rm -f life
+