Skip to content

Commit 5b1bdfd

Browse files
committed
updated to 1.0.5, fixed test
1 parent b080784 commit 5b1bdfd

4 files changed

Lines changed: 39 additions & 41 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ option(USE_INTERNAL_BOOST "Enforce using internal copy of boost libraries" OFF)
88

99
set (VERSION_MAJOR 1)
1010
set (VERSION_MINOR 0)
11-
set (VERSION_PATCH 4)
11+
set (VERSION_PATCH 5)
1212

1313
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
1414
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )

qore-process-module.spec

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,10 @@
1313
# get *suse release minor version without trailing zeros
1414
%define os_min %(echo %suse_version|rev|cut -b-2|rev|sed s/0*$//)
1515

16-
%if %suse_version > 1010
16+
%if %suse_version
1717
%define dist .opensuse%{os_maj}_%{os_min}
18-
%else
19-
%define dist .suse%{os_maj}_%{os_min}
20-
%endif
21-
22-
%endif
2318
%endif
2419

25-
# see if we can determine the distribution type
26-
%if 0%{!?dist:1}
27-
%define rh_dist %(if [ -f /etc/redhat-release ];then cat /etc/redhat-release|sed "s/[^0-9.]*//"|cut -f1 -d.;fi)
28-
%if 0%{?rh_dist}
29-
%define dist .rhel%{rh_dist}
30-
%else
31-
%define dist .unknown
3220
%endif
3321
%endif
3422

@@ -44,32 +32,29 @@
4432

4533
Summary: process module for Qore
4634
Name: qore-process-module
47-
Version: 1.0.4
35+
Version: 1.0.5
4836
Release: 1%{dist}
49-
%if 0%{?suse_version}
50-
License: LGPL-2.0+ or GPL-2.0+ or MIT
51-
%else
52-
License: LGPLv2+ or GPLv2+ or MIT
53-
%endif
54-
Group: Development/Languages
37+
License: LGPL-2.1-or-later
38+
Group: Development/Languages/Other
5539
URL: http://www.qore.org
5640
Source: https://github.com/qorelanguage/module-process/releases/download/release-%{version}/%{name}-%{version}.tar.bz2
5741
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
5842
Requires: /usr/bin/env
5943
Requires: qore-module-api-%{module_api}
60-
BuildRequires: cmake >= 3.12.4
44+
BuildRequires: cmake >= 3.5
6145
BuildRequires: gcc-c++
62-
BuildRequires: qore-devel >= 1.0
63-
BuildRequires: qore >= 1.0
46+
BuildRequires: qore-devel >= 1.12.4
47+
BuildRequires: qore-stdlib >= 1.12.4
48+
BuildRequires: qore >= 1.12.4
6449
BuildRequires: openssl-devel
50+
BuildRequires: doxygen
6551
%if 0%{?el7}
6652
BuildRequires: devtoolset-7-gcc-c++
6753
%endif
6854

6955
%description
7056
process API module for the Qore Programming Language.
7157

72-
7358
%if 0%{?suse_version}
7459
%debug_package
7560
%endif
@@ -82,16 +67,18 @@ process API module for the Qore Programming Language.
8267
# enable devtoolset7
8368
. /opt/rh/devtoolset-7/enable
8469
%endif
85-
#%cmake -DCPPFLAGS=-I../3rd_party
86-
#%cmake_build
8770
export CXXFLAGS="%{?optflags}"
8871
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DCMAKE_SKIP_RPATH=1 -DCMAKE_SKIP_INSTALL_RPATH=1 -DCMAKE_SKIP_BUILD_RPATH=1 -DCMAKE_PREFIX_PATH=${_prefix}/lib64/cmake/Qore .
8972
make %{?_smp_mflags}
73+
make %{?_smp_mflags} docs
74+
sed -i 's/#!\/usr\/bin\/env qore/#!\/usr\/bin\/qore/' test/*.qtest
9075

9176
%install
92-
#%cmake_install
9377
make DESTDIR=%{buildroot} install %{?_smp_mflags}
9478

79+
%check
80+
qore -l ./process-api-1.3.qmod test/process.qtest -v
81+
9582
%clean
9683
rm -rf $RPM_BUILD_ROOT
9784

@@ -100,7 +87,22 @@ rm -rf $RPM_BUILD_ROOT
10087
%{module_dir}
10188
%doc COPYING README test/process.qtest test/test_cwd.q test/test_env.q test/test_false.q test/test_io.q test/test_output.q test/test_sleep.q test/test_true.q test/test_utf8.q
10289

90+
%package doc
91+
Summary: Documentation and examples for the Qore process module
92+
Group: Development/Languages/Other
93+
94+
%description doc
95+
This package contains the HTML documentation and example programs for the Qore
96+
process module.
97+
98+
%files doc
99+
%defattr(-,root,root,-)
100+
%doc docs/process test
101+
103102
%changelog
103+
* Mon Dec 19 2022 David Nichols <david.nichols@qoretechnologies.com>
104+
- updated to version 1.0.5
105+
104106
* Mon Jan 10 2022 David Nichols <david.nichols@qoretechnologies.com>
105107
- updated to version 1.0.4
106108

src/process.qpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)
5353

5454
@section process_relnotes Process Module Release History
5555

56+
@subsection process_v1_0_5 process v1.0.5
57+
- Updated to build with \c qpp from %Qore 1.12.4+
58+
5659
@subsection process_v1_0_4 process v1.0.4
5760
- added missing exception handling to @ref Qore::Process::Process::constructor() "Process::constructor()" to avoid
5861
a crash due to unhandled C++ exceptions due to resource errors starting processes

test/process.qtest

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -526,19 +526,12 @@ public class Main inherits QUnit::Test {
526526
);
527527
}
528528

529-
try {
530-
hash<auto> opts = {
531-
"path": (m_prefix,),
532-
"on_success": sub (int i) {},
533-
};
534-
Process p(getTestValue("testTrue"), opts);
535-
} catch (hash<ExceptionInfo> ex) {
536-
assertEq("RUNTIME-TYPE-ERROR", ex.err, "on_success using code with no hash as arg: err");
537-
assertEq("parameter 1 ('i') expects type 'int', but got type 'hash' instead",
538-
ex.desc,
539-
"on_success using code with no hash as arg: desc"
540-
);
541-
}
529+
hash<auto> opts = {
530+
"path": (m_prefix,),
531+
"on_success": sub (int i) {},
532+
};
533+
assertThrows("RUNTIME-TYPE-ERROR", "parameter 1 \\('i'\\) expects type 'int', but got type 'hash<auto>' "
534+
"instead", sub () { Process p(getTestValue("testTrue"), opts); });
542535
}
543536

544537
threadTest() {

0 commit comments

Comments
 (0)