Skip to content

Commit af3a81e

Browse files
Kenta TadaKenta Tada
authored andcommitted
Add rootless testpath in Makefile
This commit modifies Makefile for rootless test to select testpath. Signed-off-by: Kenta Tada <[email protected]>
1 parent 6503438 commit af3a81e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ localintegration: all
7979
bats -t tests/integration${TESTPATH}
8080

8181
rootlessintegration: runcimage
82-
$(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localrootlessintegration
82+
$(CONTAINER_ENGINE) run -e ROOTLESS_TESTPATH ${CONTAINER_ENGINE_RUN_FLAGS} -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localrootlessintegration
8383

8484
localrootlessintegration: all
8585
tests/rootless.sh

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ You can run a specific integration test by setting the `TESTPATH` variable.
9999
# make test TESTPATH="/checkpoint.bats"
100100
```
101101

102+
You can run a specific rootless integration test by setting the `ROOTLESS_TESTPATH` variable.
103+
104+
```bash
105+
# make test ROOTLESS_TESTPATH="/checkpoint.bats"
106+
```
107+
102108
You can run a test using your container engine's flags by setting `CONTAINER_ENGINE_BUILD_FLAGS` and `CONTAINER_ENGINE_RUN_FLAGS` variables.
103109

104110
```bash

tests/rootless.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ do
120120
set -e
121121
echo path: $PATH
122122
export ROOTLESS_FEATURES="$enabled_features"
123-
sudo -HE -u rootless PATH="$PATH" bats -t "$ROOT/tests/integration$TESTFLAGS"
123+
sudo -HE -u rootless PATH="$PATH" bats -t "$ROOT/tests/integration$ROOTLESS_TESTPATH"
124124
set +e
125125
done

0 commit comments

Comments
 (0)