Exit with a non-zero exit status when the test suite detects any errors
authorTheodore Tso <tytso@mit.edu>
Wed, 19 Oct 1994 15:58:23 +0000 (15:58 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 19 Oct 1994 15:58:23 +0000 (15:58 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4538 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/asn.1/ChangeLog
src/tests/asn.1/debug.h
src/tests/asn.1/krb5_decode_test.c
src/tests/asn.1/krb5_encode_test.c

index 7c1bdf9fc4e4911375dd10836616d2692b85abb5..38075026b49051d4808ada1b976edfc2a8f9b002 100644 (file)
@@ -1,5 +1,10 @@
 Wed Oct 19 00:11:43 1994  Theodore Y. Ts'o  (tytso@maytag)
 
+       * debug.h (assert):
+         krb5_encode_test.c (main):
+         krb5_decode_test.c (main): Exit with a non-zero exit status when
+                 the test suite detects errors.
+
        * ktest.c (ktest_destroy_enc_data): Clear the kvno field when
                destroying the encrypted data.
 
index 2c9cf81052d8d8f95c2b261f3dfd6cdbca57a6cd..d0f05de1d5811bbe59e424b8614fbc80aea91876 100644 (file)
@@ -14,7 +14,7 @@
 
 #define assert(pred,message)\
   if(pred) printf("OK: ");\
-  else printf("ERROR: ");\
+  else { printf("ERROR: "); error_count++; }\
   printf(message);
 
 #endif
index af3369366bbc78b2b82ece46f435df3aa754d7c9..8383f11abcb06cffd87fa0674e9670824d03119c 100644 (file)
@@ -8,8 +8,7 @@
 #include "debug.h"
 #include <string.h>
 
-/* See krb5_encode_test.c for explanation. */
-/*#define ISODE_SUCKS*/
+int error_count = 0;
 
 void main()
 {
@@ -352,5 +351,5 @@ void main()
     decode_run("PasswdData","","30 3D A0 03 02 01 02 A1 36 30 34 30 18 A0 0A 04 08 6B 72 62 35 64 61 74 61 A1 0A 04 08 6B 72 62 35 64 61 74 61 30 18 A0 0A 04 08 6B 72 62 35 64 61 74 61 A1 0A 04 08 6B 72 62 35 64 61 74 61",decode_krb5_pwd_data,ktest_equal_krb5_pwd_data);
   }
 
-  exit(0);
+  exit(error_count);
 }
index 8dcb90b307487e3232779066925be635baedb498..ad9928221a4b63e1af3e93f70ac45135e346be3c 100644 (file)
@@ -9,11 +9,7 @@
 
 #include "debug.h"
 
-/* The ISODE routines crashed when certain fields were omitted (even
-   though they were optional).  My encoders should handle any NULL
-   fields (both optional and non-optional) gracefully, so this #define
-   is probably no longer needed. */
-/*#define ISODE_SUCKS*/
+int error_count = 0;
 
 void main()
 {
@@ -380,5 +376,5 @@ void main()
     encode_run(pd,krb5_pwd_data,"pwd_data","",encode_krb5_pwd_data);
   }
 
-  exit(0);
+  exit(error_count);
 }