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

Run standalone wasms in other.test_wasm_target_and_STANDALONE_WASM #9524

Merged
merged 1 commit into from
Sep 27, 2019

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 27, 2019

Add testing for emcc -o X.wasm, which turns on STANDALONE_WASM.

(We do test standalone mode in the core test suite now, but those always emit js+wasm.)

@kripken kripken requested a review from sbc100 September 27, 2019 17:01
@@ -8325,6 +8325,11 @@ def test_wasm_target_and_STANDALONE_WASM(self):
# verify the wasm runs with the JS
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to move this test to test_core.py.. given that its running the test in all the different opt levels?

Copy link
Member Author

@kripken kripken Sep 27, 2019

Choose a reason for hiding this comment

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

I think it's an awkward fit for core atm since core handles building for you, including picking what file to emit (either src.cpp.o.js or src.c.o.js). Changing that might be a large refactoring.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it? Can you call self build() or even run_process(EMCC... just fine from core? The only think you need to remember to do is include self.get_emcc_args() I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, you can call the internals instead of using the main do_run* functions, I guess. It's less elegant though as the code in other for such things is cleaner, where there are no assumptions about a "standard" model.

But yeah, maybe ignoring all the standard model stuff and just calling self.get_emcc_args() would work ok. I don't think we do that in any tests yet though, except maybe one or two.

@kripken kripken merged commit fcde283 into incoming Sep 27, 2019
@kripken kripken deleted the sttest2 branch September 27, 2019 17:43
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
…mscripten-core#9524)

This adds testing for emcc -o X.wasm, which turns on STANDALONE_WASM.
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