-
Notifications
You must be signed in to change notification settings - Fork 3.1k
test(e2e): document platform parity coverage for WSL GPU Spark #5803
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| import { | ||
| evaluateE2eVitestWorkflowDispatchSelectors, | ||
| readFreeStandingJobsInventory, | ||
| validateE2eVitestScenariosWorkflowBoundary, | ||
| } from "../../../tools/e2e-scenarios/workflow-boundary.mts"; | ||
| import { canonicalScenarios } from "../scenarios/scenarios/baseline.ts"; | ||
|
|
||
| describe("P0-E platform parity workflow coverage", () => { | ||
| it("keeps the WSL platform scenario on a Windows WSL runner boundary", () => { | ||
| const wsl = canonicalScenarios().find((entry) => entry.id === "wsl-repo-cloud-openclaw"); | ||
| expect(wsl).toBeDefined(); | ||
|
|
||
| expect(wsl.environment).toMatchObject({ | ||
| platform: "wsl-local", | ||
| runtime: "docker-running", | ||
| onboarding: "cloud-openclaw", | ||
| }); | ||
| expect(wsl.runnerRequirements).toEqual(expect.arrayContaining(["windows-latest", "wsl2"])); | ||
| expect(wsl.suiteIds).toContain("platform-wsl"); | ||
| expect(wsl.requiredSecrets).toContain("NVIDIA_INFERENCE_API_KEY"); | ||
|
Comment on lines
+15
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect the target test file and relevant TypeScript/Vitest context.
git ls-files 'test/e2e-scenario/support-tests/platform-parity-workflow-boundary.test.ts' 'tsconfig*.json' 'package.json' 'vitest.config.*' 'test/**/support-tests/*.test.ts' | sed 's#^`#FILE` #'
echo
echo "---- target file ----"
cat -n test/e2e-scenario/support-tests/platform-parity-workflow-boundary.test.ts
echo
echo "---- search for similar patterns ----"
rg -n "toBeDefined\(\).*possible|expect\\(.*\\)\\.toBeDefined\\(\\).*\\n.*if \\(!.*\\)" test src -U || true
echo
echo "---- search for config / test runner deps ----"
rg -n "\"vitest\"|expectTypeOf|toBeDefined" package.json tsconfig*.json vitest.config.* test -g '!**/node_modules/**' || trueRepository: NVIDIA/NemoClaw Length of output: 50371 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Read the file and typecheck-relevant configuration in smaller slices if needed.
stat -c '%n %s bytes' test/e2e-scenario/support-tests/platform-parity-workflow-boundary.test.ts
echo
sed -n '1,220p' test/e2e-scenario/support-tests/platform-parity-workflow-boundary.test.ts
echo
echo "---- tsconfig files ----"
for f in tsconfig*.json; do
[ -f "$f" ] && echo "### $f" && cat "$f" && echo
done
echo
echo "---- package.json snippets ----"
sed -n '1,240p' package.jsonRepository: NVIDIA/NemoClaw Length of output: 195 Add a runtime guard before dereferencing 🧰 Tools🪛 GitHub Check: build-typecheck[failure] 25-25: [failure] 24-24: [failure] 23-23: [failure] 18-18: 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| expect( | ||
| evaluateE2eVitestWorkflowDispatchSelectors({ scenarios: "wsl-repo-cloud-openclaw" }), | ||
| ).toMatchObject({ | ||
| valid: true, | ||
| liveScenariosRuns: true, | ||
| registryScenarios: ["wsl-repo-cloud-openclaw"], | ||
| selectedFreeStandingJobs: [], | ||
| }); | ||
| }); | ||
|
|
||
| it("keeps GPU, Spark, and Jetson platform selectors explicit and routable", () => { | ||
| expect(validateE2eVitestScenariosWorkflowBoundary()).toEqual([]); | ||
|
|
||
| const inventory = readFreeStandingJobsInventory(); | ||
| expect(inventory.scenarioToJob.get("gpu-e2e")).toBe("gpu-e2e-vitest"); | ||
| expect(inventory.scenarioToJob.get("gpu-double-onboard")).toBe("gpu-double-onboard-vitest"); | ||
| expect(inventory.scenarioToJob.get("spark-install")).toBe("spark-install-vitest"); | ||
| expect(inventory.scenarioToJob.get("jetson-nvmap-gpu")).toBe("jetson-nvmap-gpu-vitest"); | ||
|
|
||
| expect(evaluateE2eVitestWorkflowDispatchSelectors({ scenarios: "gpu-e2e" })).toMatchObject({ | ||
| valid: true, | ||
| liveScenariosRuns: false, | ||
| selectedFreeStandingJobs: ["gpu-e2e-vitest"], | ||
| registryScenarios: [], | ||
| }); | ||
| expect( | ||
| evaluateE2eVitestWorkflowDispatchSelectors({ scenarios: "gpu-double-onboard" }), | ||
| ).toMatchObject({ | ||
| valid: true, | ||
| liveScenariosRuns: false, | ||
| selectedFreeStandingJobs: ["gpu-double-onboard-vitest"], | ||
| registryScenarios: [], | ||
| }); | ||
| expect( | ||
| evaluateE2eVitestWorkflowDispatchSelectors({ scenarios: "spark-install" }), | ||
| ).toMatchObject({ | ||
| valid: true, | ||
| liveScenariosRuns: false, | ||
| selectedFreeStandingJobs: ["spark-install-vitest"], | ||
| registryScenarios: [], | ||
| }); | ||
|
|
||
| // Jetson/Tegra hardware is still an explicit-only route; do not imply the | ||
| // default full-suite dispatch proved /dev/nvmap group behavior. | ||
| expect(evaluateE2eVitestWorkflowDispatchSelectors({}).selectedFreeStandingJobs).not.toContain( | ||
| "jetson-nvmap-gpu-vitest", | ||
| ); | ||
| expect( | ||
| evaluateE2eVitestWorkflowDispatchSelectors({ scenarios: "jetson-nvmap-gpu" }), | ||
| ).toMatchObject({ | ||
| valid: true, | ||
| liveScenariosRuns: false, | ||
| selectedFreeStandingJobs: ["jetson-nvmap-gpu-vitest"], | ||
| registryScenarios: [], | ||
| }); | ||
| }); | ||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Test title references
nvidia-smi, but the assessment drives the branch via the toolkit flag.The behavior being exercised is
nvidiaContainerToolkitInstalled: false(pluscdiNvidiaGpuSpecMissing: true), which is what selects theinstall_nvidia_container_toolkitbranch inplanHostRemediation. The name "when nvidia-smi is unavailable" isn't modeled by any field here, so it may confuse the parity-coverage mapping this PR documents. Also,hasNvidiaGpu: trueduplicates thebaseAssessmentdefault and can be dropped.✏️ Suggested title/override tidy-up
📝 Committable suggestion
🤖 Prompt for AI Agents