Private
Public Access
2
0
Commit Graph

15 Commits

Author SHA1 Message Date
Noel Eck
4487c98b6f gtest: Organized Gtest unit tests
This commit limits which tests run on which ARCH to allow all tests to
pass on CI.

    * Qualify the FTDI tests with (FTDI4222 AND USBPLAT)
    * Qualify the IO init tests with (DETECTED_ARCH == "MOCK")
    * Renamed all unit tests to start with 'test_unit_' to facilitate
      grouping with tab completion (or any other type of sorting)
    * Updated docker targets with new unit test target name

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-07-23 21:40:45 -07:00
Noel Eck
fc4b2a554d Platform_extender: FT4222 library refactor
Updates to make the FT4222 platform extender more usable.

Previous implementation opened libft4222.so and loaded symbols as
needed.  This implementation removes dynamic loading of libft4222 in
favor of creating a new shared libary which links against libft4222.so.
The dynamic loading is now done in mraa.c.  One C method is exposed in
libmraa-platform-ft4222.so for finding/initializing an FT4222:

mraa_platform_t mraa_usb_platform_extender(mraa_board_t* board);

Mraa.c attempts to open this platform library and calls the
mraa_usb_platform_extender method.  If an ftdi4222 is connected, the
user gets added IO from the extender.  If no FT4222 device is connected,
continue as normal.

    * Create a new platform library for the FT4222
    * Expose only 1 C method from the library -
      mraa_usb_platform_extender
    * libmraa-platform-ft4222.so contains CXX code (as well as previous
      C code).  All *allocs have been removed in favor of global
      C++ stl containers.
    * Previously, the FT4222 would only initialize correctly if 2 ftdi
      devices existed.  Now, initialize FT4222 devices based on the
      device id.
    * Many fixes for various problems with the FT4222
    * Added unit test for platform extender (minimal functionality w/o hw)
    * Updated to FindFtd4222.cmake module to handle standard arguments
    * Removed CMAKE_C_FLAGS addition of -DFTDID2XX and -DFTDI4222 since
      these are NOT used anywhere in source.
    * Building the FTDI4222 shim requires libft4222.h which requires
      ftd2xx.h.  Updated CMakeLists.txt to require both when building
      the shim.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-26 12:57:13 -07:00
Noel Eck
467cf5132d gtest: Added Google Test
Added Google Test for unit testing.  Currently NOT required by
MRAA CMake.

    * Added a test fixture for mraa common C header methods.
    * Added a test fixture for mraa common C++ header methods.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-13 16:16:49 -07:00
Noel Eck
76c8b9a76e travis-ci: Added minimal travis job
Added an additional job to the CI matrix which does a minimal mraa build
(only C) which can run and pass/fail quickly.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-13 12:10:34 -07:00
Brendan Le Foll
ae2371c804 cmake: Remove all cpack options including IPK generation
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 11:45:39 +01:00
Manivannan Sadhasivam
02963b791a tools: remove INSTALLGPIOTOOL flag
This commit removes INSTALLGPIOTOOL flag as it is not
required anymore

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-11-02 10:00:35 +01:00
Nicolas Oliver
c24a8f8b20 travis: build examples in additional jobs
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-10-19 13:55:09 -07:00
Nicolas Oliver
b5efa0e591 travis: use images from inteliotdevkit
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-10-11 14:07:59 -07:00
Nicolas Oliver
e0a1862ce3 Travis CI and Documentation Generation improvements
* Use docker images from docker hub instead of building them on Travis
* Fix doxygen warnings for C/C++ Documentation
* Fix examples inclusion in documentation
* Modify Travis build matrix to include stages and additional jobs
* Update doxygen2jsdoc submodule
* Add doxyport submodule
* Generate documentation for each language in Travis
* Add sonar.java.binaries to sonar-scan.sh

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-08-10 10:47:11 -03:00
Nicolas Oliver
189b959012 sonar: modify sonar-scan.sh script
Prevent execution on non configured env & add sonar target to allowed failures
in travis

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:46:45 +02:00
Nicolas Oliver
4bedd68c4e travis: improve docker images generation for building
Make a build heriarchy to reduce images size.
Add Android Thing Build.

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:46:45 +02:00
Alex Tereschenko
fc00fa20d2 static code analysis: introduce automated scans via SonarCloud
This adds Travis and Docker configurations for automated scans,
both for master branch and internal PRs.

External PRs won't be checked due to security concerns
(and Travis limitation related to that) - GH and SonarCloud tokens
are not propagated to those.

An organization and project must be created in SonarCloud for reporting,
as well as a technical GH user with mraa repo commit permission, to set
PR statuses in the "checks" section.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-07-03 20:23:10 +02:00
Brendan Le Foll
e1778c811d tests: add USEPYTHON3TESTS to explicitly use python3 for tests
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-19 20:48:29 +02:00
Nicolas Oliver
000746c20d build config: fix parameter configuration for docker-compose
We were incorrectly using clang all the time, overriding gcc.
This also brings newer version of docker-compose.

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-06-10 18:15:09 +02:00
Nicolas Oliver
79da382832 travis: migrate travis plans to run in a Docker container
Add Dockerfile to create build environment for mraa
Add docker-compose.yaml file to easily execute build tasks
Add .dockerignore file
Modify .travis.yaml file to use docker and docker-compose for building
Modify package.json.cmake to run a simple load test for node.js

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-05-31 17:17:39 +02:00