Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 May 2017 14:40:00 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r439949 - in head/sysutils/xe: . files
Message-ID:  <201705021440.v42Ee0Wp002353@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Tue May  2 14:40:00 2017
New Revision: 439949
URL: https://svnweb.freebsd.org/changeset/ports/439949

Log:
  Update to 0.7.0
  
  - Fix and enable tests
  
  Changes:	https://github.com/chneukirchen/xe/blob/v0.7.0/NEWS.md
  Approved by:	lme (mentor)
  Differential Revision:	https://reviews.freebsd.org/D10393

Added:
  head/sysutils/xe/files/patch-tests   (contents, props changed)
Modified:
  head/sysutils/xe/Makefile
  head/sysutils/xe/distinfo
  head/sysutils/xe/files/patch-xe.c

Modified: head/sysutils/xe/Makefile
==============================================================================
--- head/sysutils/xe/Makefile	Tue May  2 14:31:53 2017	(r439948)
+++ head/sysutils/xe/Makefile	Tue May  2 14:40:00 2017	(r439949)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	xe
-PORTVERSION=	0.6.1
+PORTVERSION=	0.7.0
 DISTVERSIONPREFIX=	v
 CATEGORIES=	sysutils
 
@@ -11,11 +11,14 @@ COMMENT=	Simple xargs and apply replacem
 
 LICENSE=	CC0-1.0
 
+TEST_DEPENDS=	prove:lang/perl5.24
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	chneukirchen
 
 MAKE_ARGS=	CFLAGS="${CFLAGS}" \
 		MANDIR="${PREFIX}/man"
+TEST_TARGET=	check
 
 PLIST_FILES=	bin/xe \
 		man/man1/xe.1.gz

Modified: head/sysutils/xe/distinfo
==============================================================================
--- head/sysutils/xe/distinfo	Tue May  2 14:31:53 2017	(r439948)
+++ head/sysutils/xe/distinfo	Tue May  2 14:40:00 2017	(r439949)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1469327893
-SHA256 (chneukirchen-xe-v0.6.1_GH0.tar.gz) = 36036d0e9464233d3113af187c473491298ed1168976330d7dd615b8f0521b96
-SIZE (chneukirchen-xe-v0.6.1_GH0.tar.gz) = 6889
+TIMESTAMP = 1492163693
+SHA256 (chneukirchen-xe-v0.7.0_GH0.tar.gz) = 32af920a2d27ed0bb8bcb69339fcc805110888e872c92a372d3888df52b300f8
+SIZE (chneukirchen-xe-v0.7.0_GH0.tar.gz) = 7047

Added: head/sysutils/xe/files/patch-tests
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/xe/files/patch-tests	Tue May  2 14:40:00 2017	(r439949)
@@ -0,0 +1,49 @@
+Fix tests
+
+- -A% with no arguments fails now with the additional checks in 0.7.0
+- Trying to exec /dev/null/calc.exe on FreeBSD will fail with ENOENT
+  (xe exit 127) but on Linux fails with ENODIR (xe exit 126)
+- The argscap check returns 8186 + 8186 + 1339 = 17711 on FreeBSD,
+  which should be fine.
+
+--- tests.orig	2017-04-13 15:28:38 UTC
++++ tests
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-printf '1..42\n'
++printf '1..41\n'
+ 
+ set -e
+ 
+@@ -127,9 +127,6 @@ check_output 'using -A%' '$XE -A% echo -
+ -- 3
+ EOF
+ 
+-check_output 'using -A% with no arguments' '$XE -A% echo' <<EOF
+-EOF
+-
+ check_output 'using -A% with no command' '$XE -N2 -A% % 1 2 3' <<EOF
+ 1
+ 2
+@@ -196,7 +193,7 @@ check_output 'exit code when process was
+ 125
+ EOF
+ 
+-check_output 'exit code when command cannot be run' 'necho a | $XE /dev/null/calc.exe 2>/dev/null || echo $?' <<EOF
++check_output 'exit code when command cannot be run' 'necho a | $XE /dev/null 2>/dev/null || echo $?' <<EOF
+ 126
+ EOF
+ 
+@@ -236,10 +233,8 @@ EOF
+ 
+ printf '# limit checks, expecting maximal POSIX limits available\n'
+ 
+-check_output 'argscap check' 'head -c 17711 /dev/zero | tr "\0" "\012" | $XE -N0 -s "echo \$#"' <<EOF
+-8187
+-8187
+-1337
++check_output 'argscap check' 'head -c 17711 /dev/zero | tr "\0" "\012" | $XE -N0 -s "echo \$#" | awk "{sum+=\$0}END{print sum}"' <<EOF
++17711
+ EOF
+ 
+ bloat() { perl -e 'print "x"x8000, "\n" for 1..42'; }

Modified: head/sysutils/xe/files/patch-xe.c
==============================================================================
--- head/sysutils/xe/files/patch-xe.c	Tue May  2 14:31:53 2017	(r439948)
+++ head/sysutils/xe/files/patch-xe.c	Tue May  2 14:40:00 2017	(r439949)
@@ -1,6 +1,6 @@
---- xe.c.orig	2016-05-20 18:14:18 UTC
+--- xe.c.orig	2017-04-13 15:28:38 UTC
 +++ xe.c
-@@ -13,6 +13,7 @@
+@@ -12,6 +12,7 @@
  
  #include <limits.h>
  #include <errno.h>
@@ -8,7 +8,7 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
-@@ -100,7 +101,7 @@ mywait()
+@@ -99,7 +100,7 @@ mywait()
  		} else if (WEXITSTATUS(status) > 125) {
  			exit(WEXITSTATUS(status));
  		}
@@ -17,7 +17,7 @@
  		fprintf(stderr, "xe: pid %d terminated by signal %d\n",
  		    pid, WTERMSIG(status));
  		exit(125);
-@@ -353,6 +354,7 @@ main(int argc, char *argv[], char *envp[
+@@ -358,6 +359,7 @@ main(int argc, char *argv[], char *envp[
  			pusharg("/bin/sh");
  			pusharg("-c");
  			pusharg(sflag);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705021440.v42Ee0Wp002353>