diff options
| author | Szczepan Zalega <szczepan@nitrokey.com> | 2019-01-07 15:18:50 +0100 | 
|---|---|---|
| committer | Szczepan Zalega <szczepan@nitrokey.com> | 2019-01-07 15:19:03 +0100 | 
| commit | 0abaa62498f491423c5b0945fcfac224e2f74b0f (patch) | |
| tree | 132c7b3a5470ebafc79831c575e1e1c61a077aa5 | |
| parent | 9dfec9a838aa77c2fe2110b32adc1da5b8e1d85c (diff) | |
| download | libnitrokey-0abaa62498f491423c5b0945fcfac224e2f74b0f.tar.gz libnitrokey-0abaa62498f491423c5b0945fcfac224e2f74b0f.tar.bz2  | |
Wrapper - allow to set delay, and check gpg2 output #137
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| -rwxr-xr-x | build/test_137-wrapper | 40 | 
1 files changed, 30 insertions, 10 deletions
diff --git a/build/test_137-wrapper b/build/test_137-wrapper index be501cd..98ac0d0 100755 --- a/build/test_137-wrapper +++ b/build/test_137-wrapper @@ -1,10 +1,30 @@ -#!/bin/bash -gpg2 --decrypt Makefile.gpg | wc -lc -sleep 1 -./test_137 -s -sleep 1 -gpg2 --decrypt Makefile.gpg | wc -lc -sleep 1 -./test_137 -s -gpg2 --version -git describe --long +#!/bin/make -f + +# Needs set beforehand: +# - RSA key generated on the device +# - public key stored locally (it will be, if it was generated on this PC) +# - prepared test.gpg file with: `gpg2 --encrypt test` +# +# Running: +# ./test_137-wrapper # DELAY defaults to '1' +# make -f ./test_137-wrapper DELAY=90 + +DELAY ?= 1 +test: +	echo "DELAY=${DELAY}" +	gpg2 --version +	git describe --long +	echo "start" +	./test_137 -s +	sleep ${DELAY} +	[[ `gpg2 --decrypt test.gpg | wc -c` -gt 0 ]] +	sleep ${DELAY} +	./test_137 -s +	sleep ${DELAY} +	[[ `gpg2 --decrypt test.gpg | wc -c` -gt 0 ]] +	sleep ${DELAY} +	./test_137 -s + + +.PHONY: test +  | 
