Attention is currently required from: Nico Huber, Edward O'Callaghan, Anastasia Klimchuk.

Anastasia Klimchuk uploaded patch set #4 to this change.

View Change

tests: Use real spi_send_command for all tests except spi25.c

At the moment one test (spi25.c) uses wrap of spi_send_command, and
all other existing tests don't care about this function (don't call
it at all). However in the next patch a new test in introduced, which
needs a real spi_send_command.

Following the approach "don't mock unless it is strictly necessary",
all tests that don't care go into real function bucket.

A declaration for __real_spi_send_command is needed for visibility,
this way wrap function can redirect to real function for all other
tests except spi25.c.

Additionally, wrap function moves below mock_chip, so that mock_chip
is visible inside wrap.

BUG=b:181803212
TEST=builds and ninja test

Change-Id: I22945cce3d0f36adaa8032167a3ef4e54eccb611
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M tests/spi25.c
1 file changed, 32 insertions(+), 16 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/53/56753/4

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I22945cce3d0f36adaa8032167a3ef4e54eccb611
Gerrit-Change-Number: 56753
Gerrit-PatchSet: 4
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newpatchset