e7fa90ae18
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m28s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m4s
Project CI / Backend tests (pull_request) Successful in 3m43s
Project CI / Frontend tests (pull_request) Successful in 2m7s
Project CI / Native shell tests (pull_request) Successful in 5m38s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 8m37s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m14s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m38s
Project CI / Repository checks (pull_request) Successful in 2m14s
修复变参 feature 解析、Windows Codex 缓存幂等性、插件缓存产物检查和插件根目录链接校验。 补齐 staging/backup 忽略规则与 feature 回归测试。
66 lines
1.7 KiB
JavaScript
66 lines
1.7 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { test } from 'node:test';
|
|
|
|
import { buildTauriBuildArguments } from './build-release.mjs';
|
|
import {
|
|
featuresFromArgv,
|
|
withDefaultCargoFeatures,
|
|
} from './cargo-features.mjs';
|
|
|
|
test('Windows release includes the same editor feature as development', () => {
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments([], 'x86_64-pc-windows-msvc', 'win32'),
|
|
[
|
|
'build',
|
|
'--features=cocos-editor-execute,unity-editor-execute,godot-editor-execute',
|
|
'--target',
|
|
'x86_64-pc-windows-msvc',
|
|
],
|
|
);
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments(
|
|
['--no-bundle'],
|
|
'x86_64-pc-windows-msvc',
|
|
'linux',
|
|
),
|
|
['build', '--no-bundle'],
|
|
);
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments(['--target=aarch64-apple-darwin']),
|
|
['build', '--target=aarch64-apple-darwin'],
|
|
);
|
|
});
|
|
test('explicit Cargo features override defaults in every supported spelling', () => {
|
|
for (const args of [
|
|
['--features', 'custom'],
|
|
['--features=custom'],
|
|
['-f', 'custom'],
|
|
['-fcustom'],
|
|
]) {
|
|
assert.deepEqual(
|
|
withDefaultCargoFeatures(args, ['cocos-editor-execute']),
|
|
args,
|
|
);
|
|
}
|
|
assert.deepEqual(
|
|
withDefaultCargoFeatures(
|
|
['--', '--features=app'],
|
|
['cocos-editor-execute'],
|
|
),
|
|
['--features=cocos-editor-execute', '--', '--features=app'],
|
|
);
|
|
});
|
|
|
|
test('features 变参会完整消费空格与逗号分隔的值', () => {
|
|
assert.deepEqual(
|
|
featuresFromArgv([
|
|
'-f',
|
|
'cocos-editor-execute,unity-editor-execute',
|
|
'godot-editor-execute',
|
|
'--target',
|
|
'x86_64-pc-windows-msvc',
|
|
]),
|
|
['cocos-editor-execute', 'unity-editor-execute', 'godot-editor-execute'],
|
|
);
|
|
});
|