X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=tests%2Fruntc.c;h=096ff1609e638c85b4952302e19b3b721a5dc7eb;hb=21b39043472eeeb2e0155eafc73247f5010af714;hp=c3d0725ecb6d2712d0a5b1b38211cb5de8ea3b7c;hpb=5bc679c6b0367558b7ce94cfa6cd45b483ad98c9;p=libsigrokdecode.git
diff --git a/tests/runtc.c b/tests/runtc.c
index c3d0725..096ff16 100644
--- a/tests/runtc.c
+++ b/tests/runtc.c
@@ -17,6 +17,7 @@
* along with this program. If not, see .
*/
+#include
#include "../libsigrokdecode.h"
#include
#include
@@ -35,25 +36,25 @@
#ifdef __LINUX__
#include
#endif
-#include "../config.h"
+#include "config.h"
int debug = FALSE;
int statistics = FALSE;
char *coverage_report;
-struct probe {
+struct channel {
char *name;
- int probe;
+ int channel;
};
struct option {
char *key;
- char *value;
+ GVariant *value;
};
struct pd {
char *name;
- GSList *probes;
+ GSList *channels;
GSList *options;
};
@@ -67,12 +68,17 @@ struct output {
};
struct cvg {
- int lines;
- int missed;
+ int num_lines;
+ int num_missed;
+ float coverage;
+ GSList *missed_lines;
};
struct cvg *get_mod_cov(PyObject *py_cov, char *module_name);
+void cvg_add(struct cvg *dst, struct cvg *src);
+struct cvg *cvg_new(void);
+gboolean find_missed_line(struct cvg *cvg, char *linespec);
static void logmsg(char *prefix, FILE *out, const char *format, va_list args)
@@ -135,8 +141,8 @@ static void usage(char *msg)
printf("Usage: runtc [-dPpoiOf]\n");
printf(" -d Debug\n");
printf(" -P \n");
- printf(" -p (optional)\n");
- printf(" -o (optional)\n");
+ printf(" -p (optional)\n");
+ printf(" -o (optional)\n");
printf(" -i \n");
printf(" -O \n");
printf(" -f