mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
[no-relnote] Add E2E for libnvidia-container
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
This commit is contained in:
parent
19a83e3542
commit
903737e889
811
ginkgo.json
Normal file
811
ginkgo.json
Normal file
@ -0,0 +1,811 @@
|
||||
[
|
||||
{
|
||||
"SuitePath": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e",
|
||||
"SuiteDescription": "E2E NVIDIA Container Toolkit",
|
||||
"SuiteLabels": [],
|
||||
"SuiteSucceeded": true,
|
||||
"SuiteHasProgrammaticFocus": false,
|
||||
"SpecialSuiteFailureReasons": null,
|
||||
"PreRunStats": {
|
||||
"TotalSpecs": 17,
|
||||
"SpecsThatWillRun": 1
|
||||
},
|
||||
"StartTime": "2025-05-30T17:30:37.919847+02:00",
|
||||
"EndTime": "2025-05-30T17:31:22.573392+02:00",
|
||||
"RunTime": 44653713916,
|
||||
"SuiteConfig": {
|
||||
"RandomSeed": 1748619036,
|
||||
"RandomizeAllSpecs": false,
|
||||
"FocusStrings": [
|
||||
"nvidia-container-cli"
|
||||
],
|
||||
"SkipStrings": null,
|
||||
"FocusFiles": null,
|
||||
"SkipFiles": null,
|
||||
"LabelFilter": "",
|
||||
"FailOnPending": false,
|
||||
"FailOnEmpty": false,
|
||||
"FailFast": false,
|
||||
"FlakeAttempts": 0,
|
||||
"MustPassRepeatedly": 0,
|
||||
"DryRun": false,
|
||||
"PollProgressAfter": 0,
|
||||
"PollProgressInterval": 0,
|
||||
"Timeout": 3598886492000,
|
||||
"EmitSpecProgress": false,
|
||||
"OutputInterceptorMode": "",
|
||||
"SourceRoots": null,
|
||||
"GracePeriod": 30000000000,
|
||||
"ParallelProcess": 1,
|
||||
"ParallelTotal": 1,
|
||||
"ParallelHost": ""
|
||||
},
|
||||
"SpecReports": [
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"nvidia-container-cli",
|
||||
"when running nvidia-smi -L"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 104
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 129
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 146
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support NVIDIA_VISIBLE_DEVICES and NVIDIA_DRIVER_CAPABILITIES",
|
||||
"State": "passed",
|
||||
"StartTime": "2025-05-30T17:30:37.91994+02:00",
|
||||
"EndTime": "2025-05-30T17:31:22.572335+02:00",
|
||||
"RunTime": 44652563291,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 1,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0,
|
||||
"SpecEvents": [
|
||||
{
|
||||
"SpecEventType": "Node",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 108
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 1,
|
||||
"Time": "2025-05-30T17:30:37.919945+02:00"
|
||||
},
|
||||
"Message": "nvidia-container-cli",
|
||||
"NodeType": "BeforeAll"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node (End)",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 108
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 3,
|
||||
"Time": "2025-05-30T17:30:37.920072+02:00"
|
||||
},
|
||||
"Message": "nvidia-container-cli",
|
||||
"Duration": 127500,
|
||||
"NodeType": "BeforeAll"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 133
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 4,
|
||||
"Time": "2025-05-30T17:30:37.920073+02:00"
|
||||
},
|
||||
"Message": "when running nvidia-smi -L",
|
||||
"NodeType": "BeforeAll"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node (End)",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 133
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 6,
|
||||
"Time": "2025-05-30T17:30:44.382334+02:00"
|
||||
},
|
||||
"Message": "when running nvidia-smi -L",
|
||||
"Duration": 6462285125,
|
||||
"NodeType": "BeforeAll"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 146
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 7,
|
||||
"Time": "2025-05-30T17:30:44.382669+02:00"
|
||||
},
|
||||
"Message": "should support NVIDIA_VISIBLE_DEVICES and NVIDIA_DRIVER_CAPABILITIES",
|
||||
"NodeType": "It"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "By",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 147
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 8,
|
||||
"Time": "2025-05-30T17:30:44.382829+02:00"
|
||||
},
|
||||
"Message": "creating the test script on the remote host"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "By",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 154
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 9,
|
||||
"Time": "2025-05-30T17:30:46.268934+02:00"
|
||||
},
|
||||
"Message": "discovering the symlink targets for the libraries on the remote host"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "By",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 168
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 10,
|
||||
"Time": "2025-05-30T17:30:50.005511+02:00"
|
||||
},
|
||||
"Message": "rendering the docker run template with the discovered targets"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "By",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 179
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 11,
|
||||
"Time": "2025-05-30T17:30:50.005651+02:00"
|
||||
},
|
||||
"Message": "starting the container using the rendered docker run command"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "By",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 183
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 12,
|
||||
"Time": "2025-05-30T17:30:57.455115+02:00"
|
||||
},
|
||||
"Message": "checking the container logs for the expected output"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node (End)",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 146
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 14,
|
||||
"Time": "2025-05-30T17:31:20.561359+02:00"
|
||||
},
|
||||
"Message": "should support NVIDIA_VISIBLE_DEVICES and NVIDIA_DRIVER_CAPABILITIES",
|
||||
"Duration": 36178826958,
|
||||
"NodeType": "It"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 141
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 15,
|
||||
"Time": "2025-05-30T17:31:20.561375+02:00"
|
||||
},
|
||||
"Message": "when running nvidia-smi -L",
|
||||
"NodeType": "AfterAll"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node (End)",
|
||||
"CodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-cli_test.go",
|
||||
"LineNumber": 141
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 17,
|
||||
"Time": "2025-05-30T17:31:22.57233+02:00"
|
||||
},
|
||||
"Message": "when running nvidia-smi -L",
|
||||
"Duration": 2010962791,
|
||||
"NodeType": "AfterAll"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when running nvidia-smi -L"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 58
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 70
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support NVIDIA_VISIBLE_DEVICES",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572477+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when running nvidia-smi -L"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 58
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 76
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support automatic CDI spec generation",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572728+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when running nvidia-smi -L"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 58
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 82
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support automatic CDI spec generation with the --gpus flag",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572841+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when running nvidia-smi -L"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 58
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 88
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support the --gpus flag using the nvidia-container-runtime",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572851+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when running nvidia-smi -L"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 58
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 94
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support the --gpus flag using the nvidia-container-runtime-hook",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572866+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-vectorAdd sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 103
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 111
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support NVIDIA_VISIBLE_DEVICES",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572875+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-vectorAdd sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 103
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 119
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support automatic CDI spec generation",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572884+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-vectorAdd sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 103
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 125
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support the --gpus flag using the nvidia-container-runtime",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572893+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-vectorAdd sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 103
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 131
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support the --gpus flag using the nvidia-container-runtime-hook",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.572985+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-deviceQuery sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 140
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 148
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support NVIDIA_VISIBLE_DEVICES",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573025+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-deviceQuery sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 140
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 155
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support automatic CDI spec generation",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573034+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-deviceQuery sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 140
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 161
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support the --gpus flag using the nvidia-container-runtime",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573046+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Running the cuda-deviceQuery sample"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 140
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 167
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should support the --gpus flag using the nvidia-container-runtime-hook",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573322+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Testing CUDA Forward compatibility"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 174
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 201
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should work with the nvidia runtime in legacy mode",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573332+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Testing CUDA Forward compatibility"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 174
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 207
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should work with the nvidia runtime in CDI mode",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573337+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"docker",
|
||||
"when Testing CUDA Forward compatibility"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 29
|
||||
},
|
||||
{
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 174
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/Users/eduardoa/src/github/nvidia/nvidia-container-toolkit/tests/e2e/nvidia-container-toolkit_test.go",
|
||||
"LineNumber": 213
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should NOT work with nvidia-container-runtime-hook",
|
||||
"State": "skipped",
|
||||
"StartTime": "2025-05-30T17:31:22.573361+02:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -20,8 +20,14 @@ LOG_ARTIFACTS_DIR ?= $(CURDIR)/e2e_logs
|
||||
|
||||
GINKGO_BIN := $(CURDIR)/bin/ginkgo
|
||||
|
||||
# If GINKGO_FOCUS is not set, run all tests
|
||||
# current available tests:
|
||||
# - nvidia-container-cli
|
||||
# - docker
|
||||
GINKGO_FOCUS ?= nvidia-container-cli
|
||||
|
||||
test: $(GINKGO_BIN)
|
||||
$(GINKGO_BIN) $(GINKGO_ARGS) -v --json-report ginkgo.json ./tests/e2e/...
|
||||
$(GINKGO_BIN) $(GINKGO_ARGS) -v --json-report ginkgo.json --focus="$(GINKGO_FOCUS)" ./tests/e2e/...
|
||||
|
||||
$(GINKGO_BIN):
|
||||
mkdir -p $(CURDIR)/bin
|
||||
|
||||
195
tests/e2e/nvidia-container-cli_test.go
Normal file
195
tests/e2e/nvidia-container-cli_test.go
Normal file
@ -0,0 +1,195 @@
|
||||
/*
|
||||
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
const (
|
||||
libnvidiaContainerCliDockerRunTemplate = `
|
||||
docker run -d --name test-nvidia-container-cli \
|
||||
--privileged \
|
||||
--runtime=nvidia \
|
||||
-e NVIDIA_VISIBLE_DEVICES=all \
|
||||
-e NVIDIA_DRIVER_CAPABILITIES=all \
|
||||
-v $HOME/libnvidia-container-cli.sh:/usr/local/bin/libnvidia-container-cli.sh \
|
||||
-v /usr/bin/nvidia-container-cli:/usr/bin/nvidia-container-cli \
|
||||
-v /usr/bin/nvidia-ctk:/usr/bin/nvidia-ctk \
|
||||
-v /usr/bin/nvidia-container-runtime:/usr/bin/nvidia-container-runtime \
|
||||
-v /usr/bin/nvidia-container-runtime-hook:/usr/bin/nvidia-container-runtime-hook \
|
||||
-v /usr/bin/nvidia-container-toolkit:/usr/bin/nvidia-container-toolkit \
|
||||
-v /usr/bin/nvidia-cdi-hook:/usr/bin/nvidia-cdi-hook \
|
||||
-v /usr/bin/nvidia-container-runtime.cdi:/usr/bin/nvidia-container-runtime.cdi \
|
||||
-v /usr/bin/nvidia-container-runtime.legacy:/usr/bin/nvidia-container-runtime.legacy \
|
||||
-v /usr/local/nvidia/toolkit:/usr/local/nvidia/toolkit \
|
||||
-v /etc/nvidia-container-runtime:/etc/nvidia-container-runtime \
|
||||
-v /usr/lib/x86_64-linux-gnu/libnvidia-container.so.1:/usr/lib/x86_64-linux-gnu/libnvidia-container.so.1 \
|
||||
-v /usr/lib/x86_64-linux-gnu/{{.LibNvidiaContainerTarget}}:/usr/lib/x86_64-linux-gnu/{{.LibNvidiaContainerTarget}} \
|
||||
-v /usr/lib/x86_64-linux-gnu/libnvidia-container-go.so.1:/usr/lib/x86_64-linux-gnu/libnvidia-container-go.so.1 \
|
||||
-v /usr/lib/x86_64-linux-gnu/{{.LibNvidiaContainerGoTarget}}:/usr/lib/x86_64-linux-gnu/{{.LibNvidiaContainerGoTarget}} \
|
||||
-e LD_LIBRARY_PATH=/usr/lib64:/usr/lib/x86_64-linux-gnu:/usr/lib/aarch64-linux-gnu:/lib64:/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu \
|
||||
--entrypoint /usr/local/bin/libnvidia-container-cli.sh \
|
||||
ubuntu
|
||||
`
|
||||
|
||||
libnvidiaContainerCliTestTemplate = `#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apt-get update -y && apt-get install -y curl gnupg2
|
||||
|
||||
WORKDIR="$(mktemp -d)"
|
||||
ROOTFS="${WORKDIR}/rootfs"
|
||||
mkdir -p "${ROOTFS}"
|
||||
|
||||
export WORKDIR ROOTFS # make them visible in the child shell
|
||||
|
||||
unshare --mount --pid --fork --propagation private -- bash -eux <<'IN_NS'
|
||||
: "${ROOTFS:?}" "${WORKDIR:?}" # abort if either is empty
|
||||
|
||||
# 1 Populate minimal Ubuntu base
|
||||
curl -L http://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-amd64.tar.gz \
|
||||
| tar -C "$ROOTFS" -xz
|
||||
|
||||
# 2 Add non-root user
|
||||
useradd -R "$ROOTFS" -U -u 1000 -s /bin/bash nvidia
|
||||
|
||||
# 3 Bind-mount new root and unshare mounts
|
||||
mount --bind "$ROOTFS" "$ROOTFS"
|
||||
mount --make-private "$ROOTFS"
|
||||
cd "$ROOTFS"
|
||||
|
||||
# 4 Minimal virtual filesystems
|
||||
mount -t proc proc proc
|
||||
mount -t sysfs sys sys
|
||||
mount -t tmpfs tmp tmp
|
||||
mount -t tmpfs run run
|
||||
|
||||
# 5 GPU setup
|
||||
nvidia-container-cli --load-kmods --debug=container-cli.log \
|
||||
configure --ldconfig=@/sbin/ldconfig.real \
|
||||
--no-cgroups --utility --device=0 "$(pwd)"
|
||||
|
||||
# 6 Switch root
|
||||
mkdir -p mnt
|
||||
pivot_root . mnt
|
||||
umount -l /mnt
|
||||
|
||||
exec nvidia-smi -L
|
||||
IN_NS
|
||||
`
|
||||
)
|
||||
|
||||
// Integration tests for Docker runtime
|
||||
var _ = Describe("nvidia-container-cli", Ordered, ContinueOnFailure, func() {
|
||||
var runner Runner
|
||||
|
||||
// Install the NVIDIA Container Toolkit
|
||||
BeforeAll(func(ctx context.Context) {
|
||||
runner = NewRunner(
|
||||
WithHost(sshHost),
|
||||
WithPort(sshPort),
|
||||
WithSshKey(sshKey),
|
||||
WithSshUser(sshUser),
|
||||
)
|
||||
|
||||
if installCTK {
|
||||
installer, err := NewToolkitInstaller(
|
||||
WithRunner(runner),
|
||||
WithImage(imageName+":"+imageTag),
|
||||
WithTemplate(dockerInstallTemplate),
|
||||
)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
err = installer.Install()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
})
|
||||
|
||||
When("running nvidia-smi -L", Ordered, func() {
|
||||
var hostOutput string
|
||||
var err error
|
||||
|
||||
BeforeAll(func(ctx context.Context) {
|
||||
hostOutput, _, err = runner.Run("nvidia-smi -L")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
_, _, err := runner.Run("docker pull ubuntu")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
})
|
||||
|
||||
AfterAll(func(ctx context.Context) {
|
||||
_, _, err := runner.Run("docker rm -f test-nvidia-container-cli")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
})
|
||||
|
||||
It("should support NVIDIA_VISIBLE_DEVICES and NVIDIA_DRIVER_CAPABILITIES", func(ctx context.Context) {
|
||||
// 1. Create the test script on the remote host at $HOME/test.sh using a here-document
|
||||
testScriptPath := "$HOME/libnvidia-container-cli.sh"
|
||||
testScript := libnvidiaContainerCliTestTemplate
|
||||
createScriptCmd := fmt.Sprintf("cat > %s <<'EOF'\n%s\nEOF\nchmod +x %s", testScriptPath, testScript, testScriptPath)
|
||||
_, _, err := runner.Run(createScriptCmd)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
// 2. Discover the symlink targets for the libraries on the remote host
|
||||
getTargetCmd := func(lib string) string {
|
||||
return fmt.Sprintf("readlink -f /usr/lib/x86_64-linux-gnu/%s.1", lib)
|
||||
}
|
||||
libNvidiaContainerTarget, _, err := runner.Run(getTargetCmd("libnvidia-container.so"))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
libNvidiaContainerTarget = strings.TrimSpace(libNvidiaContainerTarget)
|
||||
libNvidiaContainerTarget = strings.TrimPrefix(libNvidiaContainerTarget, "/usr/lib/x86_64-linux-gnu/")
|
||||
|
||||
libNvidiaContainerGoTarget, _, err := runner.Run(getTargetCmd("libnvidia-container-go.so"))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
libNvidiaContainerGoTarget = strings.TrimSpace(libNvidiaContainerGoTarget)
|
||||
libNvidiaContainerGoTarget = strings.TrimPrefix(libNvidiaContainerGoTarget, "/usr/lib/x86_64-linux-gnu/")
|
||||
|
||||
// 3. Render the docker run template with the discovered targets
|
||||
tmpl, err := template.New("dockerRun").Parse(libnvidiaContainerCliDockerRunTemplate)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
var dockerRunCmdBuilder strings.Builder
|
||||
err = tmpl.Execute(&dockerRunCmdBuilder, map[string]string{
|
||||
"LibNvidiaContainerTarget": libNvidiaContainerTarget,
|
||||
"LibNvidiaContainerGoTarget": libNvidiaContainerGoTarget,
|
||||
})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
dockerRunCmd := dockerRunCmdBuilder.String()
|
||||
|
||||
// 4. Start the container using the rendered docker run command
|
||||
_, _, err = runner.Run(dockerRunCmd)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
// 5. Use Eventually to check the container logs contain hostOutput
|
||||
Eventually(func() string {
|
||||
logs, _, err := runner.Run("docker logs test-nvidia-container-cli")
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return logs
|
||||
}, "5m", "5s").Should(ContainSubstring(hostOutput))
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Reference in New Issue
Block a user