Skip to content

Fix #4143: Ignore lines "Picked up _JAVA_OPTIONS" in tests #4239

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

Merged
merged 2 commits into from
Apr 4, 2018

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

@allanrenucci
Copy link
Contributor

allanrenucci commented Apr 3, 2018

I propose an alternative solution: discard any output generated before the program start running.

The way I would do this:

  1. Add a String MessageStart to ChildJVMMain
  2. Prints MessageStart before running the main at https://github.com/lampepfl/dotty/blob/1fdb94bfaac72fc7ef91bff058a902e2ea4b3f0f/compiler/test/dotty/tools/vulpix/ChildJVMMain.java#L26
  3. Discard all lines before MessageStart at https://github.com/lampepfl/dotty/blob/1fdb94bfaac72fc7ef91bff058a902e2ea4b3f0f/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala#L121

If JVM logging is done within the call to meth.invoke(null, args), this will not work though

@nicolasstucki
Copy link
Contributor Author

That sounds a lot more complex than required for this particular exceptional behavior.

@allanrenucci
Copy link
Contributor

allanrenucci commented Apr 3, 2018

True, it is a bit more complex. But as you said, the current solution only fixes a particular exceptional behavior. What I propose should discard any logging done by the VM before the program execution. We don't want to add more special case fixes if it happens that the VM produces more logs in some other exceptional cases

@nicolasstucki
Copy link
Contributor Author

Changes done

@nicolasstucki nicolasstucki merged commit 4c8a2bd into scala:master Apr 4, 2018
@allanrenucci allanrenucci deleted the fix-#4143 branch April 4, 2018 11:07
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.

3 participants