Skip to content

Commit 9d91a37

Browse files
committed
Add testlink package to provide library search path for tests
1 parent 02d32f5 commit 9d91a37

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

go/cpossum/c-possum.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package possumC
66
// Windows system to get to the point I can actually build this, so I don't know how it works there.
77
// Also cgo directives seem to use the old build constraint syntax. Why the fuck isn't this stuff
88
// documented?
9-
#cgo !windows,!darwin LDFLAGS: -L${SRCDIR}/../../target/debug -l:libpossum.a -lm
10-
#cgo darwin windows LDFLAGS: -L${SRCDIR}/../../target/debug -lpossum
9+
#cgo !windows,!darwin LDFLAGS: -l:libpossum.a -lm
10+
#cgo darwin windows LDFLAGS: -lpossum
1111
#include "possum.h"
1212
*/
1313
import "C"

go/cpossum/c-possum_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package possumC
22

33
import (
4-
qt "github.com/go-quicktest/qt"
54
"testing"
5+
6+
"github.com/go-quicktest/qt"
7+
8+
_ "github.com/anacrolix/possum/go/testlink"
69
)
710

811
func TestNoSuchKey(t *testing.T) {

go/go-possum_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package possum
22

33
import (
44
"testing"
5+
6+
_ "github.com/anacrolix/possum/go/testlink"
57
)
68

79
func TestOpenClose(t *testing.T) {

go/testlink/testlink.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package testlink
2+
3+
//#cgo LDFLAGS: -L${SRCDIR}/../../target/debug
4+
import "C"

0 commit comments

Comments
 (0)