unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH] test: verify test database v1 checksum in more portable way
Date: Sun, 12 Mar 2017 20:31:55 +0200	[thread overview]
Message-ID: <20170312183155.12481-1-tomi.ollila@iki.fi> (raw)
In-Reply-To: <20170312125933.10316-1-tomi.ollila@iki.fi>

Replaced use of sha256 (gnu coreutils binary) with more portable
openssl sha256 execution.
---

Works on Linux and also on my FreeBSD KVM environment.

 test/T530-upgrade.sh                          | 6 ++++--
 test/test-databases/database-v1.tar.xz.sha256 | 1 -
 2 files changed, 4 insertions(+), 3 deletions(-)
 delete mode 100644 test/test-databases/database-v1.tar.xz.sha256

diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh
index f0fd151..bda3f98 100755
--- a/test/T530-upgrade.sh
+++ b/test/T530-upgrade.sh
@@ -12,8 +12,10 @@ fi
 
 test_begin_subtest "database checksum"
 test_expect_success \
-    '( cd $TEST_DIRECTORY/test-databases &&
-       sha256sum --quiet --check --status ${dbtarball}.sha256 )'
+    'case `openssl sha256 $TEST_DIRECTORY/test-databases/${dbtarball}` in
+	*4299e051b10e1fa7b33ea2862790a09ebfe96859681804e5251e130f800e69d2*) ;;
+	*) false ;;
+     esac'
 
 tar xf $TEST_DIRECTORY/test-databases/${dbtarball} -C ${MAIL_DIR} --strip-components=1
 
diff --git a/test/test-databases/database-v1.tar.xz.sha256 b/test/test-databases/database-v1.tar.xz.sha256
deleted file mode 100644
index 2cc4f96..0000000
--- a/test/test-databases/database-v1.tar.xz.sha256
+++ /dev/null
@@ -1 +0,0 @@
-4299e051b10e1fa7b33ea2862790a09ebfe96859681804e5251e130f800e69d2  database-v1.tar.xz
-- 
2.9.3

  reply	other threads:[~2017-03-12 18:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-12 12:59 [PATCH] test-databases: use wget or curl to download test databases Tomi Ollila
2017-03-12 18:31 ` Tomi Ollila [this message]
2017-03-12 22:33   ` [PATCH] test: verify test database v1 checksum in more portable way David Bremner
2017-03-13 19:32     ` Tomi Ollila
2017-03-14 15:39 ` [PATCH] test-databases: use wget or curl to download test databases David Bremner

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=20170312183155.12481-1-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).