[exim-cvs] Testsuite: add command cat2

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: add command cat2
Gitweb: https://git.exim.org/exim.git/commitdiff/f2259efecaf2978bc2baf9b7d9c012e3d01daea0
Commit:     f2259efecaf2978bc2baf9b7d9c012e3d01daea0
Parent:     78277ccae7b78f89799b5921b2c5e89c5c9a01f6
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Sep 8 09:59:52 2023 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Sep 8 09:59:52 2023 +0100


    Testsuite: add command cat2


    The /dev/stderr trick manages to fail on Gnu HURD
---
 test/Makefile.in             | 1 -
 test/runtest                 | 6 ++++++
 test/scripts/0000-Basic/0628 | 3 ++-
 test/scripts/0000-Basic/0629 | 2 +-
 test/scripts/0000-Basic/0630 | 2 +-
 test/scripts/0000-Basic/0631 | 2 +-
 6 files changed, 11 insertions(+), 5 deletions(-)


diff --git a/test/Makefile.in b/test/Makefile.in
index 4c09ce318..f7a2a4695 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -30,7 +30,6 @@ binaries:    $(BINARIES)
 sysbinaries:    FORCE binaries
         rm -f bin.sys/*
         bin/locate initdb postgres pg_ctl psql mysqld mysql
-        if [ -e /dev/stderr ]; then  ln -s /dev/stderr bin.sys/stderr; else ln -s /proc/self/fd/2 bin.sys/stderr; fi
         ls -la bin.sys


# Compile and link the programs:
diff --git a/test/runtest b/test/runtest
index 1730a9889..edaec6b25 100755
--- a/test/runtest
+++ b/test/runtest
@@ -2639,6 +2639,12 @@ if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ ||
run_system("$_ >>test-stdout 2>>test-stderr");
return 1;
}
+if (/^cat2\s/)
+ {
+ s/^cat2/cat/;
+ run_system("$_ 2>&1 >test-stderr");
+ return 1;
+ }



diff --git a/test/scripts/0000-Basic/0628 b/test/scripts/0000-Basic/0628
index cb8cdd76d..3748e075f 100644
--- a/test/scripts/0000-Basic/0628
+++ b/test/scripts/0000-Basic/0628
@@ -66,6 +66,7 @@ killdaemon
1
cat DIR/spool/log/serverdebuglog_1
#
-cp DIR/spool/log/serverdebuglog_2 DIR/bin.sys/stderr
+# copy this file to stderr
+cat2 DIR/spool/log/serverdebuglog_2
#
no_msglog_check
diff --git a/test/scripts/0000-Basic/0629 b/test/scripts/0000-Basic/0629
index a4219d038..8ca41aeae 100644
--- a/test/scripts/0000-Basic/0629
+++ b/test/scripts/0000-Basic/0629
@@ -21,6 +21,6 @@ QUIT
#
killdaemon
#
-cp DIR/spool/log/serverdebuglog_rcpt DIR/bin.sys/stderr
+cat2 DIR/spool/log/serverdebuglog_rcpt
#
no_msglog_check
diff --git a/test/scripts/0000-Basic/0630 b/test/scripts/0000-Basic/0630
index b5a7c1e8d..fff689051 100644
--- a/test/scripts/0000-Basic/0630
+++ b/test/scripts/0000-Basic/0630
@@ -25,6 +25,6 @@ QUIT
#
killdaemon
#
-cp DIR/spool/log/serverdebuglog_router DIR/bin.sys/stderr
+cat2 DIR/spool/log/serverdebuglog_router
#
no_msglog_check
diff --git a/test/scripts/0000-Basic/0631 b/test/scripts/0000-Basic/0631
index 24c8efab9..32d6dc0fc 100644
--- a/test/scripts/0000-Basic/0631
+++ b/test/scripts/0000-Basic/0631
@@ -25,6 +25,6 @@ QUIT
#
killdaemon
#
-cp DIR/spool/log/serverdebuglog_acl DIR/bin.sys/stderr
+cat2 DIR/spool/log/serverdebuglog_acl
#
no_msglog_check

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/