From: Craig Small Date: Mon, 11 Jan 2021 10:33:09 +0000 (+1100) Subject: build-sys: Update the dejagnu stuff X-Git-Tag: v23.4rc1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99dff6dbcba7d62dad5d2d20743a084a9c4e3190;p=psmisc build-sys: Update the dejagnu stuff --- diff --git a/.gitignore b/.gitignore index 5dca292..422c9a1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ *.swp .version autom4te.cache/ -config/ +^/config/ cov-int/ m4/ ABOUT-NLS diff --git a/configure.ac b/configure.ac index 72e8ea2..182a0df 100644 --- a/configure.ac +++ b/configure.ac @@ -4,8 +4,8 @@ AC_CONFIG_MACRO_DIR([m4]) AC_INIT([psmisc], m4_esyscmd([misc/git-version-gen .tarball-version]), ,,,[https://www.gitlab.com/psmisc/psmisc]) -AM_INIT_AUTOMAKE([foreign 1.11 dejagnu subdir-objects -Wall -Wno-portability tar-pax no-dist-gzip dist-xz]) -AM_SILENT_RULES([no]) +AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects -Wall -Wno-portability tar-pax no-dist-gzip dist-xz]) +AM_SILENT_RULES([yes]) AC_CONFIG_SRCDIR([src/comm.h]) AC_CONFIG_HEADERS([config.h]) diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 696a44a..207f645 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -10,4 +10,8 @@ if WANT_FUSER endif -EXTRA_DIST = +EXTRA_DIST = \ + config/unix.exp \ + fuser.test/fuser.exp \ + pslog.test/pslog.exp \ + killall.test/killall.exp diff --git a/testsuite/config/unix.exp b/testsuite/config/unix.exp index cd446c8..82cffab 100644 --- a/testsuite/config/unix.exp +++ b/testsuite/config/unix.exp @@ -3,6 +3,18 @@ regexp "(.*\/)testsuite" $objdir objdir topdir +proc psmisc_v_version { tool } { + global topdir + set toolpath ${topdir}src/${tool} + set tmp [ exec $toolpath -V 2>@1 ] + regexp {\(PSmisc\) ([0-9a-z.-]+)} $tmp dummy version + clone_output "$toolpath version $version\n" +} + +proc fuser_version {} { psmisc_v_version fuser } +proc killall_version {} { psmisc_v_version killall } +proc pslog_version {} { psmisc_v_version pslog } + proc expect_pass { testname reg } { expect { -re "$reg" { pass "$testname" }