Uh oh!
There was an error while loading. Please reload this page.
- 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
41
commits into
BabylonJS:mainChoose 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.
Uh oh!
There was an error while loading. Please reload this page.
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
25dcff7
JavaScriptCore wrapper previously passed nullptr to JSObjectCallAsFun…
matthargett efcb060
Add the node-lite test suite Vlad added into hermes-windows. The JSC …
matthargett 8dbd11e
Android tests now pass. StdoutLogger was holding on to destroyed mute…
matthargett dfaccbe
Run the macOS NodeApiTests under sanitizers, which found another bug …
matthargett ef2949f
Fix build errors. This deduplicates struct definitions that were inli…
matthargett b725184
always build the napi tests
matthargett c68b5e9
try and get address sanitizer and thread sanitizer to run on Android,…
matthargett 1952f7b
Add N-API version/conformance roadmap (folds in engine-compat baseline)
matthargett cc265c3
Restore NodeApi tests build on current macOS toolchain
matthargett 4eb18cc
Restore Android NodeApi test build (compiles/links/installs/runs on e…
matthargett ca21767
Fix Android NodeApi harness JNI crash; wire up SetNodeApiTestEnvironment
matthargett c486dc4
Android: make the NodeApi conformance tests actually execute on-device
matthargett ab74f9e
Android: enter the V8 context in jsr_open_napi_env_scope (fix napi_cr…
matthargett c9ff696
Android/in-process node_lite: let ExitOnException propagate the fatal…
matthargett 9e0a62c
Android/in-process: make node_lite teardown destructors exception-safe
matthargett 09e9678
Android/in-process: guard the fatal handler against throwing while un…
matthargett 4fea275
Android/in-process: drop noexcept from throwing error-exit functions …
matthargett 0a78615
Android: skip in-process js-native-api addon tests pending shared-lib…
matthargett a8282b7
docs(roadmap): document Android in-process addon-load constraint + sh…
matthargett e0484e1
Android: statically link conformance addons into the test binary (run…
matthargett aa1daff
Android tests: pump native stdout/stderr to logcat
matthargett 9013f87
docs(roadmap): Android v5 js-native-api now green via static linking …
matthargett 7ca16d9
Android: drop the now-dead dynamic-.node build machinery (superseded …
matthargett 8949da4
Android: remove vestigial V8Platform scaffolding from the env holder
matthargett 7b20e53
docs(roadmap): record node-api-cts FetchContent evaluation (task 6) —…
matthargett 46c7664
Android: dlopen conformance addons as dynamic .node backed by a share…
matthargett ed90fd5
docs(roadmap): Android uses dynamic .node + shared libnapi.so (aligns…
matthargett 4fc648a
Android tests: use AndroidExtensions StdoutLogger for stdout->logcat
matthargett 56f26af
docs(roadmap): stdout->logcat is via AndroidExtensions StdoutLogger, …
matthargett 6f2737b
Sync napi shared-lib change with PR #183 (gate behind JSR_NAPI_SHARED…
matthargett 94d7818
Tests: enable the v5-clean reference double-free conformance test
matthargett c3d885f
docs(roadmap): reference-test staging + GC-safety review (re hermes-w…
matthargett 2867083
Node-API: address #116 review (JSC call dispatch, status type, Window…
matthargett 63e1604
Keep JSI's napi.h self-contained (restores upstream's inlined type copy)
matthargett a197dc2
Tests/NodeApi: add missing <cstdint> in child_process.h (fixes Linux …
matthargett ddd6dc6
Tests/node_lite: select the napi engine by compile-define, not platform
matthargett 4137a99
Tests/NodeApi: link napi into addons on Windows/UWP so napi_* resolve…
matthargett 908851b
Tests: don't build the C-API conformance harness for the JSI backend
matthargett 256daf9
Don't hard-fail the Linux JSC library probe (breaks the Hermes host b…
matthargett b059acf
Tests/Android: build the on-device Node-API harness only for validate…
matthargett ad6bfbc
Don't default napi to a shared library for the Hermes engine on Android
matthargett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.