mirror of
https://github.com/containers/podman.git
synced 2025-06-23 10:38:20 +08:00
Merge pull request #13959 from cevich/fix_apiv2
Fix hang in apiv2 test_connect
This commit is contained in:
18
Makefile
18
Makefile
@ -616,18 +616,24 @@ remotesystem:
|
|||||||
fi;\
|
fi;\
|
||||||
exit $$rc
|
exit $$rc
|
||||||
|
|
||||||
.PHONY: localapiv2
|
.PHONY: localapiv2-bash
|
||||||
localapiv2:
|
localapiv2-bash:
|
||||||
# Order is important running python tests first causes the bash tests to fail, see 12-imagesMore
|
|
||||||
# FIXME order of tests should not matter
|
|
||||||
env PODMAN=./bin/podman stdbuf -o0 -e0 ./test/apiv2/test-apiv2
|
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 \
|
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
|
touch test/__init__.py
|
||||||
env CONTAINERS_CONF=$(CURDIR)/test/apiv2/containers.conf PODMAN=./bin/podman \
|
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
|
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
|
.PHONY: remoteapiv2
|
||||||
remoteapiv2:
|
remoteapiv2:
|
||||||
true
|
true
|
||||||
|
@ -20,6 +20,9 @@ use warnings;
|
|||||||
|
|
||||||
our $VERSION = '0.1';
|
our $VERSION = '0.1';
|
||||||
|
|
||||||
|
# Autoflush stdout
|
||||||
|
$| = 1;
|
||||||
|
|
||||||
# For debugging, show data structures using DumpTree($var)
|
# For debugging, show data structures using DumpTree($var)
|
||||||
#use Data::TreeDumper; $Data::TreeDumper::Displayaddress = 0;
|
#use Data::TreeDumper; $Data::TreeDumper::Displayaddress = 0;
|
||||||
|
|
||||||
|
@ -59,8 +59,11 @@ function _run_unit() {
|
|||||||
function _run_apiv2() {
|
function _run_apiv2() {
|
||||||
_bail_if_test_can_be_skipped test/apiv2
|
_bail_if_test_can_be_skipped test/apiv2
|
||||||
|
|
||||||
|
(
|
||||||
|
make localapiv2-bash
|
||||||
source .venv/requests/bin/activate
|
source .venv/requests/bin/activate
|
||||||
make localapiv2 |& logformatter
|
make localapiv2-python
|
||||||
|
) |& logformatter
|
||||||
}
|
}
|
||||||
|
|
||||||
function _run_compose() {
|
function _run_compose() {
|
||||||
|
@ -20,10 +20,6 @@ class Podman:
|
|||||||
cgroupfs = os.getenv("CGROUP_MANAGER", "systemd")
|
cgroupfs = os.getenv("CGROUP_MANAGER", "systemd")
|
||||||
self.cmd.append(f"--cgroup-manager={cgroupfs}")
|
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.anchor_directory = tempfile.mkdtemp(prefix="podman_restapi_")
|
||||||
self.cmd.append("--root=" + os.path.join(self.anchor_directory, "crio"))
|
self.cmd.append("--root=" + os.path.join(self.anchor_directory, "crio"))
|
||||||
self.cmd.append("--runroot=" + os.path.join(self.anchor_directory, "crio-run"))
|
self.cmd.append("--runroot=" + os.path.join(self.anchor_directory, "crio-run"))
|
||||||
|
Reference in New Issue
Block a user