From 152a1aa610117baf9a712b17d2673ad73bd490e6 Mon Sep 17 00:00:00 2001 From: Francisco Souza Date: Wed, 7 Mar 2012 00:40:16 -0500 Subject: [PATCH] misc/cgo: re-enable testso Also enabled it for darwin. R=rsc CC=golang-dev https://golang.org/cl/5754063 --- misc/cgo/testso/Makefile | 22 ---------------------- misc/cgo/testso/cgoso_test.go | 7 +++++++ misc/cgo/testso/main.go | 11 ----------- misc/cgo/testso/test.bash | 9 --------- src/run.bash | 5 +---- 5 files changed, 8 insertions(+), 46 deletions(-) delete mode 100644 misc/cgo/testso/Makefile create mode 100644 misc/cgo/testso/cgoso_test.go delete mode 100644 misc/cgo/testso/main.go delete mode 100755 misc/cgo/testso/test.bash diff --git a/misc/cgo/testso/Makefile b/misc/cgo/testso/Makefile deleted file mode 100644 index e472cf2124..0000000000 --- a/misc/cgo/testso/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2011 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=cgosotest - -CGO_DEPS+=libcgoso.so -CGO_LDFLAGS+=-lcgoso -L. -CLEANFILES+=out libcgoso.so -CGOFILES=\ - cgoso.go\ - -include ../../../src/Make.pkg - -libcgoso.so: cgoso_c.c - gcc cgoso_c.c -fPIC -o $@ $(_CGO_CFLAGS_$(GOARCH)) $(_CGO_LDFLAGS_$(GOOS)) - -out: install main.go - $(GC) $(GCFLAGS) $(GCIMPORTS) main.go - $(LD) -o $@ main.$O diff --git a/misc/cgo/testso/cgoso_test.go b/misc/cgo/testso/cgoso_test.go new file mode 100644 index 0000000000..6eddb90de7 --- /dev/null +++ b/misc/cgo/testso/cgoso_test.go @@ -0,0 +1,7 @@ +package cgosotest + +import ( + "testing" +) + +func TestCgoSo(t *testing.T) { Test() } diff --git a/misc/cgo/testso/main.go b/misc/cgo/testso/main.go deleted file mode 100644 index 672ab262be..0000000000 --- a/misc/cgo/testso/main.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2011 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. - -package main - -import "cgosotest" - -func main() { - cgosotest.Test() -} diff --git a/misc/cgo/testso/test.bash b/misc/cgo/testso/test.bash deleted file mode 100755 index f275eb5723..0000000000 --- a/misc/cgo/testso/test.bash +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Copyright 2011 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. - -set -e -gomake out -LD_LIBRARY_PATH=. ./out -gomake clean diff --git a/src/run.bash b/src/run.bash index b5ffaa9974..c6f02e303a 100755 --- a/src/run.bash +++ b/src/run.bash @@ -57,13 +57,10 @@ BROKEN=true go test ) || exit $? -$BROKEN || [ "$CGO_ENABLED" != 1 ] || [ "$GOHOSTOS" == windows ] || -[ "$GOHOSTOS" == darwin ] || (xcd ../misc/cgo/testso -"$GOMAKE" clean -./test.bash +go test ) || exit $? (xcd ../doc/progs -- 2.50.0