Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Runtime unit tests failing on master #65

Closed
ns-cweber opened this issue Jan 7, 2017 · 3 comments
Closed

Runtime unit tests failing on master #65

ns-cweber opened this issue Jan 7, 2017 · 3 comments

Comments

@ns-cweber
Copy link
Contributor

Is this expected? Are these tests not run on Travis for some reason?

Exception: foo
--- FAIL: TestNativeFuncName (0.00s)
        native_test.go:106: func1(<func(*T) github.com/google/grumpy/runtime.TestNativeFuncName at 0xc4204dd440>,) = 'runtime.TestNativeFuncName', want 'grumpy.TestNativeFuncName'
--- FAIL: TestNativeFuncStrRepr (0.00s)
        native_test.go:128: str(<func(*T) github.com/google/grumpy/runtime.TestNativeFuncStrRepr at 0xc4203f02d0>) = '<func(*T) github.com/google/grumpy/runtime.TestNativeFuncStrRepr at 0xc4203f02d0>', want <func\(\*T\) .*grumpy\.TestNativeFuncStrRepr at 0x[a-f0-9]+>
        native_test.go:135: repr(<func(*T) github.com/google/grumpy/runtime.TestNativeFuncStrRepr at 0xc4203f02d0>) = '<func(*T) github.com/google/grumpy/runtime.TestNativeFuncStrRepr at 0xc4203f02d0>', want <func\(\*T\) .*grumpy\.TestNativeFuncStrRepr at 0x[a-f0-9]+>
        native_test.go:128: str(<func() github.com/google/grumpy/runtime.TestNativeFuncStrRepr.func1 at 0xc4203f03f0>) = '<func() github.com/google/grumpy/runtime.TestNativeFuncStrRepr.func1 at 0xc4203f03f0>', want <func\(\) .*grumpy\.TestNativeFuncStrRepr\.\w+ at 0x[a-f0-9]+>
        native_test.go:135: repr(<func() github.com/google/grumpy/runtime.TestNativeFuncStrRepr.func1 at 0xc4203f03f0>) = '<func() github.com/google/grumpy/runtime.TestNativeFuncStrRepr.func1 at 0xc4203f03f0>', want <func\(\) .*grumpy\.TestNativeFuncStrRepr\.\w+ at 0x[a-f0-9]+>
        native_test.go:128: str(<func(*Frame, *Object) (*Str, *BaseException) github.com/google/grumpy/runtime.Repr at 0xc4203f0450>) = '<func(*Frame, *Object) (*Str, *BaseException) github.com/google/grumpy/runtime.Repr at 0xc4203f0450>', want <func\(\*Frame, \*Object\) .*grumpy\.Repr at 0x[a-f0-9]+>
        native_test.go:135: repr(<func(*Frame, *Object) (*Str, *BaseException) github.com/google/grumpy/runtime.Repr at 0xc4203f0450>) = '<func(*Frame, *Object) (*Str, *BaseException) github.com/google/grumpy/runtime.Repr at 0xc4203f0450>', want <func\(\*Frame, \*Object\) .*grumpy\.Repr at 0x[a-f0-9]+>
RuntimeError: foo
FAIL
FAIL    github.com/google/grumpy/runtime        1.149s
@trotterdylan
Copy link
Contributor

That's weird, it's passing for me:

$ git log -n 1                                                                                                                                                              ─
commit 47e0e02297d6a43f8e9cb062e041802f93e4b09b
Author: Jurriaan Bremer <jurriaanbremer@gmail.com>
Date:   Sat Jan 7 19:58:43 2017 +0100

    make strings with spaces easier to read (#64)
$ make build/runtime.pass
ok      grumpy  1.297s
runtime/grumpy PASS

And it looks like it's being run and passing on Travis: https://travis-ci.org/google/grumpy/builds/189841925#L252

@ns-cweber
Copy link
Contributor Author

I was running go test ./runtime; running make build/runtime.pass succeeds. I take it go test isn't an approved testing mechanism? I tried reading through the Makefile, but I'm not make-literate yet.

@trotterdylan
Copy link
Contributor

I debated the right way to set up the project and settled on using make rather than go build/test directly. The reason being that the standard libraries, tests, benchmarks, etc. require some setup to work properly. I settled on the build/ subdir being the GOPATH and runtime/*.go files are copied into build/src/grumpy.

That said it doesn't look like it'd be much work to get the runtime test suite working with go test, which would be convenient.

Either way, the README could help here by explaining the "official" way to run the test suite.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants