Edward O'Callaghan has uploaded this change for review.
tests/chip_wp.c: Allow for logging during tests
Change-Id: I21160f3c0e9ca0c45bf23af9809dd8cf7af5beac
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M tests/chip_wp.c
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/42/64442/1
diff --git a/tests/chip_wp.c b/tests/chip_wp.c
index 8b209bd..b0ff872 100644
--- a/tests/chip_wp.c
+++ b/tests/chip_wp.c
@@ -31,6 +31,17 @@
#define LAYOUT_TAIL_REGION_START 0x1000
+static int flashrom_print_cb_tests(enum flashrom_log_level level, const char *fmt, va_list ap)
+{
+ int ret = 0;
+ FILE *output_type = stderr;
+
+ ret = vfprintf(output_type, fmt, ap);
+ fflush(output_type);
+
+ return ret;
+}
+
static void setup_chip(struct flashrom_flashctx *flash, struct flashrom_layout **layout,
struct flashchip *chip, const char *programmer_param)
{
@@ -48,6 +59,7 @@
}
assert_int_equal(0, programmer_init(&programmer_dummy, programmer_param));
+ flashrom_set_log_callback((flashrom_log_callback *)&flashrom_print_cb_tests);
/* Assignment below normally happens while probing, but this test is not probing. */
flash->mst = ®istered_masters[0];
}
To view, visit change 64442. To unsubscribe, or for help writing mail filters, visit settings.