projects
/
zchunk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41534a3
)
Add new test script for running a program and checking the ouput checksum
author
Jonathan Dieter
<jdieter@gmail.com>
Thu, 26 Jul 2018 13:56:02 +0000
(14:56 +0100)
committer
Jonathan Dieter
<jdieter@gmail.com>
Thu, 26 Jul 2018 13:56:02 +0000
(14:56 +0100)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
test/shacheck.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/test/shacheck.sh
b/test/shacheck.sh
new file mode 100755
(executable)
index 0000000..
3690b15
--- /dev/null
+++ b/
test/shacheck.sh
@@ -0,0
+1,13
@@
+#!/bin/sh
+"$1" "$2"
+if [ "$?" -ne 0 ]; then
+ exit 1
+fi
+
+ls -l
+
+CHKSUM=$(sha256sum "$3" | awk '{ print $1 }')
+if [ "$CHKSUM" != "$4" ]; then
+ echo "Checksum doesn't match"
+ exit 1
+fi