fixed ptest issue with sysbench. (#3451)

This commit is contained in:
SeanDougherty 2022-07-27 16:45:47 -07:00 коммит произвёл GitHub
Родитель cc182b23cd
Коммит 784542a1a1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 31 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,25 @@
From eec24b5cce5f9e4ff04a725306e393f987d743b8 Mon Sep 17 00:00:00 2001
From: Dennis Krupenik <dennis@krupenik.com>
Date: Tue, 8 Sep 2020 14:45:37 +0300
Subject: [PATCH] Prefer python3 to python2
Some distributions do not alias /usr/bin/python3 to /usr/bin/python
---
tests/test_run.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/test_run.sh b/tests/test_run.sh
index 669ed751..17ef0fac 100755
--- a/tests/test_run.sh
+++ b/tests/test_run.sh
@@ -86,6 +86,9 @@ export LUA_PATH
if $(command -v python >/dev/null 2>&1)
then
PYTHON=python
+elif $(command -v python3 >/dev/null 2>&1)
+then
+ PYTHON=python3
elif $(command -v python2 >/dev/null 2>&1)
then
PYTHON=python2

Просмотреть файл

@ -1,11 +1,12 @@
Summary: Scriptable database and system performance benchmark
Name: sysbench
Version: 1.0.20
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://github.com/akopytov/sysbench/
Source0: https://github.com/akopytov/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: enable-python3.patch
BuildRequires: automake
BuildRequires: libaio-devel
BuildRequires: libtool
@ -33,7 +34,7 @@ sysbench comes with the following bundled benchmarks:
- mutex: a POSIX mutex benchmark
%prep
%setup -q
%autosetup -p1
%build
autoreconf -vif
@ -58,6 +59,9 @@ rm -f %{buildroot}%{_docdir}/sysbench/manual.html
%{_datadir}/%{name}
%changelog
* Wed Jul 27 2022 Sean Dougherty <sdougherty@microsoft.com> - 1.0.20-2
- Added patch 'enable-python3' to fix issue with running tests on Python3.
* Mon Jul 18 2022 Sean Dougherty <sdougherty@microsoft.com> - 1.0.20-1
- Initial CBL-Mariner import from Sysbench source (license: GPLv2+)
- License verified.