diff options
author | Bert Vermeulen <bert@biot.com> | 2013-12-11 21:53:17 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2013-12-11 21:53:17 +0100 |
commit | 932606db3cdb14518dac55c67f4ecc8471fb6a33 (patch) | |
tree | d7177d2b17b7dff59ee748eaaa72da1e81250693 /tests | |
parent | caa4b2cc0cdb34570e0fe8e5a6dad05a2988cc89 (diff) | |
download | libsigrokdecode-932606db3cdb14518dac55c67f4ecc8471fb6a33.tar.gz libsigrokdecode-932606db3cdb14518dac55c67f4ecc8471fb6a33.zip |
runtc: Return errorcode according to testcase result.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runtc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runtc.c b/tests/runtc.c index 04151f8..4276973 100644 --- a/tests/runtc.c +++ b/tests/runtc.c @@ -378,6 +378,7 @@ int main(int argc, char **argv) struct probe *probe; struct option *option; struct output *op; + int ret; char c, *opt_infile, **kv, **opstr; op = malloc(sizeof(struct output)); @@ -484,12 +485,14 @@ int main(int argc, char **argv) if (srd_init(DECODERS_DIR) != SRD_OK) return 1; - run_testcase(opt_infile, pdlist, op); + ret = 0; + if (!run_testcase(opt_infile, pdlist, op)) + ret = 1; srd_exit(); sr_exit(ctx); - return 0; + return ret; } |