Commit d086c120 authored by Reimar Döffinger's avatar Reimar Döffinger

Add coverage exclusions for test code.

For some of the code e.g. doing timing measurements there is no
real point in running regression testing on it, thus it should
not be counted against coverage.
Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 840ecc9e
...@@ -56,6 +56,7 @@ unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf, ...@@ -56,6 +56,7 @@ unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf,
} }
#ifdef TEST #ifdef TEST
// LCOV_EXCL_START
#include <string.h> #include <string.h>
#include "log.h" #include "log.h"
#include "timer.h" #include "timer.h"
...@@ -84,4 +85,5 @@ int main(int argc, char **argv) ...@@ -84,4 +85,5 @@ int main(int argc, char **argv)
av_log(NULL, AV_LOG_DEBUG, "%X (expected 50E6E508)\n", checksum); av_log(NULL, AV_LOG_DEBUG, "%X (expected 50E6E508)\n", checksum);
return checksum == 0x50e6e508 ? 0 : 1; return checksum == 0x50e6e508 ? 0 : 1;
} }
// LCOV_EXCL_STOP
#endif #endif
...@@ -259,6 +259,7 @@ int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) ...@@ -259,6 +259,7 @@ int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt)
} }
#ifdef TEST #ifdef TEST
// LCOV_EXCL_START
#include <string.h> #include <string.h>
#include "lfg.h" #include "lfg.h"
#include "log.h" #include "log.h"
...@@ -331,4 +332,5 @@ int main(int argc, char **argv) ...@@ -331,4 +332,5 @@ int main(int argc, char **argv)
} }
return err; return err;
} }
// LCOV_EXCL_STOP
#endif #endif
...@@ -100,6 +100,7 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size) ...@@ -100,6 +100,7 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
} }
#ifdef TEST #ifdef TEST
// LCOV_EXCL_START
#undef printf #undef printf
...@@ -161,4 +162,5 @@ int main(void) ...@@ -161,4 +162,5 @@ int main(void)
return error_count; return error_count;
} }
// LCOV_EXCL_STOP
#endif #endif
...@@ -337,6 +337,7 @@ void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) { ...@@ -337,6 +337,7 @@ void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) {
} }
#ifdef TEST #ifdef TEST
// LCOV_EXCL_START
#undef printf #undef printf
#undef rand #undef rand
#undef srand #undef srand
...@@ -443,4 +444,5 @@ int main(void) { ...@@ -443,4 +444,5 @@ int main(void) {
#endif #endif
return 0; return 0;
} }
// LCOV_EXCL_STOP
#endif #endif
...@@ -579,6 +579,7 @@ int av_expr_parse_and_eval(double *d, const char *s, ...@@ -579,6 +579,7 @@ int av_expr_parse_and_eval(double *d, const char *s,
} }
#if FF_API_OLD_EVAL_NAMES #if FF_API_OLD_EVAL_NAMES
// LCOV_EXCL_START
int av_parse_expr(AVExpr **expr, const char *s, int av_parse_expr(AVExpr **expr, const char *s,
const char * const *const_names, const char * const *const_names,
const char * const *func1_names, double (* const *funcs1)(void *, double), const char * const *func1_names, double (* const *funcs1)(void *, double),
...@@ -608,9 +609,11 @@ void av_free_expr(AVExpr *e) ...@@ -608,9 +609,11 @@ void av_free_expr(AVExpr *e)
{ {
av_expr_free(e); av_expr_free(e);
} }
// LCOV_EXCL_STOP
#endif /* FF_API_OLD_EVAL_NAMES */ #endif /* FF_API_OLD_EVAL_NAMES */
#ifdef TEST #ifdef TEST
// LCOV_EXCL_START
#undef printf #undef printf
#include <string.h> #include <string.h>
...@@ -723,4 +726,5 @@ int main(int argc, char **argv) ...@@ -723,4 +726,5 @@ int main(int argc, char **argv)
return 0; return 0;
} }
// LCOV_EXCL_STOP
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment