summaryrefslogtreecommitdiff
path: root/libkmstest
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-12 21:48:35 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-13 17:56:08 +0200
commitb74ac168d91919f70f788d937a0ebe0b3ef58c61 (patch)
tree0e31f3db643eacd2e4c76496a087a69925f3fb04 /libkmstest
parent86b217128829b589f1d0f2dfa61743173dde4db3 (diff)
libkmstest: add EXIT()
Diffstat (limited to 'libkmstest')
-rw-r--r--libkmstest/test.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libkmstest/test.h b/libkmstest/test.h
index 2700024..3631f2c 100644
--- a/libkmstest/test.h
+++ b/libkmstest/test.h
@@ -24,3 +24,9 @@
fprintf(stderr, "%s:%d: %s:\n" fmt "\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__); \
abort(); \
}
+
+#define EXIT(fmt, ...) \
+ do { \
+ fprintf(stderr, fmt "\n", ##__VA_ARGS__); \
+ exit(-1); \
+ } while(0)