锁定虚拟HAL宏加载阻断证据
This commit is contained in:
@@ -469,6 +469,18 @@
|
||||
"linuxcnc/configs/sim/axis/external_offsets/eoffsets.ngc",
|
||||
],
|
||||
];
|
||||
const expectedBlockedMacroLoadFixtures = [
|
||||
[
|
||||
"silverdragon-tool-sensor-python-ui-boundary",
|
||||
"linuxcnc/configs/sim/gscreen/silverdragon/macros/tool_sensor.ngc",
|
||||
"PYTHON-UI-PROCESS",
|
||||
],
|
||||
[
|
||||
"gmoccapy-on-abort-python-remap-boundary",
|
||||
"linuxcnc/configs/sim/gmoccapy/macros/on_abort.ngc",
|
||||
"L4-PYTHON-REMAP",
|
||||
],
|
||||
];
|
||||
if (
|
||||
diagnosticsArtifact.apiName !== "real-browser-simulation-diagnostics-artifact" ||
|
||||
diagnosticsArtifact.statusHistory.length === 0 ||
|
||||
@@ -493,6 +505,7 @@
|
||||
)
|
||||
) ||
|
||||
diagnosticsArtifact.virtualHalSimConfigMacroLoadFixtures?.complete !== true ||
|
||||
diagnosticsArtifact.virtualHalSimConfigMacroLoadFixtures?.blockedFixturePromotionViolations?.length !== 0 ||
|
||||
!expectedMacroLoadFixtures.every(([id, fixturePath, declaredOnly, ...sourceFiles]) =>
|
||||
diagnosticsArtifact.virtualHalSimConfigMacroLoadFixtures?.rows?.some((row) =>
|
||||
row.id === id &&
|
||||
@@ -504,6 +517,15 @@
|
||||
sourceFiles.every((sourceFile) => row.sourceFiles.includes(sourceFile))
|
||||
)
|
||||
) ||
|
||||
!expectedBlockedMacroLoadFixtures.every(([id, fixturePath, blockedKind]) =>
|
||||
diagnosticsArtifact.virtualHalSimConfigMacroLoadFixtures?.blockedRows?.some((row) =>
|
||||
row.id === id &&
|
||||
row.fixturePath === fixturePath &&
|
||||
row.blockedKind === blockedKind &&
|
||||
row.excludedFromPositiveFixtures === true &&
|
||||
row.complete === true
|
||||
)
|
||||
) ||
|
||||
diagnosticsArtifact.virtualHalCommandScriptFixtures?.complete !== true ||
|
||||
!diagnosticsArtifact.virtualHalCommandScriptFixtures?.coveredActions?.includes("loadusr") ||
|
||||
diagnosticsArtifact.virtualHalMotionControllerMatrix?.complete !== true ||
|
||||
@@ -955,6 +977,7 @@
|
||||
macroLoadFixtureReport.complete !== true ||
|
||||
macroLoadFixtureReport.inventoryBaselineUnchanged !== true ||
|
||||
macroLoadFixtureReport.standaloneMainViolations.length !== 0 ||
|
||||
macroLoadFixtureReport.blockedFixturePromotionViolations.length !== 0 ||
|
||||
!expectedMacroLoadFixtures.every(([id, fixturePath, declaredOnly, ...sourceFiles]) =>
|
||||
macroLoadFixtureReport.rows.some((row) =>
|
||||
row.id === id &&
|
||||
@@ -965,6 +988,15 @@
|
||||
sourceFiles.every((sourceFile) => row.sourceFiles.includes(sourceFile))
|
||||
)
|
||||
) ||
|
||||
!expectedBlockedMacroLoadFixtures.every(([id, fixturePath, blockedKind]) =>
|
||||
macroLoadFixtureReport.blockedRows.some((row) =>
|
||||
row.id === id &&
|
||||
row.fixturePath === fixturePath &&
|
||||
row.blockedKind === blockedKind &&
|
||||
row.excludedFromPositiveFixtures === true &&
|
||||
row.complete === true
|
||||
)
|
||||
) ||
|
||||
api.getVirtualRealtimeHalRuntimeReport().ready !== true ||
|
||||
api.getVirtualHalSimulationRuntimeReport().replacesHostRuntimeForSimulation !== true
|
||||
) {
|
||||
|
||||
@@ -36,6 +36,7 @@ import {
|
||||
VIRTUAL_HAL_COVERAGE_STATES,
|
||||
VIRTUAL_HAL_MOTION_CONTROLLER_MATRIX_FIXTURES,
|
||||
VIRTUAL_HAL_PROJECT_PIN_GROUPS,
|
||||
VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_BLOCKED_FIXTURES,
|
||||
VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_FIXTURES,
|
||||
VIRTUAL_HAL_SIM_CONFIG_PROMOTION_CANDIDATES,
|
||||
VIRTUAL_HAL_SIM_CONFIG_SOURCE_TARGETS,
|
||||
@@ -548,6 +549,8 @@ assert.match(sdkIndexText, /\bcreateVirtualHalSimConfigPromotionCandidateReport\
|
||||
assert.match(sdkReadmeText, /\bcreateVirtualHalSimConfigPromotionCandidateReport\b/);
|
||||
assert.match(sdkIndexText, /\bVIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_FIXTURES\b/);
|
||||
assert.match(sdkReadmeText, /\bVIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_FIXTURES\b/);
|
||||
assert.match(sdkIndexText, /\bVIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_BLOCKED_FIXTURES\b/);
|
||||
assert.match(sdkReadmeText, /\bVIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_BLOCKED_FIXTURES\b/);
|
||||
assert.match(sdkIndexText, /\bcreateVirtualHalSimConfigMacroLoadFixtureReport\b/);
|
||||
assert.match(sdkReadmeText, /\bcreateVirtualHalSimConfigMacroLoadFixtureReport\b/);
|
||||
assert.match(sdkIndexText, /\bcreateVirtualHalSourceComplianceReport\b/);
|
||||
@@ -843,6 +846,7 @@ assert.equal(virtualHalRuntime.getSimConfigPromotionCandidateReport({
|
||||
motionControllerMatrix: manifestCheckedMotionControllerMatrixReport,
|
||||
}).complete, true);
|
||||
assert.equal(VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_FIXTURES.length >= 2, true);
|
||||
assert.equal(VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_BLOCKED_FIXTURES.length >= 2, true);
|
||||
const simConfigMacroLoadFixtureReport = createVirtualHalSimConfigMacroLoadFixtureReport({
|
||||
manifestText: sourceManifestText,
|
||||
});
|
||||
@@ -857,6 +861,7 @@ assert.equal(simConfigMacroLoadFixtureReport.manifestChecked, true);
|
||||
assert.equal(simConfigMacroLoadFixtureReport.missingFixtures.length, 0);
|
||||
assert.equal(simConfigMacroLoadFixtureReport.blockedFixtureIds.length, 0);
|
||||
assert.equal(simConfigMacroLoadFixtureReport.standaloneMainViolations.length, 0);
|
||||
assert.equal(simConfigMacroLoadFixtureReport.blockedFixturePromotionViolations.length, 0);
|
||||
assert.equal(simConfigMacroLoadFixtureReport.missingManifestFiles.length, 0);
|
||||
assert.equal(
|
||||
simConfigMacroLoadFixtureReport.rows.some((row) =>
|
||||
@@ -882,6 +887,26 @@ assert.equal(
|
||||
),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
simConfigMacroLoadFixtureReport.blockedRows.some((row) =>
|
||||
row.id === "silverdragon-tool-sensor-python-ui-boundary" &&
|
||||
row.fixturePath === "linuxcnc/configs/sim/gscreen/silverdragon/macros/tool_sensor.ngc" &&
|
||||
row.blockedKind === "PYTHON-UI-PROCESS" &&
|
||||
row.excludedFromPositiveFixtures === true &&
|
||||
row.complete === true
|
||||
),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
simConfigMacroLoadFixtureReport.blockedRows.some((row) =>
|
||||
row.id === "gmoccapy-on-abort-python-remap-boundary" &&
|
||||
row.fixturePath === "linuxcnc/configs/sim/gmoccapy/macros/on_abort.ngc" &&
|
||||
row.blockedKind === "L4-PYTHON-REMAP" &&
|
||||
row.excludedFromPositiveFixtures === true &&
|
||||
row.complete === true
|
||||
),
|
||||
true,
|
||||
);
|
||||
assert.equal(virtualHalRuntime.getSimConfigMacroLoadFixtureReport({
|
||||
manifestText: sourceManifestText,
|
||||
}).complete, true);
|
||||
|
||||
Reference in New Issue
Block a user