packages: mksh/mksh.spec - skip some tests if not run with a terminal

arekm arekm at pld-linux.org
Thu Jul 7 22:55:44 CEST 2011


Author: arekm                        Date: Thu Jul  7 20:55:44 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- skip some tests if not run with a terminal

---- Files affected:
packages/mksh:
   mksh.spec (1.21 -> 1.22) 

---- Diffs:

================================================================
Index: packages/mksh/mksh.spec
diff -u packages/mksh/mksh.spec:1.21 packages/mksh/mksh.spec:1.22
--- packages/mksh/mksh.spec:1.21	Thu Jul  7 22:25:56 2011
+++ packages/mksh/mksh.spec	Thu Jul  7 22:55:39 2011
@@ -94,7 +94,16 @@
 LDFLAGS="%{rpmldflags}" \
 sh ./Build.sh -Q -r -j
 
-%{?with_tests:./test.sh -v}
+# skip some tests if not on terminal
+if ! tty -s; then
+do_tests=$(awk '
+/^---/ { if (need_ctty == 0) { print name; }; need_ctty=0; }
+/^name:/ { name=$2; }
+/^need-ctty:/ { need_ctty=1; }
+' check.t)
+fi
+
+%{?with_tests:./test.sh -v $do_tests}
 mv mksh out/mksh.dynamic
 
 %if %{with static}
@@ -103,7 +112,7 @@
 LDFLAGS="%{rpmldflags} -static" \
 sh ./Build.sh -Q -r -j
 
-%{?with_tests:./test.sh -v}
+%{?with_tests:./test.sh -v $do_tests}
 mv mksh out/mksh.static
 %endif
 
@@ -155,6 +164,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.22  2011/07/07 20:55:39  arekm
+- skip some tests if not run with a terminal
+
 Revision 1.21  2011/07/07 20:25:56  arekm
 - rel 2; should be ready for general consumption
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mksh/mksh.spec?r1=1.21&r2=1.22&f=u



More information about the pld-cvs-commit mailing list