From: Andreas Reichel <[email protected]>

Use function faking framework for mocking in unit tests.
Integrate it into the project as git submodule.

Signed-off-by: Andreas Reichel <[email protected]>
---
 .gitmodules             | 3 +++
 .travis-build.sh        | 5 ++++-
 testing/fff             | 1 +
 tools/tests/Makefile.am | 7 +++----
 4 files changed, 11 insertions(+), 5 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 testing/fff

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..2412404
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "testing/fff"]
+       path = testing/fff
+       url = https://github.com/meekrosoft/fff
diff --git a/.travis-build.sh b/.travis-build.sh
index 4e9e3a9..6c8d79c 100755
--- a/.travis-build.sh
+++ b/.travis-build.sh
@@ -98,6 +98,9 @@ case "$TARGET_EFFECTIVE" in
         prepare_build
         ./configure
 
+        ignore=""
+        ignore+=" -i testing/fff"
+
         suppress=""
         # Justified suppressions:
         # Does not belong to the project
@@ -133,7 +136,7 @@ case "$TARGET_EFFECTIVE" in
         # Exit code '1' is returned if arguments are not valid or if no input
         # files are provided. Compare 'cppcheck --help'.
         exec cppcheck -f -q --error-exitcode=2 \
-            $enable $suppress $cpp_conf $includes .
+            $enable $suppress $ignore $cpp_conf $includes .
         ;;
     coverity_prepare)
         install_common_deps
diff --git a/testing/fff b/testing/fff
new file mode 160000
index 0000000..719dd8b
--- /dev/null
+++ b/testing/fff
@@ -0,0 +1 @@
+Subproject commit 719dd8b6a39a34d0dbf71eeccd4bcd8c5e84c9b4
diff --git a/tools/tests/Makefile.am b/tools/tests/Makefile.am
index ec96981..9b2344f 100644
--- a/tools/tests/Makefile.am
+++ b/tools/tests/Makefile.am
@@ -12,12 +12,11 @@
 
 OBJCOPY ?= objcopy
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/swupdate-adapter \
-       -I$(top_srcdir)/tools
-
-AM_CFLAGS = \
+       -I$(top_srcdir)/tools \
+       -I$(top_srcdir)/testing/fff \
        -Wno-unused-parameter \
        -Wmissing-prototypes \
        -fshort-wchar \
-- 
2.14.2

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20171102155648.16140-4-andreas.reichel.ext%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to