Comments (7)
hey there - I've never used xgo
(first time I'm hearing about it actually!) ginkgo
calls go
to compile your tests and so xgo exec ginkgo ./...
will end up just calling go
under the hood.
But ginkgo
does allow you to pass in a precompiled binary as a test suite. So you could try:
cd ./path/to/package
xgo test -c
ginkgo package.test
to see if that works. If it does we'll need to teach the Ginkgo cli how to choose which go
to use:
https://github.com/onsi/ginkgo/blob/master/ginkgo/internal/compile.go#L44
I could imagine a hidden GINKGO_GOBINARY="xgo" environment variable that reconfigures that line.
from ginkgo.
But ginkgo does allow you to pass in a precompiled binary as a test suite.
Nope, that doesn't work either.
from ginkgo.
odd. what happens if you go to your path_suite
and run xgo test
(don't even use ginkgo
- jus use the usual test runner. you'll lose some of the cli features but the tests will run fine)
from ginkgo.
Oh, pardon my confusion, I messed up with xgo setup in my terminal (xgo requires that its binary is directly available in the PATH
without any intermediate shims from asdf or similar version managers, and I lost this part when reopened my terminal).
Both xgo test -c && ginkgo package.test
and xgo test
are working, sorry again.
from ginkgo.
Ok sounds good. Sounds like the last thing we need to do is allow you to override which Go binary ginkgo uses. Would you be up for submitting a PR?
We'd want to add some code to:
https://github.com/onsi/ginkgo/blob/master/ginkgo/internal/compile.go#L44
to look for a GINKGO_GOBINARY
environment variable and use that instead of "go"
if it is defined.
We'd then need to update the docs:
https://github.com/onsi/ginkgo/blob/master/docs/index.md?plain=1#L5298
to mention the environment variable.
WDYT?
from ginkgo.
Ok sounds good. Sounds like the last thing we need to do is allow you to override which Go binary ginkgo uses. Would you be up for submitting a PR?
We'd want to add some code to: https://github.com/onsi/ginkgo/blob/master/ginkgo/internal/compile.go#L44
to look for a
GINKGO_GOBINARY
environment variable and use that instead of"go"
if it is defined.We'd then need to update the docs: https://github.com/onsi/ginkgo/blob/master/docs/index.md?plain=1#L5298
to mention the environment variable.
WDYT?
Maybe able to specify the whole building command is more feasible? Like GINKGO_BUILDTEST_COMMAND?
Or something like go's -toolexec flag, which passes the whole command and args to the target binary.
from ginkgo.
hey sorry for the delay. my understanding of toolexec
is that it chains commands before running the canonical go command, not for changing the go command itself. i also don't want folks to be adding their own flags as that could interfere with Ginkgo's build settings. I do think the simple/easy approach here is to simply override the one go
invocation that i describe above.
from ginkgo.
Related Issues (20)
- Junit report should have system-out HOT 1
- could not log in Eventually with fmt.Fprintf(GinkgoWriter) HOT 3
- Question: One Suite to rule them all HOT 2
- when using concurrency, a test case failure in a background go routine does not show which test case failed HOT 3
- Add cli flag to fail when no tests were run HOT 1
- `ginko -p 2` does not complain about having an extra argument
- when watching, add ability to ignore hidden files (including tests!) HOT 5
- Report Portal and Gingko integration plugin
- Implement generic transformer decorator: ginkgo.ContextTransformer HOT 3
- why can't generate html report? HOT 1
- CLI: add long aliases for short options
- --focus-file should work with failing test location HOT 6
- panic when passing context AND nil in a table Entry HOT 2
- Add support for Label Sets
- support outputting the time spent on each spec HOT 1
- [feature request] Test execution and reporting controller HOT 1
- [Documentation] Fix the wrong variable call in Section "Reporting Nodes - ReportBeforeSuite and ReportAfterSuite"
- It function use only check last test case param HOT 1
- Run tests in individual process HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ginkgo.