Anastasia Klimchuk has uploaded this change for review.

View Change

tests: Convert erase chip tests to libflashrom API

As a part of effort to convert command line (and everything else)
to be libflashrom users, chip tests need to be converted as well.

TEST=ninja test

Change-Id: I38529a6b4d79882f50068b3628089b178dbe0a50
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M tests/chip.c
1 file changed, 3 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/61137/1
diff --git a/tests/chip.c b/tests/chip.c
index 9c06fe7..0ea3a35 100644
--- a/tests/chip.c
+++ b/tests/chip.c
@@ -19,6 +19,7 @@

#include "chipdrivers.h"
#include "flash.h"
+#include "libflashrom.h"
#include "programmer.h"

#define MOCK_CHIP_SIZE (8*MiB)
@@ -182,7 +183,7 @@
setup_chip(&flashctx, &layout, &mock_chip, param);

printf("Erase chip operation started.\n");
- assert_int_equal(0, do_erase(&flashctx));
+ assert_int_equal(0, flashrom_flash_erase(&flashctx));
printf("Erase chip operation done.\n");

teardown(&layout);
@@ -204,7 +205,7 @@
setup_chip(&flashctx, &layout, &mock_chip, param_dup);

printf("Erase chip operation started.\n");
- assert_int_equal(0, do_erase(&flashctx));
+ assert_int_equal(0, flashrom_flash_erase(&flashctx));
printf("Erase chip operation done.\n");

teardown(&layout);

To view, visit change 61137. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I38529a6b4d79882f50068b3628089b178dbe0a50
Gerrit-Change-Number: 61137
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newchange