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: allow disabling crypto tests #31268

Closed

Conversation

@codebytere
Copy link
Member

codebytere commented Jan 9, 2020

This PR adds a new environment variable to the test suit: NODE_SKIP_CRYPTO. Right now whether or not crypto tests can be run is solely determined by whether or not openssl is defined on the process object, which is true for Electron.js since many consumers use it to determine the presence of crypto even though we use BoringSSL and thus experience incompatibilities.

This new option would allow us to more effectively run our own smoke tests of Node.js' test suite without needing to manually disable every crypto test individually.

cc @tniessen

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@codebytere codebytere requested a review from tniessen Jan 9, 2020
@Trott

This comment has been minimized.

Copy link
Member

Trott commented Jan 9, 2020

With this change, using --no-crypto doesn't cause any tests to be skipped as far as I can tell. Am I doing something wrong? I'm trying things like tools/test.py --no-crypto -p tap async-hooks and seeing if the crypto tests in the async-hooks directory are skipped.

@codebytere codebytere force-pushed the codebytere:allow-disabling-crypto-tests branch from 325cfa8 to 8835e5f Jan 9, 2020
@codebytere

This comment has been minimized.

Copy link
Member Author

codebytere commented Jan 9, 2020

@Trott It turns out that individual tests are validated in js with the same mechanism, so i've moved this logic into common and added documentation for a new simple env var, NODE_SKIP_CRYPTO. I'm happy to name it something else if you all would prefer :)

cc @addaleax since i've moved this mechanism, this probably needs a re-review

@codebytere codebytere force-pushed the codebytere:allow-disabling-crypto-tests branch from 8835e5f to ee3d29b Jan 9, 2020
@codebytere codebytere removed the tools label Jan 9, 2020
@codebytere codebytere requested review from addaleax and devnexen Jan 9, 2020
@codebytere codebytere force-pushed the codebytere:allow-disabling-crypto-tests branch from ee3d29b to c8cf0fd Jan 9, 2020
Copy link
Member

addaleax left a comment

Still LGTM :)

It’s a bit curious that the former approach didn’t work… Was that Python variable ignored altogether? Should we remove it?

@codebytere codebytere changed the title tools: allow disabling crypto tests test: allow disabling crypto tests Jan 9, 2020
@codebytere codebytere force-pushed the codebytere:allow-disabling-crypto-tests branch from c8cf0fd to 55d796d Jan 9, 2020
@BridgeAR

This comment has been minimized.

Copy link
Member

BridgeAR commented Jan 9, 2020

Marking as author ready without CI, since it should not have any effect.

@codebytere

This comment has been minimized.

Copy link
Member Author

codebytere commented Jan 9, 2020

@addaleax it turned out that it was used but that it's purpose wasn't clear at first glance; it's used here.

@Trott
Trott approved these changes Jan 10, 2020
@richardlau

This comment has been minimized.

Copy link
Member

richardlau commented Jan 10, 2020

Marking as author ready without CI, since it should not have any effect.

I'd still suggest running CI to make sure, for example, ubuntu1804_sharedlibs_withoutssl_x64 still works.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

Copy link

nodejs-github-bot commented Jan 10, 2020

Copy link
Member

mhdawson left a comment

LGTM

Trott added a commit to Trott/io.js that referenced this pull request Jan 11, 2020
PR-URL: nodejs#31268
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@Trott

This comment has been minimized.

Copy link
Member

Trott commented Jan 11, 2020

Landed in be055d1

@Trott Trott closed this Jan 11, 2020
@codebytere codebytere deleted the codebytere:allow-disabling-crypto-tests branch Jan 11, 2020
MylesBorins added a commit that referenced this pull request Jan 16, 2020
PR-URL: #31268
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@codebytere codebytere mentioned this pull request Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.