-
Notifications
You must be signed in to change notification settings - Fork 23
Add N-API compliance tests #116
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
Open
matthargett
wants to merge
42
commits into
BabylonJS:main
Choose a base branch
from
rebeckerspecialties:napi-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
e72477c
JavaScriptCore wrapper previously passed nullptr to JSObjectCallAsFun…
matthargett b7551a7
Add the node-lite test suite Vlad added into hermes-windows. The JSC …
matthargett 230134e
Android tests now pass. StdoutLogger was holding on to destroyed mute…
matthargett 8c421ae
Run the macOS NodeApiTests under sanitizers, which found another bug …
matthargett c43e50d
Fix build errors. This deduplicates struct definitions that were inli…
matthargett a1f422d
always build the napi tests
matthargett 79b9c4e
try and get address sanitizer and thread sanitizer to run on Android,…
matthargett 45ca953
Add N-API version/conformance roadmap (folds in engine-compat baseline)
matthargett 94c3795
Restore NodeApi tests build on current macOS toolchain
matthargett cdb2cde
Restore Android NodeApi test build (compiles/links/installs/runs on e…
matthargett 3c12ac8
Fix Android NodeApi harness JNI crash; wire up SetNodeApiTestEnvironment
matthargett c910c8a
Android: make the NodeApi conformance tests actually execute on-device
matthargett 02f6ffa
Android: enter the V8 context in jsr_open_napi_env_scope (fix napi_cr…
matthargett 22128c4
Android/in-process node_lite: let ExitOnException propagate the fatal…
matthargett 623909a
Android/in-process: make node_lite teardown destructors exception-safe
matthargett 18ea297
Android/in-process: guard the fatal handler against throwing while un…
matthargett 3cb88ad
Android/in-process: drop noexcept from throwing error-exit functions …
matthargett bd961f8
Android: skip in-process js-native-api addon tests pending shared-lib…
matthargett 410fe78
docs(roadmap): document Android in-process addon-load constraint + sh…
matthargett 813f169
Android: statically link conformance addons into the test binary (run…
matthargett 97dd278
Android tests: pump native stdout/stderr to logcat
matthargett 9329c83
docs(roadmap): Android v5 js-native-api now green via static linking …
matthargett 719da1d
Android: drop the now-dead dynamic-.node build machinery (superseded …
matthargett 97a9682
Android: remove vestigial V8Platform scaffolding from the env holder
matthargett 760d8da
docs(roadmap): record node-api-cts FetchContent evaluation (task 6) —…
matthargett 1f25d24
Android: dlopen conformance addons as dynamic .node backed by a share…
matthargett 9e181dd
docs(roadmap): Android uses dynamic .node + shared libnapi.so (aligns…
matthargett fca9ff0
Android tests: use AndroidExtensions StdoutLogger for stdout->logcat
matthargett 0fff7fc
docs(roadmap): stdout->logcat is via AndroidExtensions StdoutLogger, …
matthargett 2801353
Sync napi shared-lib change with PR #183 (gate behind JSR_NAPI_SHARED…
matthargett ff1d595
Tests: enable the v5-clean reference double-free conformance test
matthargett ca49471
docs(roadmap): reference-test staging + GC-safety review (re hermes-w…
matthargett ee5edfa
Node-API: address #116 review (JSC call dispatch, status type, Window…
matthargett 2dd8022
Keep JSI's napi.h self-contained (restores upstream's inlined type copy)
matthargett ebf1000
Tests/NodeApi: add missing <cstdint> in child_process.h (fixes Linux …
matthargett 16d1442
Tests/node_lite: select the napi engine by compile-define, not platform
matthargett 39f826e
Tests/NodeApi: link napi into addons on Windows/UWP so napi_* resolve…
matthargett de6ae6c
Tests: don't build the C-API conformance harness for the JSI backend
matthargett 8bfbc40
Don't hard-fail the Linux JSC library probe (breaks the Hermes host b…
matthargett 765643f
Tests/Android: build the on-device Node-API harness only for validate…
matthargett a101e3b
Don't default napi to a shared library for the Hermes engine on Android
matthargett 9de995b
Tests/NodeApi: drain the child's pipes concurrently in SpawnSync inst…
matthargett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,12 @@ | ||
| add_subdirectory(UnitTests) | ||
|
|
||
| # The Node-API conformance harness (node_lite + the js-native-api addons) is written against the C | ||
| # napi_* API. The JSI backend (Core/Node-API-JSI) implements only the C++ `Napi::` wrapper over jsi and | ||
| # exports no C napi_* symbols, and its napi.h carries its own copy of the napi types -- which collides | ||
| # with the shared <napi/js_native_api_types.h> the harness includes (C2365 redefinition). Skip the | ||
| # harness for JSI rather than trying to reconcile the two type sources. | ||
| if(NOT NAPI_JAVASCRIPT_ENGINE STREQUAL "JSI") | ||
| add_subdirectory(NodeApi) | ||
| endif() | ||
|
|
||
| npm(install --silent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| --- | ||
| Language: Cpp | ||
| # BasedOnStyle: Google | ||
| AccessModifierOffset: -1 | ||
| AlignAfterOpenBracket: Align | ||
| AlignConsecutiveAssignments: false | ||
| AlignConsecutiveDeclarations: false | ||
| AlignEscapedNewlines: Right | ||
| AlignOperands: true | ||
| AlignTrailingComments: true | ||
| AllowAllParametersOfDeclarationOnNextLine: true | ||
| AllowShortBlocksOnASingleLine: false | ||
| AllowShortCaseLabelsOnASingleLine: false | ||
| AllowShortFunctionsOnASingleLine: Inline | ||
| AllowShortIfStatementsOnASingleLine: true | ||
| AllowShortLoopsOnASingleLine: true | ||
| AlwaysBreakAfterDefinitionReturnType: None | ||
| AlwaysBreakAfterReturnType: None | ||
| AlwaysBreakBeforeMultilineStrings: false | ||
| AlwaysBreakTemplateDeclarations: true | ||
| BinPackArguments: false | ||
| BinPackParameters: false | ||
| BraceWrapping: | ||
| AfterClass: false | ||
| AfterControlStatement: false | ||
| AfterEnum: false | ||
| AfterFunction: false | ||
| AfterNamespace: false | ||
| AfterObjCDeclaration: false | ||
| AfterStruct: false | ||
| AfterUnion: false | ||
| AfterExternBlock: false | ||
| BeforeCatch: false | ||
| BeforeElse: false | ||
| IndentBraces: false | ||
| SplitEmptyFunction: true | ||
| SplitEmptyRecord: true | ||
| SplitEmptyNamespace: true | ||
| BreakBeforeBinaryOperators: None | ||
| BreakBeforeBraces: Attach | ||
| BreakBeforeInheritanceComma: false | ||
| BreakBeforeTernaryOperators: true | ||
| BreakConstructorInitializersBeforeComma: false | ||
| BreakConstructorInitializers: BeforeColon | ||
| BreakAfterJavaFieldAnnotations: false | ||
| BreakStringLiterals: true | ||
| ColumnLimit: 80 | ||
| CommentPragmas: '^ IWYU pragma:' | ||
| CompactNamespaces: false | ||
| ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
| ConstructorInitializerIndentWidth: 4 | ||
| ContinuationIndentWidth: 4 | ||
| Cpp11BracedListStyle: true | ||
| DerivePointerAlignment: false | ||
| DisableFormat: false | ||
| ExperimentalAutoDetectBinPacking: false | ||
| FixNamespaceComments: true | ||
| ForEachMacros: | ||
| - foreach | ||
| - Q_FOREACH | ||
| - BOOST_FOREACH | ||
| IncludeBlocks: Preserve | ||
| IncludeCategories: | ||
| - Regex: '^<ext/.*\.h>' | ||
| Priority: 2 | ||
| - Regex: '^<.*\.h>' | ||
| Priority: 1 | ||
| - Regex: '^<.*' | ||
| Priority: 2 | ||
| - Regex: '.*' | ||
| Priority: 3 | ||
| IncludeIsMainRegex: '([-_](test|unittest))?$' | ||
| IndentCaseLabels: true | ||
| IndentPPDirectives: None | ||
| IndentWidth: 2 | ||
| IndentWrappedFunctionNames: false | ||
| JavaScriptQuotes: Leave | ||
| JavaScriptWrapImports: true | ||
| KeepEmptyLinesAtTheStartOfBlocks: false | ||
| MacroBlockBegin: '' | ||
| MacroBlockEnd: '' | ||
| MaxEmptyLinesToKeep: 1 | ||
| NamespaceIndentation: None | ||
| ObjCBlockIndentWidth: 2 | ||
| ObjCSpaceAfterProperty: false | ||
| ObjCSpaceBeforeProtocolList: false | ||
| PenaltyBreakAssignment: 2 | ||
| PenaltyBreakBeforeFirstCallParameter: 1 | ||
| PenaltyBreakComment: 300 | ||
| PenaltyBreakFirstLessLess: 120 | ||
| PenaltyBreakString: 1000 | ||
| PenaltyExcessCharacter: 1000000 | ||
| PenaltyReturnTypeOnItsOwnLine: 200 | ||
| PointerAlignment: Left | ||
| ReflowComments: true | ||
| SortIncludes: true | ||
| SortUsingDeclarations: true | ||
| SpaceAfterCStyleCast: false | ||
| SpaceAfterTemplateKeyword: true | ||
| SpaceBeforeAssignmentOperators: true | ||
| SpaceBeforeParens: ControlStatements | ||
| SpaceInEmptyParentheses: false | ||
| SpacesBeforeTrailingComments: 2 | ||
| SpacesInAngles: false | ||
| SpacesInContainerLiterals: true | ||
| SpacesInCStyleCastParentheses: false | ||
| SpacesInParentheses: false | ||
| SpacesInSquareBrackets: false | ||
| Standard: Auto | ||
| TabWidth: 8 | ||
| UseTab: Never |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.