Skip to content

WIP: Install and use source-map-support module for tests in Circle CI. #449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

dmitshur
Copy link
Member

@dmitshur dmitshur commented Apr 30, 2016

DO NOT MERGE. There is an outstanding task to be resolved before this is ready.

@neelance What do you think about requiring source-map-support for tests? Right now they're disabled in Circle CI. Enabling it fixes one failing test from Go compiler test suite (fixedbugs/issue5856.go).

This PR:

  • Updates to Go 1.6.2. Edit: This has been cherry-picked as 5fbc215.
  • Updates to Node 6.0. Edit: Factored out into circle: Update to Node 6.2.2. #484.
  • Installs and uses source-map-support module in Circle CI.
  • Contains other minor miscellaneous improvements (see commits fdad0ef and fcc469a). Edit: These have been cherry-picked as e28f4b4 and 028c56b.

"testing"
)

// Go repository basic compiler tests, and regression tests for fixed compiler bugs.
func TestGoRepositoryCompilerTests(t *testing.T) {
if b, _ := strconv.ParseBool(os.Getenv("SOURCE_MAP_SUPPORT")); os.Getenv("SOURCE_MAP_SUPPORT") != "" && !b {
t.Fatal("Source maps disabled, but required for this test. Use SOURCE_MAP_SUPPORT=true or unset it completely.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.Skip?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered skip, but was worried it might be bad to simply skip such an important test so easily.

Hmm...

Maybe skip if short flag is given?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe skip if short flag is given?

I don't think that would be good, better be consistent.

I think I've seen Skip in the core packages for this situation. Reasoning might go like this:
Fail -> Implementation broken
Skip -> Environment broken/insufficient

Copy link
Member Author

@dmitshur dmitshur May 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change to skip, sure, I just don't want us to get into a situation where those tests are always skipped and we don't notice/realize.

Copy link
Member Author

@dmitshur dmitshur May 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked in https://github.com/golang/go/blob/master/src/cmd/go/go_test.go to see when skip is used.

It's used to skip individual specific tests when environment is insufficient. For example, TestCgoShowsFullPathNames is skipped when cgo is not available.

The difference is that TestGoRepositoryCompilerTests runs many, many tests. Only one of those actually depends on source-map-support to be enabled. Skipping all of TestGoRepositoryCompilerTests just because source-map-support is equivalen to skipping all of cmd/go tests if cgo is not enabled. I don't think it's acceptable.

Let's find a better solution...

Copy link
Member Author

@dmitshur dmitshur May 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR description, I asked:

What do you think about requiring source-map-support for tests? Right now they're disabled in Circle CI. Enabling it fixes one failing test from Go compiler test suite (fixedbugs/issue5856.go).

Maybe it's not worth it to require source-map-support to be mandatory for tests?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the most important aspect is that the CI system tests properly. Local testing has a much lower priority and I would be okay with skipping tests in that situation. If people download the source code, run the tests and they fail, then they will probably think that the tests are broken.

Copy link
Member Author

@dmitshur dmitshur May 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll find an acceptable solution and update this PR; let's not merge it until then.

I've already cherry-picked the acceptable individual commits out from here.

@neelance
Copy link
Member

neelance commented May 1, 2016

LGTM, one comment.

@dmitshur dmitshur changed the title Update Go, Node, require source-map-support for tests. WIP: Update Go, Node, require source-map-support for tests. May 30, 2016
@dmitshur
Copy link
Member Author

dmitshur commented Jun 27, 2016

I've edited the PR description to reflect which parts of this PR have already been cherry-picked into master. What's left are updates to Node 6.0 and installing/using source-map-support module in Circle CI.

I will get to resolving the remaining task needed to merge this sometime, but it's lower priority than #388.

dmitshur added 4 commits June 26, 2016 18:43
This fixes one known failing test from Go compiler test suite.
It's needed so that the source-map-support module that is installed
globally will be found by Node 6.0.
I've sshed into the circle machine, and the actual path is something
like:

/home/ubuntu/nvm/v0.10.33/lib/node_modules

Setting it explicitly seems very fragile, so I'll try this way... Maybe
there's a better way?
@dmitshur
Copy link
Member Author

I've factored out the Node update (and updated it from 6.0.0 to latest 6.2.2 version) into #484.

@neelance
Copy link
Member

@shurcooL What's up with this PR?

@dmitshur dmitshur changed the title WIP: Update Go, Node, require source-map-support for tests. WIP: Install and use source-map-support module for tests in Circle CI. Feb 21, 2017
@dmitshur
Copy link
Member Author

The status continues to be the same as in Jun 26, 2016. Except now it's higher priority than #388. :)

I still need to think about the best thing to do about source-map-support module and tests. I'll do that, and update the PR.

@dmitshur
Copy link
Member Author

dmitshur commented Sep 6, 2017

I'm going to close this. I still haven't found a way to get this PR to a point where I'm happy with it to be merged. If I ever do that, I'll reopen.

@dmitshur dmitshur closed this Sep 6, 2017
@dmitshur dmitshur deleted the updates branch September 6, 2017 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants