Commit Graph

13 Commits

Author SHA1 Message Date
Sebastian Bøe 55ee53ce91 cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.

Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.

To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.

This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.

The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-08-15 04:06:50 -07:00
Anas Nashif 9a28c87b42 tests: posix: rename entry file to main.c
Change all tests to have main.c as the main file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-28 08:52:46 -04:00
Punit Vara 843ad8b07e tests: semaphore: Check return value
Check return value for pthread_create()

issue: #6701

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-24 14:25:25 -07:00
Punit Vara 7a3ace35dd tests: Remove newline character
Remove new line character from all zassert_*
messages. Following script has been used to do this.

https://github.com/punitvara/scripts/blob/master/remove_newlinech.py

zassert test framework adds newlines character implicitly.

issue: #7170

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-23 12:59:12 -04:00
Anas Nashif 89a50932d3 tests: posix: style, tag, and category fixes
Fix coding style, test tags and use categories.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-25 14:18:15 +05:30
Anas Nashif 8e8d6de6f7 tests: posix: fix tags and sections
Improve tagging and fix test names.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Ramakrishna Pallala 46931c9a44 tests: posix: Resolve header file dependencies
Fixed header file dependencies by reordering the
inclusion sequence in posix tests.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00
Niranjhana N 2ecaee071c tests: posix: Fixing pthread attr object initialization.
In some cases pthread attrib initialization may fail as
garbare value may indicate that this attribute is already
initialized. Destroy the attr object and recreate it.

Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-04-03 15:57:14 -04:00
Juan Manuel Torres Palma 4aa49053f6 tests: posix: fix semaphore.h test
Previous implementation was buggy, destroying
resources with pending thread and race conditions.

New version tests basic functionality with 2
threads and basic synchronization.

Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
2018-03-21 14:27:47 -07:00
Punit Vara 9edc7ce490 tests: semaphore: test APIs
Test sem_destroy and sem_trywait.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-03-10 21:30:14 -05:00
Anas Nashif 0a59c6b30a tests: posix: add negative testing for semaphore
More asserts on API calls and error handling.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-06 22:40:04 -05:00
Anas Nashif d5e8a2c5a1 tests: posix: fix test names in yaml
Use meaningful test names.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-06 22:40:04 -05:00
Punit Vara 0306344f59 tests: add semaphore posix API test
This test case tests posix APIs which are implemented for semaphore.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-03-05 20:51:36 -05:00