Skip to content
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

Cleaning loading of settings from .js file. #7499

Merged
merged 3 commits into from
Nov 28, 2018
Merged

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 13, 2018

  • Don't load settings from emcc_args in test runnter.
    We use set_setting/set_setting/serailize_settings to apply test
    settings.
  • Use exec with second argument to avoid accidental side effects
  • remove Settings.load method and merge it with init

Copy link
Contributor

@jgravelle-google jgravelle-google left a comment

Choose a reason for hiding this comment

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

If that passes CI, ship it

(I think the Settings.load(self.emcc_args) line was left in as a "maybe-I-missed-a-spot" redundancy, it should be fine to remove)

@@ -7953,7 +7953,6 @@ def setUp(self):
os.chdir(self.get_dir()) # Ensure the directory exists and go there

self.emcc_args = emcc_args[:]
Settings.load(self.emcc_args)
Copy link
Member

Choose a reason for hiding this comment

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

Without this, we won't notice pre-existing changes to self.emcc_args, I think? E.g. in asm2g we set ASSERTIONS on via emcc_args.

(to make sure I'm not missing something, I diffed the Settings serialization before and after this call, and it does look different)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe the ever since #6801, the contents of the Settings object in the test runner is not used. If the tests themselves use get_setting and set_setting and then only those settings get serialized onto the emcc command line. So anything you do the Settings object in the test process is not relevant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually you were right.. its little more subtle. get_settings() has the return the right thing. I update the test suites to be explicit about their settings.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, I think there might be even more here - -O1 and above will set ASSERTIONS=0. I think with the current code here, that would not be set?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK I think I ironed out all the issues. I think this should be good to land now.

@sbc100 sbc100 force-pushed the cleanup_settings_loading branch 3 times, most recently from eba8b27 to b3bd95f Compare November 19, 2018 23:43
- Don't load settings from emcc_args in test runnter.
  We use set_setting/set_setting/serailize_settings to apply test
  settings.
- Use exec with second argument to avoid accidental side effects
- remove Settings.load method and merge it with init
@sbc100 sbc100 merged commit fdd29c3 into incoming Nov 28, 2018
@sbc100 sbc100 deleted the cleanup_settings_loading branch November 28, 2018 22:01
sbc100 added a commit that referenced this pull request Apr 2, 2019
sbc100 added a commit that referenced this pull request Apr 2, 2019
sbc100 added a commit that referenced this pull request Apr 2, 2019
VirtualTim pushed a commit to VirtualTim/emscripten that referenced this pull request May 21, 2019
VirtualTim added a commit to VirtualTim/emscripten that referenced this pull request May 23, 2019
VirtualTim added a commit to VirtualTim/emscripten that referenced this pull request May 23, 2019
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