From 48b15bf2eb35edbd9b6b328d68c5fa96d905a685 Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Tue, 27 Jul 2021 18:28:14 +0100 Subject: app-backup/borgmatic: get rid of vim dependency in tests Already merged upstream so will no longer be needed come 1.5.17. Signed-off-by: Marek Szuba --- app-backup/borgmatic/borgmatic-1.5.16.ebuild | 3 +- .../files/borgmatic-1.5.16-tests_no_vim_dep.patch | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 app-backup/borgmatic/files/borgmatic-1.5.16-tests_no_vim_dep.patch (limited to 'app-backup') diff --git a/app-backup/borgmatic/borgmatic-1.5.16.ebuild b/app-backup/borgmatic/borgmatic-1.5.16.ebuild index 72cfe91c89cb..faca0182b6c8 100644 --- a/app-backup/borgmatic/borgmatic-1.5.16.ebuild +++ b/app-backup/borgmatic/borgmatic-1.5.16.ebuild @@ -25,10 +25,8 @@ RDEPEND="app-backup/borgbackup dev-python/requests[${PYTHON_USEDEP}] +Date: Tue, 27 Jul 2021 13:46:51 +0100 +Subject: [PATCH] tests/integration/test_execute: use plain Python rather than + xxd + +Removes this test's dependencies on vim and /dev/urandom. + +Signed-off-by: Marek Szuba +--- + tests/integration/test_execute.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/integration/test_execute.py b/tests/integration/test_execute.py +index 6dc6467..3b9bef9 100644 +--- a/tests/integration/test_execute.py ++++ b/tests/integration/test_execute.py +@@ -1,5 +1,6 @@ + import logging + import subprocess ++import sys + + import pytest + from flexmock import flexmock +@@ -134,7 +135,8 @@ def test_log_outputs_vents_other_processes_when_one_exits(): + flexmock(module).should_receive('command_for_process').and_return('grep') + + process = subprocess.Popen( +- ['xxd', '-l', '40000', '-p', '/dev/urandom'], stdout=subprocess.PIPE, stderr=subprocess.PIPE ++ [sys.executable, '-c', "import random, string; print(''.join(random.choice(string.ascii_letters) for _ in range(40000)))"], ++ stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + other_process = subprocess.Popen( + ['true'], stdin=process.stdout, stdout=subprocess.PIPE, stderr=subprocess.STDOUT -- cgit v1.2.3-65-gdbad