You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/11/19 18:38:48 UTC

incubator-mynewt-larva git commit: libs/util tests to be executed as part of test suite.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master 3289b68bc -> 9504907f2


libs/util tests to be executed as part of test suite.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/9504907f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/9504907f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/9504907f

Branch: refs/heads/master
Commit: 9504907f2f21fa77187afe2f7a9e676c776e6a22
Parents: 3289b68
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Nov 19 09:38:11 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Nov 19 09:38:11 2015 -0800

----------------------------------------------------------------------
 libs/util/src/test/flash_map_test.c | 3 +++
 project/test/src/test.c             | 5 ++++-
 project/test/test.yml               | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/9504907f/libs/util/src/test/flash_map_test.c
----------------------------------------------------------------------
diff --git a/libs/util/src/test/flash_map_test.c b/libs/util/src/test/flash_map_test.c
index 7dc4cfc..ab7cef2 100644
--- a/libs/util/src/test/flash_map_test.c
+++ b/libs/util/src/test/flash_map_test.c
@@ -89,6 +89,9 @@ TEST_CASE(flash_map_test_case_2)
     rc = flash_area_to_sectors(FLASH_AREA_IMAGE_0, &sec_cnt, secs);
     TEST_ASSERT_FATAL(rc == 0, "flash_area_to_sectors failed");
 
+    /*
+     * First erase the area so it's ready for use.
+     */
     for (i = 0; i < sec_cnt; i++) {
         rc = hal_flash_erase_sector(secs[i].fa_flash_id, secs[i].fa_off);
         TEST_ASSERT_FATAL(rc == 0, "hal_flash_erase_sector() failed");

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/9504907f/project/test/src/test.c
----------------------------------------------------------------------
diff --git a/project/test/src/test.c b/project/test/src/test.c
index 59c5cb2..f5dff04 100644
--- a/project/test/src/test.c
+++ b/project/test/src/test.c
@@ -4,7 +4,7 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
@@ -20,6 +20,8 @@
 #include "bootutil/bootutil_test.h"
 #include "testutil/testutil.h"
 
+extern int util_test_all(void);
+
 int
 main(void)
 {
@@ -29,6 +31,7 @@ main(void)
     os_test_all();
     nffs_test_all();
     boot_test_all();
+    util_test_all();
 
     return 0;
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/9504907f/project/test/test.yml
----------------------------------------------------------------------
diff --git a/project/test/test.yml b/project/test/test.yml
index e1a6d40..84c3950 100644
--- a/project/test/test.yml
+++ b/project/test/test.yml
@@ -6,6 +6,7 @@ project.eggs:
     - libs/bootutil
     - libs/testreport
     - libs/console/full
+    - libs/util
 
 project.identities:
     - test