testsuite: skip tests requiring tty

Upstream thread:
http://mx.gw.com/pipermail/tcsh-bugs/2014-August/000896.html

Version: 6.18.01-12
This commit is contained in:
Pavel Raiskup 2014-08-27 16:29:58 +02:00
parent e28d3e79df
commit e6c2d010fe
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,56 @@
From f16c91f01e75975fcc00d40cce0383e4fdbce3c2 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Wed, 27 Aug 2014 16:19:51 +0200
Subject: [PATCH 15/15] Skip tests unable to run without tty
Upstream thread:
http://mx.gw.com/pipermail/tcsh-bugs/2014-August/000896.html
---
tests/commands.at | 2 +-
tests/lexical.at | 2 +-
tests/variables.at | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/commands.at b/tests/commands.at
index b2f0955..f5c3cbd 100644
--- a/tests/commands.at
+++ b/tests/commands.at
@@ -1203,7 +1203,7 @@ AT_SETUP([source])
AT_DATA([script.csh],
[[set var=$1
]])
-AT_CHECK([[tcsh -f -c 'source -h script.csh foo; history' \
+AT_CHECK([[test -t 0 || exit 77 ; tcsh -f -c 'source -h script.csh foo; history' \
| sed 's/ [^ ]* / TIME /']], ,
[ 1 TIME source -h script.csh foo ; history
2 TIME set var=$1
diff --git a/tests/lexical.at b/tests/lexical.at
index f5b1b0f..d15d6b0 100644
--- a/tests/lexical.at
+++ b/tests/lexical.at
@@ -33,7 +33,7 @@ AT_SETUP([Comments])
AT_CHECK([echo 'echo OK@%:@comment' | tcsh -f], , [OK
])
-AT_CHECK([tcsh -f -c 'echo @%:@no comment'], ,
+AT_CHECK([test -t 0 || exit 77 ; tcsh -f -c 'echo @%:@no comment'], ,
[@%:@no comment
])
diff --git a/tests/variables.at b/tests/variables.at
index 424e4da..d6dd6e7 100644
--- a/tests/variables.at
+++ b/tests/variables.at
@@ -319,7 +319,7 @@ AT_CLEANUP
AT_SETUP([$ edit])
-AT_CHECK([TERM=something tcsh -f -c 'echo $?edit'], ,
+AT_CHECK([test -t 0 || exit 77 ; TERM=something tcsh -f -c 'echo $?edit'], ,
[1
])
--
1.9.3

View File

@ -25,6 +25,7 @@ Patch34: tcsh-6.18.01-repeated-words-man.patch
Patch35: tcsh-6.18.01-elf-interpreter.patch
Patch36: tcsh-6.18.01-posix-exit-status-value.patch
Patch37: tcsh-6.18.01-reverse-history-handling-in-loops.patch
Patch38: tcsh-6.18.01-skip-tty-tests.patch
Provides: csh = %{version}
Provides: /bin/tcsh, /bin/csh
@ -133,6 +134,7 @@ fi
* Wed Aug 27 2014 Pavel Raiskup <praiskup@redhat.com> - 6.18.01-12
- use the %%autosetup macro
- enable testsuite in %%check
- skip tests which are not able to be run without tty
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.18.01-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild