View | Details | Raw Unified | Return to bug 276071
Collapse All | Expand All

(-)b/devel/kyua/Makefile (-5 / +6 lines)
Lines 1-10 Link Here
1
PORTNAME=	kyua
1
PORTNAME=	kyua
2
PORTVERSION=	0.13
2
DISTVERSION=	0.13
3
PORTREVISION=	6
3
PORTREVISION=	7
4
PORTEPOCH=	3
4
PORTEPOCH=	3
5
CATEGORIES=	devel
5
CATEGORIES=	devel
6
MASTER_SITES=	https://github.com/jmmv/kyua/releases/download/${PORTNAME}-${PORTVERSION}/ \
7
		LOCAL/jmmv
8
6
9
MAINTAINER=	jmmv@FreeBSD.org
7
MAINTAINER=	jmmv@FreeBSD.org
10
COMMENT=	Testing framework for infrastructure software
8
COMMENT=	Testing framework for infrastructure software
Lines 14-20 LICENSE= BSD3CLAUSE Link Here
14
12
15
LIB_DEPENDS=	liblutok.so:devel/lutok
13
LIB_DEPENDS=	liblutok.so:devel/lutok
16
14
17
USES=		lua pkgconfig sqlite
15
USES=		autoreconf lua pkgconfig sqlite
16
USE_GITHUB=	yes
17
GH_ACCOUNT=	freebsd
18
GH_TAGNAME=	84c8ec8
18
USE_CXXSTD=	gnu++11
19
USE_CXXSTD=	gnu++11
19
20
20
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
(-)b/devel/kyua/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1472222340
1
TIMESTAMP = 1704159547
2
SHA256 (kyua-0.13.tar.gz) = db6e5d341d5cf7e49e50aa361243e19087a00ba33742b0855d2685c0b8e721d6
2
SHA256 (freebsd-kyua-0.13-84c8ec8_GH0.tar.gz) = 3d80730f9bc3ad23fa79cba5fe418c4b0ffc0326101ecce18441c1d18e26198f
3
SIZE (kyua-0.13.tar.gz) = 663776
3
SIZE (freebsd-kyua-0.13-84c8ec8_GH0.tar.gz) = 508997
(-)a/devel/kyua/files/patch-utils_datetime.cpp (-20 lines)
Removed Link Here
1
--- utils/datetime.cpp.orig	2016-08-26 10:09:37 UTC
2
+++ utils/datetime.cpp
3
@@ -590,11 +590,12 @@ datetime::timestamp::operator-=(const da
4
 datetime::delta
5
 datetime::timestamp::operator-(const datetime::timestamp& other) const
6
 {
7
-    if ((*this) < other) {
8
-        throw std::runtime_error(
9
-            F("Cannot subtract %s from %s as it would result in a negative "
10
-              "datetime::delta, which are not supported") % other % (*this));
11
-    }
12
+    /*
13
+     * XXX-BD: gettimeofday isn't necessicarily monotonic so return the
14
+     * smallest non-zero delta if time went backwards.
15
+     */
16
+    if ((*this) < other)
17
+        return datetime::delta::from_microseconds(1);
18
     return datetime::delta::from_microseconds(to_microseconds() -
19
                                               other.to_microseconds());
20
 }
(-)a/devel/kyua/files/patch-utils_datetime__test.cpp (-19 lines)
Removed Link Here
1
--- utils/datetime_test.cpp.orig	2016-08-26 10:09:37 UTC
2
+++ utils/datetime_test.cpp
3
@@ -532,11 +532,11 @@ ATF_TEST_CASE_BODY(timestamp__subtractio
4
     ATF_REQUIRE_EQ(datetime::delta(100, 0), ts3 - ts1);
5
     ATF_REQUIRE_EQ(datetime::delta(99, 999988), ts3 - ts2);
6
 
7
-    ATF_REQUIRE_THROW_RE(
8
-        std::runtime_error,
9
-        "Cannot subtract 1291970850123456us from 1291970750123468us "
10
-        ".*negative datetime::delta.*not supported",
11
-        ts2 - ts3);
12
+    /*
13
+     * NOTE (ngie): behavior change for
14
+     * https://github.com/jmmv/kyua/issues/155 .
15
+     */
16
+    ATF_REQUIRE_EQ(datetime::delta::from_microseconds(1), ts2 - ts3);
17
 }
18
 
19
 
(-)b/devel/kyua/pkg-plist (+1 lines)
Lines 160-165 man/man5/kyuafile.5.gz Link Here
160
%%TEST%%tests/kyua/utils/process/child_test
160
%%TEST%%tests/kyua/utils/process/child_test
161
%%TEST%%tests/kyua/utils/process/deadline_killer_test
161
%%TEST%%tests/kyua/utils/process/deadline_killer_test
162
%%TEST%%tests/kyua/utils/process/exceptions_test
162
%%TEST%%tests/kyua/utils/process/exceptions_test
163
%%TEST%%tests/kyua/utils/process/executor_pid_test
163
%%TEST%%tests/kyua/utils/process/executor_test
164
%%TEST%%tests/kyua/utils/process/executor_test
164
%%TEST%%tests/kyua/utils/process/fdstream_test
165
%%TEST%%tests/kyua/utils/process/fdstream_test
165
%%TEST%%tests/kyua/utils/process/helpers
166
%%TEST%%tests/kyua/utils/process/helpers

Return to bug 276071