test_driver.c 446 B

123456789101112131415161718
  1. #include <tomcrypt_test.h>
  2. void run_cmd(int res, int line, char *file, char *cmd, const char *algorithm)
  3. {
  4. if (res != CRYPT_OK) {
  5. fprintf(stderr, "%s (%d)%s%s\n%s:%d:%s\n",
  6. error_to_string(res), res,
  7. (algorithm ? " - " : ""), (algorithm ? algorithm : ""),
  8. file, line, cmd);
  9. if (res != CRYPT_NOP) {
  10. exit(EXIT_FAILURE);
  11. }
  12. }
  13. }
  14. /* $Source$ */
  15. /* $Revision$ */
  16. /* $Date$ */