Files
OpenCellular/Makefile
Vic Yang cca78cfcfd Modify Makefile to allow insertion of mock modules
When we need to mock modules in a unit test, we need a way to mock
the actual modules. This CL enables mock of given source files.
For example, if we need to mock watchdog for test 'foo', we can add to
test/build.mk: "core-mock-foo-watchdog.o=fake_watchdog.o", and then
implement its own watchdog in fake_watchdog.c.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:10356
TEST=Set a mock fake_watchdog.c and check the test is compiled with
     fake_watchdog.c instead of watchdog.c.

Change-Id: I4a0afb589a49dad7c4d6faf8926438085cdc46cf
Reviewed-on: https://gerrit.chromium.org/gerrit/24942
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2012-06-14 07:06:07 -07:00

1.7 KiB