]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* examples/Makefile.in (check): Pass $(EMULATOR) and $(EXEEXT) in
authorMartin Storsjö <martin@martin.st>
Thu, 24 Nov 2011 19:43:12 +0000 (20:43 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 24 Nov 2011 19:43:12 +0000 (20:43 +0100)
the environment of run-tests.
* examples/rsa-encrypt-test: Use $EXEEXT and $EMULATOR.
* examples/rsa-sign-test: Likewise.
* examples/rsa-verify-test: Likewise.
* examples/setup-env: Likewise.

Rev: nettle/examples/Makefile.in:1.10
Rev: nettle/examples/rsa-encrypt-test:1.2
Rev: nettle/examples/rsa-sign-test:1.2
Rev: nettle/examples/rsa-verify-test:1.2
Rev: nettle/examples/setup-env:1.2
Rev: nettle/examples/teardown-env:1.2

examples/Makefile.in
examples/rsa-encrypt-test
examples/rsa-sign-test
examples/rsa-verify-test
examples/setup-env
examples/teardown-env

index a3b07905e0dbaade694816fdf2bf5fefcb657f13..211600ed71640246a65f54e71cc3f2e521f6bd98 100644 (file)
@@ -75,7 +75,8 @@ $(TARGETS) : io.$(OBJEXT) ../libnettle.a
 
 check: $(TS_ALL)
        LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \
-         "$(srcdir)"/run-tests $(TS_ALL)
+         EMULATOR="$(EMULATOR)" EXEEXT="$(EXEEXT)" \
+          "$(srcdir)"/run-tests $(TS_ALL)
 
 Makefile: $(srcdir)/Makefile.in ../config.status
        cd .. && $(SHELL) ./config.status examples/$@
index 08b7a44700b4cbc38576eac0141a7e30172d6e65..ff935fb0abdc331686895602b3a94fad5b5abe7f 100755 (executable)
@@ -6,13 +6,13 @@ fi
 
 data="$srcdir/nettle-benchmark.c"
 
-if [ -x rsa-encrypt ] ; then
-  if ./rsa-encrypt -r rsa-decrypt testkey.pub < "$data" > testciphertext ; then
+if [ -x rsa-encrypt$EXEEXT ] ; then
+  if $EMULATOR ./rsa-encrypt -r rsa-decrypt$EXEEXT testkey.pub < "$data" > testciphertext ; then
     :
   else
     exit 1
   fi
-  if ./rsa-decrypt testkey < testciphertext > testcleartext ; then
+  if $EMULATOR ./rsa-decrypt testkey < testciphertext > testcleartext ; then
     :
   else
     exit 1
index 16212269fe5ff0e04b7896830b7c44ee840860db..99d90dfcf023721e72b4755a2b8d7103f5b632c9 100755 (executable)
@@ -6,8 +6,8 @@ fi
 
 data="$srcdir/nettle-benchmark.c"
 
-if [ -x rsa-sign ] ; then
-  if ./rsa-sign testkey < "$data" > testsignature ; then
+if [ -x rsa-sign$EXEEXT ] ; then
+  if $EMULATOR ./rsa-sign testkey < "$data" > testsignature ; then
     exit 0;
   else
     exit 1
index 765b61f5d71c23d0e40858960e6dcf98d165a167..13c143cb3f4cfe892540fc81aa41324777dabb99 100755 (executable)
@@ -6,21 +6,21 @@ fi
 
 data="$srcdir/nettle-benchmark.c"
 
-if [ -x rsa-verify ] ; then
-  ./rsa-sign testkey < "$data" > testsignature \
-    && ./rsa-verify testkey.pub testsignature < "$data" \
+if [ -x rsa-verify$EXEEXT ] ; then
+  $EMULATOR ./rsa-sign testkey < "$data" > testsignature \
+    && $EMULATOR ./rsa-verify testkey.pub testsignature < "$data" \
     || exit 1;
   
   # Try modifying the data
   sed s/128/129/ < "$data" >testdata
 
-  if ./rsa-verify testkey.pub testsignature < testdata 2>/dev/null; then
+  if $EMULATOR ./rsa-verify testkey.pub testsignature < testdata 2>/dev/null; then
     exit 1
   fi
   
   # Try modifying the signature
   sed s/1/2/ <testsignature > testsignature2
-  if ./rsa-verify testkey.pub testsignature2 < "$data" 2>/dev/null; then
+  if $EMULATOR ./rsa-verify testkey.pub testsignature2 < "$data" 2>/dev/null; then
     exit 1;
   fi
   exit 0
index 7588d6f88b19986051621334d463d9daf63a1979..3ebef2c8b7d5b673c96d88d64103df180b0edeae 100755 (executable)
@@ -2,6 +2,6 @@
 
 set -e
 
-if [ -x rsa-keygen ] ; then
-  ./rsa-keygen -r rsa-decrypt -o testkey || exit 1
+if [ -x rsa-keygen$EXEEXT ] ; then
+  $EMULATOR ./rsa-keygen -r rsa-decrypt$EXEEXT -o testkey || exit 1
 fi
index ce1a157bdb6994fc892b09a1d50d4a27940a2476..496c8cc5255245d5f63b3ac9a1acc799f6966e8a 100755 (executable)
@@ -1,6 +1,7 @@
 #! /bin/sh
 
-rm -rf testkey testkey.pub testsignature testsignature2 testdata \
+rm -rf testkey testkey.pub testsignature testsignature2 \
+    testdata testtmp \
     testciphertext testcleartext