From: Theodore Tso Date: Wed, 19 Oct 1994 15:58:23 +0000 (+0000) Subject: Exit with a non-zero exit status when the test suite detects any errors X-Git-Tag: krb5-1.0-beta5~1098 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=00978d76c1a57582b256a58cba9f0abd4d0bca3d;p=krb5.git Exit with a non-zero exit status when the test suite detects any errors git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4538 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/asn.1/ChangeLog b/src/tests/asn.1/ChangeLog index 7c1bdf9fc..38075026b 100644 --- a/src/tests/asn.1/ChangeLog +++ b/src/tests/asn.1/ChangeLog @@ -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. diff --git a/src/tests/asn.1/debug.h b/src/tests/asn.1/debug.h index 2c9cf8105..d0f05de1d 100644 --- a/src/tests/asn.1/debug.h +++ b/src/tests/asn.1/debug.h @@ -14,7 +14,7 @@ #define assert(pred,message)\ if(pred) printf("OK: ");\ - else printf("ERROR: ");\ + else { printf("ERROR: "); error_count++; }\ printf(message); #endif diff --git a/src/tests/asn.1/krb5_decode_test.c b/src/tests/asn.1/krb5_decode_test.c index af3369366..8383f11ab 100644 --- a/src/tests/asn.1/krb5_decode_test.c +++ b/src/tests/asn.1/krb5_decode_test.c @@ -8,8 +8,7 @@ #include "debug.h" #include -/* 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); } diff --git a/src/tests/asn.1/krb5_encode_test.c b/src/tests/asn.1/krb5_encode_test.c index 8dcb90b30..ad9928221 100644 --- a/src/tests/asn.1/krb5_encode_test.c +++ b/src/tests/asn.1/krb5_encode_test.c @@ -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); }