Skip to content

Commit caf5b40

Browse files
committed
解决nuget测试的报错:1、原生库打开--expose-gc;2、去掉没有的websocket功能的测试
1 parent b41697b commit caf5b40

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

.github/workflows/build_nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
for backend in $backends; do
5050
echo "Building $backend for ${{ matrix.platform }}-${{ matrix.arch }}"
5151
cd "$repo_root/unity/native/$backend"
52-
node ../../cli make --platform ${{ matrix.platform }} --arch ${{ matrix.arch }}
52+
node ../../cli make --platform ${{ matrix.platform }} --arch ${{ matrix.arch }} --expose_gc
5353
cd "$repo_root"
5454
done
5555

unity/cli/cmd.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ program
3636
.option('-ws, --websocket <number>', 'with websocket support')
3737
.option('-G, --generator <generator-name>', 'cmake generator name')
3838
.option('-ts, --thread_safe', 'thread safe')
39+
.option('-egc, --expose_gc', 'expose gc')
3940
.option('-wi, --with_inspector', 'with inspector')
4041
.option('-jl, --jitless', 'jitless')
4142
.option('--with_symbols', 'generate symbol file for debug')

unity/cli/make.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ async function runPuertsMake(cwd, options) {
408408
if (options.thread_safe) {
409409
console.log('################################## thread_safe ##################################');
410410
BackendConfig.definition.push("THREAD_SAFE");
411+
}
412+
if (options.expose_gc) {
413+
console.log('################################## expose_gc ##################################');
414+
BackendConfig.definition.push("EXPOSE_GC");
411415
}
412416
if (options.jitless) {
413417
console.log('################################## jitless ##################################');

unity/native/papi-nodejs/source/BackendEnv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ void FBackendEnv::GlobalPrepare()
213213
if (!GPlatform)
214214
{
215215
std::string Flags = "--stack_size=856";
216-
#if PUERTS_DEBUG
216+
#if PUERTS_DEBUG || EXPOSE_GC
217217
Flags += " --expose-gc";
218218
#endif
219219
#if defined(PLATFORM_IOS) || defined(PLATFORM_OHOS) || defined(JITLESS)

unity/native/papi-v8/source/BackendEnv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ void FBackendEnv::GlobalPrepare()
213213
if (!GPlatform)
214214
{
215215
std::string Flags = "--stack_size=856";
216-
#if PUERTS_DEBUG
216+
#if PUERTS_DEBUG || EXPOSE_GC
217217
Flags += " --expose-gc";
218218
#endif
219219
#if defined(PLATFORM_IOS) || defined(PLATFORM_OHOS) || defined(JITLESS)

unity/test/nuget/projects/nuget-test.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@
8686
<Compile Include="../../Src/Cases/Javascript/MultiTest.cs">
8787
<Link>Javascript\MultiTest.cs</Link>
8888
</Compile>
89-
<Compile Include="../../Src/Cases/Javascript/WebsocketTest.cs">
90-
<Link>Javascript\WebsocketTest.cs</Link>
91-
</Compile>
9289
<Compile Include="../../Src/Cases/Lua/AccessControlTest.cs">
9390
<Link>Lua\AccessControlTest.cs</Link>
9491
</Compile>

0 commit comments

Comments
 (0)