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

Test WasmThemis with multiple Node.js installations #510

Merged
merged 2 commits into from
Jul 26, 2019

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Jul 25, 2019

Currently we run WasmThemis test suite only against Node.js bundled with Emscripten. As of now this is some Node.js v8 version. However, we'd like to be sure that WasmThemis support all Node.js versions recommended for usage.

Move WasmThemis test suite invocation to the jsthemis workflow on CircleCI. There we have multiple Node.js versions installed and can verify WasmThemis against all of them.

Emscripten installation is needed only for WasmThemis so it can be moved to jsthemis workflow as well, it's no longer necessary in the x86_64 workflow. Note that Emscripten SDK requires Python so we add that to dependencies.

Themis Core test suite (make test) is run in Emscripten environment only. We don't exercise it in multiple Node.js environments where we test WasmThemis. Current build system will try rebuilding test binaries outside of Emscripten environment (using native C compiler), which will obviously fail.

Finally, tweak execution step names as we're testing not just JsThemis now.

  • Fix WasmThemis tests for Node.js v10+

Unfortunately, these cute ball references have to go. assert module in Node.js v10+ has some issues with throwing raw values. Throw and catch a proper Error instance instead.

Currently we run WasmThemis test suite against Node.js bundled with
Emscripten. As of now this is some Node.js v8 version. However, we'd
like to be sure that WasmThemis support all Node.js versions recommended
for usage.

Move WasmThemis test suite invocation to the "jsthemis" workflow on
CircleCI. There we have multiple Node.js versions installed and can
verify WasmThemis against them.

Emscripten is needed only for WasmThemis so it can be moved to
"jsthemis" workflow as well, it's no longer necessary in the "x86_64"
workflow. Note that Emscripten SDK requires Python so we add that to
dependencies.

Themis Core test suite ("make test") is run in Emscripten environment
only. We don't exercise it in multiple Node.js environments where we
test WasmThemis. Current build system will try rebuilding test binaries
outside of Emscripten environment (using native C compiler), which will
obviously fail.

Finally, tweak execution step names as we're testing not just JsThemis
now.
Unfortunately, these cute ball references have to go. "assert"
module in Node.js v10+ has some issues with throwing raw values.
Throw and catch a proper Error instance instead.
@ilammy ilammy added infrastructure Automated building and packaging W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages labels Jul 25, 2019
@ilammy ilammy requested review from vixentael and Lagovas July 25, 2019 12:28
@ilammy ilammy requested a review from shadinua as a code owner July 25, 2019 12:28
Copy link
Collaborator

@Lagovas Lagovas left a comment

Choose a reason for hiding this comment

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

lgtm

@ilammy ilammy merged commit 5bf45d2 into cossacklabs:master Jul 26, 2019
@ilammy ilammy deleted the wasm-themis-node.js-coverage branch July 26, 2019 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Automated building and packaging W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants