Commit graph

7 commits

Author SHA1 Message Date
Kumar Gala
a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Marc Herbert
debade9121 tests: make find_package(Zephyr...) REQUIRED
... because it is (required).

This makes a difference when building with CMake and forgetting
ZEPHYR_BASE or not registering Zephyr in the CMake package registry.

In this particular case, REQUIRED turns this harmless looking log
statement:

-- Could NOT find Zephyr (missing: Zephyr_DIR)
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- ...
-- ...
-- ...
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (target_sources):
  Cannot specify sources for target "app" which is not built by
  this project.

... into this louder, clearer, faster and (last but not least) final
error:

CMake Error at CMakeLists.txt:5 (find_package):
  Could not find a package configuration file provided by "Zephyr" with
  any of the following names:

    ZephyrConfig.cmake
    zephyr-config.cmake

  Add the installation prefix of "Zephyr" to CMAKE_PREFIX_PATH or set
  "Zephyr_DIR" to a directory containing one of the above files.  If
  "Zephyr" provides a separate development package or SDK, be sure it
  has been installed.

-- Configuring incomplete, errors occurred!

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-05-29 10:47:25 +02:00
Torsten Rasmussen
407b49b35c cmake: use find_package to locate Zephyr
Using find_package to locate Zephyr.

Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.

Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.

It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
Brooks Prumo
e426c0c4e1 tests: Remove erroneous # before extern "C"
A few test header files have C++ guards around them, but are incorrect.
Those files had a leading `#` placed before `extern`, which is
incorrect.  This commit simply removes those leading `#` characters.

Signed-off-by: Brooks Prumo <brooks@prumo.org>
2020-02-06 19:45:21 -05:00
Andrzej Puzdrowski
858db136c9 tests/subsys/setting: cleanup deletion tests
Some cleanup in tests code as after duplicates filtering
was introduced there is no need to interpret 0-length readout in
settings h_set handler

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-01 17:53:35 +01:00
Marc Herbert
fa84cb7e5b tests/subsys/settings: build common code as zephyr_libraries
Stops leaking very long source paths in build directories; makes them
deterministic. Finishes what was started in commit b4282bf72d, see
rationale and code reviews there.

See also CMake issue https://gitlab.kitware.com/cmake/cmake/issues/19475
for more details.

Use the opportunity to remove the most obvious duplication.

Test with: sanitycheck -T $ZEPHYR_BASE/tests/subsys/settings/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-10-22 11:11:11 +02:00
Kamil Piszczek
e11248baa6 tests: subsys: settings: nvs: intergrating tests with nvs backed
Integrated Settings module tests with the NVS backend. The batch of
tests is shared with other backends.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-09-27 10:06:40 -07:00