diff options
author | Devaev Maxim <[email protected]> | 2019-07-13 04:52:19 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-07-13 04:52:19 +0300 |
commit | ad97aecaf4d043c59d018310b4d8f4852d30b6e0 (patch) | |
tree | 90f6fbcdacc9aefd54cd093a77d337f1fb4543c9 /testenv | |
parent | dfe58d81efcc14b4ff8a3e6e2204bfdcce7a620b (diff) |
new ustreamer and fps max
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/Dockerfile | 11 | ||||
-rw-r--r-- | testenv/main.yaml | 5 | ||||
-rw-r--r-- | testenv/tests/validators/test_kvm.py | 4 | ||||
-rw-r--r-- | testenv/tox.ini | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/testenv/Dockerfile b/testenv/Dockerfile index 41bdf976..ba8a71ee 100644 --- a/testenv/Dockerfile +++ b/testenv/Dockerfile @@ -13,27 +13,30 @@ RUN pacman -Syu --noconfirm \ RUN useradd -r -c "Packer build user" -m -d /var/packer -s /sbin/nologin packer \ && cd /tmp \ - && sudo -u packer git clone https://aur.archlinux.org/packer-kit.git \ + && sudo -u packer git clone https://github.com/pi-kvm/packer-kit.git \ && cd packer-kit \ && sudo -u packer makepkg \ && pacman --noconfirm -U packer-kit-*.pkg.tar.xz \ && cd - \ && rm -rf /tmp/packer-kit -RUN pkg-install \ +RUN pkg-install -S \ python \ python-pip \ python-tox \ python-systemd \ python-dbus \ python-mako \ - libevent-patched \ nginx-mainline \ - ustreamer \ socat \ htmlhint \ eslint +ARG USTREAMER_VERSION +ENV USTREAMER_VERSION $USTREAMER_VERSION +RUN echo $USTREAMER_VERSION +RUN pkg-install -S ustreamer + COPY testenv/requirements.txt requirements.txt RUN pip install -r requirements.txt diff --git a/testenv/main.yaml b/testenv/main.yaml index eaa2917b..f7ef220d 100644 --- a/testenv/main.yaml +++ b/testenv/main.yaml @@ -26,14 +26,15 @@ kvmd: cap_pin: 17 conv_pin: 18 init_restart_after: 1 + desired_fps: 30 + max_fps: 40 unix: /run/kvmd/ustreamer.sock cmd: - "/usr/bin/ustreamer" - "--device=/dev/kvmd-video" - "--quality={quality}" - "--desired-fps={desired_fps}" - - "--width=800" - - "--height=600" + - "--resolution=800x600" - "--unix={unix}" - "--unix-rm" - "--unix-mode=0666" diff --git a/testenv/tests/validators/test_kvm.py b/testenv/tests/validators/test_kvm.py index a15a3168..920dcb10 100644 --- a/testenv/tests/validators/test_kvm.py +++ b/testenv/tests/validators/test_kvm.py @@ -104,14 +104,14 @@ def test_fail__valid_stream_quality(arg: Any) -> None: # ===== [email protected]("arg", ["1 ", 30]) [email protected]("arg", ["1 ", 120]) def test_ok__valid_stream_fps(arg: Any) -> None: value = valid_stream_fps(arg) assert type(value) == int # pylint: disable=unidiomatic-typecheck assert value == int(str(arg).strip()) [email protected]("arg", ["test", "", None, 31, 1.1]) [email protected]("arg", ["test", "", None, 121, 1.1]) def test_fail__valid_stream_fps(arg: Any) -> None: with pytest.raises(ValidatorError): print(valid_stream_fps(arg)) diff --git a/testenv/tox.ini b/testenv/tox.ini index 08d4d905..4baf7548 100644 --- a/testenv/tox.ini +++ b/testenv/tox.ini @@ -54,7 +54,7 @@ deps = [testenv:eslint] whitelist_externals = eslint -commands = eslint --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js +commands = eslint --cache-location=/tmp --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js [testenv:htmlhint] whitelist_externals = htmlhint |