summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-23 06:22:26 -0400
committerGitHub <noreply@github.com>2022-04-23 06:22:26 -0400
commit31231ffd748d10048e6541b18fd863a66342c6c7 (patch)
treee6d32a8ed6bb3328194f4c53d3967343f4d9d39a
parent1a768dbc089c91dda7f552cb89134be9fa498136 (diff)
parentad249222d254fec0be84b474906651936b89578b (diff)
downloadpodman-31231ffd748d10048e6541b18fd863a66342c6c7.tar.gz
podman-31231ffd748d10048e6541b18fd863a66342c6c7.tar.bz2
podman-31231ffd748d10048e6541b18fd863a66342c6c7.zip
Merge pull request #13959 from cevich/fix_apiv2
Fix hang in apiv2 test_connect
-rw-r--r--Makefile18
-rwxr-xr-xcontrib/cirrus/logformatter3
-rwxr-xr-xcontrib/cirrus/runner.sh7
-rw-r--r--test/apiv2/python/rest_api/fixtures/podman.py4
4 files changed, 20 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 502323906..982d7b1e5 100644
--- a/Makefile
+++ b/Makefile
@@ -616,18 +616,24 @@ remotesystem:
fi;\
exit $$rc
-.PHONY: localapiv2
-localapiv2:
- # Order is important running python tests first causes the bash tests to fail, see 12-imagesMore
- # FIXME order of tests should not matter
+.PHONY: localapiv2-bash
+localapiv2-bash:
env PODMAN=./bin/podman stdbuf -o0 -e0 ./test/apiv2/test-apiv2
+
+.PHONY: localapiv2-python
+localapiv2-python:
env CONTAINERS_CONF=$(CURDIR)/test/apiv2/containers.conf PODMAN=./bin/podman \
- pytest --disable-warnings ./test/apiv2/python
+ pytest --verbose --disable-warnings ./test/apiv2/python
touch test/__init__.py
env CONTAINERS_CONF=$(CURDIR)/test/apiv2/containers.conf PODMAN=./bin/podman \
- pytest --disable-warnings ./test/python/docker
+ pytest --verbose --disable-warnings ./test/python/docker
rm -f test/__init__.py
+# Order is important running python tests first causes the bash tests
+# to fail, see 12-imagesMore. FIXME order of tests should not matter
+.PHONY: localapiv2
+localapiv2: localapiv2-bash localapiv2-python
+
.PHONY: remoteapiv2
remoteapiv2:
true
diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter
index 3c52e612b..05f05dc0b 100755
--- a/contrib/cirrus/logformatter
+++ b/contrib/cirrus/logformatter
@@ -20,6 +20,9 @@ use warnings;
our $VERSION = '0.1';
+# Autoflush stdout
+$| = 1;
+
# For debugging, show data structures using DumpTree($var)
#use Data::TreeDumper; $Data::TreeDumper::Displayaddress = 0;
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index 8f956d7f5..aee9bcfbb 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -59,8 +59,11 @@ function _run_unit() {
function _run_apiv2() {
_bail_if_test_can_be_skipped test/apiv2
- source .venv/requests/bin/activate
- make localapiv2 |& logformatter
+ (
+ make localapiv2-bash
+ source .venv/requests/bin/activate
+ make localapiv2-python
+ ) |& logformatter
}
function _run_compose() {
diff --git a/test/apiv2/python/rest_api/fixtures/podman.py b/test/apiv2/python/rest_api/fixtures/podman.py
index c700571b9..f2db6f498 100644
--- a/test/apiv2/python/rest_api/fixtures/podman.py
+++ b/test/apiv2/python/rest_api/fixtures/podman.py
@@ -20,10 +20,6 @@ class Podman:
cgroupfs = os.getenv("CGROUP_MANAGER", "systemd")
self.cmd.append(f"--cgroup-manager={cgroupfs}")
- if os.getenv("DEBUG"):
- self.cmd.append("--log-level=debug")
- self.cmd.append("--syslog=true")
-
self.anchor_directory = tempfile.mkdtemp(prefix="podman_restapi_")
self.cmd.append("--root=" + os.path.join(self.anchor_directory, "crio"))
self.cmd.append("--runroot=" + os.path.join(self.anchor_directory, "crio-run"))