Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cuda
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nvidia
cuda
Commits
e5146f97
Commit
e5146f97
authored
1 year ago
by
Jesus Alvarez
Browse files
Options
Downloads
Patches
Plain Diff
tests: fix image cleanup at the end of testing
parent
1a2b5cd9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/01-samples.bats
+3
-0
3 additions, 0 deletions
test/01-samples.bats
test/helpers.bash
+6
-1
6 additions, 1 deletion
test/helpers.bash
test/scripts/run_tests.sh
+0
-3
0 additions, 3 deletions
test/scripts/run_tests.sh
with
9 additions
and
4 deletions
test/01-samples.bats
+
3
−
0
View file @
e5146f97
...
...
@@ -66,6 +66,7 @@ function dq_rhel() {
fi
docker_build -t "${image}-${BATS_TEST_NAME}" .
docker_run --rm --gpus 0 ${image}-${BATS_TEST_NAME}
docker_rmi ${image}-${BATS_TEST_NAME}
[ "$status" -eq 0 ]
}
...
...
@@ -91,6 +92,7 @@ function dq_rhel() {
docker_build -t "${image}-${BATS_TEST_NAME}" .
debug "docker_run --rm --gpus 0 ${image}-${BATS_TEST_NAME}"
docker_run --rm --gpus 0 ${image}-${BATS_TEST_NAME}
docker_rmi ${image}-${BATS_TEST_NAME}
[ "$status" -eq 0 ]
}
...
...
@@ -115,5 +117,6 @@ function dq_rhel() {
fi
docker_build -t "${image}-${BATS_TEST_NAME}" .
docker_run --rm --gpus 0 ${image}-${BATS_TEST_NAME}
docker_rmi ${image}-${BATS_TEST_NAME}
[ "$status" -eq 0 ]
}
This diff is collapsed.
Click to expand it.
test/helpers.bash
+
6
−
1
View file @
e5146f97
...
...
@@ -15,13 +15,18 @@ function check_runtime() {
docker info |
grep
'Runtimes:'
|
grep
-q
'nvidia'
}
# Taken from runc tests
function
docker_run
()
{
run docker run
"
$@
"
echo
"docker run
$@
(status=
$status
):"
>
&2
echo
"
$output
"
>
&2
}
function
docker_rmi
()
{
run docker rmi
"
$@
"
echo
"docker rmi
$@
(status=
$status
):"
>
&2
echo
"
$output
"
>
&2
}
function
docker_build
()
{
run docker build
--pull
"
$@
"
echo
"docker run
$@
(status=
$status
):"
>
&2
...
...
This diff is collapsed.
Click to expand it.
test/scripts/run_tests.sh
+
0
−
3
View file @
e5146f97
...
...
@@ -38,6 +38,3 @@ for test in $(find $test_path -iname "[0-9]*-*.bats" | sort); do
done
docker rmi
-f
${
image
}
# TODO: cleanup after pipeline
# docker rmi -f rockylinux:9
docker image prune
-f
--filter
"dangling=true"
||
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment