ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Vladimir D. Seleznev" <vseleznv@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] как правильно использовать %check?
Date: Fri, 26 Jun 2020 04:24:53 +0300
Message-ID: <20200626012453.GA449914@portlab> (raw)
In-Reply-To: <20200625204628.GA876153@mw.mithraen.ru>

On Thu, Jun 25, 2020 at 11:46:28PM +0300, Денис Смирнов wrote:
> В сизифе уже один раз произошла грабля -- при очередной пересборке pandoc
> тихо перестал корректно работать с кириллицей, и это прошло незамеченным
> сходу.
> 
> Я хочу добавить простейшие тесты для pandoc, типа:
> 
> if [ $(echo тест | pandoc -t pdf | pdftotext - - | sed -s 's/[[:space:]]*//' | grep .) != "тест" ]; then
>     exit -1
> fi
> 
> как это сделать корректно? особенно с учётом того, что такой тест уже
> требует как минимум latex (коего нет в сборочных зависимостях pandoc).

Добавить требуемые для тестов зависимости в BuildRequires (рекомендую
обрамить эти зависимости %if_with check %endif), и в секции %check
написать код проверки.

Очевидно, что раз тестируются собранные исполняемые файлы, то и
вызываться они должны по пути, где были собраны, поэтому вызов pandoc не
подойдёт, так как будет искаться по путям в $PATH и в случае обнаружения
будет не тот файл.

-- 
   WBR,
   Vladimir D. Seleznev


  parent reply	other threads:[~2020-06-26  1:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 20:46 Денис Смирнов
2020-06-25 21:25 ` Paul Wolneykien
2020-06-26  0:59   ` Денис Смирнов
2020-06-26 16:06   ` Vitaly Lipatov
2020-06-29  2:38     ` Денис Смирнов
2020-06-29 12:39       ` Vitaly Lipatov
2020-06-29 14:52       ` Vladimir D. Seleznev
2020-06-29 15:28         ` Dmitry V. Levin
2020-06-29 15:40           ` Ivan Zakharyaschev
2020-06-29 15:59             ` Vladimir D. Seleznev
2020-06-29 17:05               ` Ivan Zakharyaschev
2020-06-29 15:58           ` Andrey Savchenko
2020-06-29 16:51             ` Vladimir D. Seleznev
2020-06-29 17:32               ` Dmitry V. Levin
2020-06-29  7:19     ` Michael Shigorin
2020-06-26  1:24 ` Vladimir D. Seleznev [this message]
2020-06-26  3:51   ` Денис Смирнов
2020-06-26 15:40     ` Mikhail Novosyolov
2020-06-26  9:11   ` Alexey V. Vissarionov
2020-06-26 10:26     ` Andrey Savchenko
2020-06-26 10:47       ` Alexey V. Vissarionov
2020-06-26 10:52         ` Andrey Savchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200626012453.GA449914@portlab \
    --to=vseleznv@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git