File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,15 @@ Depends on `tag` as some tests might need to have the images tagged (s2i).
38
38
Similar to ` make test ` but runs testsuite for Openshift, expected to be found at
39
39
` $gitroot/$version/test/run-openshift `
40
40
41
+ ` make test-with-conu `
42
+ The rule is similar to ` make test ` . It runs a test suite written using [ conu
43
+ library] ( https://github.com/user-cont/conu ) . The path to the test script is
44
+ meant to be at ` $gitroot/$version/test/run-conu ` . By default the test suite is
45
+ being run in the current environment. You can also run the tests in a container
46
+ by defining variable ` CONU_IMAGE ` . Container images with conu are available in
47
+ [ this docker hub repository] ( docker.io/usercont/conu:0.6.2 ) , a good value for
48
+ the variable is ` docker.io/usercont/conu:0.6.2 ` .
49
+
41
50
` make clean `
42
51
Runs scripts that clean-up the working dir. Depends on the ` clean-images ` rule by default
43
52
and additional clean rules can be provided through the ` clean-hook ` variable.
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ test: script_env += TEST_MODE=true
87
87
test : tag
88
88
VERSIONS=" $( VERSIONS) " $(script_env ) $(test )
89
89
90
+ .PHONY : test-with-conu
91
+ test-with-conu : script_env += TEST_CONU_MODE=true
92
+ test-with-conu : tag
93
+ VERSIONS=" $( VERSIONS) " $(script_env ) $(test )
94
+
90
95
.PHONY : test-openshift
91
96
test-openshift : script_env += TEST_OPENSHIFT_MODE=true
92
97
test-openshift : tag
Original file line number Diff line number Diff line change @@ -19,6 +19,32 @@ for dir in ${VERSIONS}; do
19
19
VERSION=$dir test/run
20
20
fi
21
21
22
+ if [ -n " ${TEST_CONU_MODE} " ]; then
23
+ if [[ -x test/run-conu ]]; then
24
+ if [ -n " $CONU_IMAGE " ]; then
25
+ docker run \
26
+ --net=host \
27
+ -e VERSION=$dir \
28
+ -e IMAGE_NAME \
29
+ --rm -v /dev:/dev:ro \
30
+ -v /var/lib/docker:/var/lib/docker:ro \
31
+ --security-opt label=disable \
32
+ --cap-add SYS_ADMIN \
33
+ -ti \
34
+ -v /var/run/docker.sock:/var/run/docker.sock \
35
+ -v ${PWD} /../:/src \
36
+ -w /src/${dir} / \
37
+ -ti \
38
+ $CONU_IMAGE \
39
+ ./test/run-conu
40
+ else
41
+ VERSION=$dir ./test/run-conu
42
+ fi
43
+ else
44
+ echo " -> conu tests are not present, skipping"
45
+ fi
46
+ fi
47
+
22
48
if [ -n " ${TEST_OPENSHIFT_MODE} " ]; then
23
49
if [[ -x test/run-openshift ]]; then
24
50
VERSION=$dir test/run-openshift
You can’t perform that action at this time.
0 commit comments