Skip Go test when not ran using Bazel
@@ -83,6 +83,11 @@ func runOracle(t *testing.T, ms *cpb.MarkedSource) *oracleResults {
// renderer. Each test parses the C++ doc utility output and compares the
// results with the native Go implementations.
func TestInteropt(t *testing.T) {
+ if os.Getenv("TEST_WORKSPACE") != "io_kythe" {
+ // Skip test since it requires the C++ oracle program to be put inside this
+ // test's Bazel RUNFILES_DIR.
+ t.Skip("Skipping test outside of Bazel build")
+ }
tests := []*cpb.MarkedSource{{
Kind: cpb.MarkedSource_IDENTIFIER,
PreText: "hello",
