From: Arkadiusz Miƛkiewicz Date: Thu, 7 Jul 2011 20:55:39 +0000 (+0000) Subject: - skip some tests if not run with a terminal X-Git-Tag: auto/th/mksh-40-3~2 X-Git-Url: https://git.pld-linux.org/gitweb.cgi?p=packages%2Fmksh.git;a=commitdiff_plain;h=1281d6804023839dabb71ba3821cd0987fb49edc - skip some tests if not run with a terminal Changed files: mksh.spec -> 1.22 --- diff --git a/mksh.spec b/mksh.spec index 3f5be09..d5eba4e 100644 --- a/mksh.spec +++ b/mksh.spec @@ -93,7 +93,16 @@ CFLAGS="%{rpmcppflags} %{rpmcflags}" \ 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} @@ -102,7 +111,7 @@ CFLAGS="%{rpmcppflags} %{rpmcflags}" \ 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