You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by pe...@apache.org on 2016/10/28 19:23:34 UTC

[1/2] incubator-mynewt-core git commit: MYNEWT-139 - Minimal change to enable sanity test.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 39a06ff58 -> 087532bb0


MYNEWT-139 - Minimal change to enable sanity test.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8eb68f6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8eb68f6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8eb68f6d

Branch: refs/heads/develop
Commit: 8eb68f6d1017507155da58250318d32043152104
Parents: 39a06ff
Author: Peter Snyder <gi...@peterfs.com>
Authored: Fri Oct 28 11:49:52 2016 -0700
Committer: Peter Snyder <gi...@peterfs.com>
Committed: Fri Oct 28 11:49:52 2016 -0700

----------------------------------------------------------------------
 kernel/os/test/src/os_test.c  | 2 ++
 kernel/os/test/src/sem_test.c | 2 ++
 sys/log/src/log.c             | 6 ++++--
 3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8eb68f6d/kernel/os/test/src/os_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/os_test.c b/kernel/os/test/src/os_test.c
index 3b3873d..eaf1535 100644
--- a/kernel/os/test/src/os_test.c
+++ b/kernel/os/test/src/os_test.c
@@ -33,6 +33,7 @@
 void
 os_test_restart(void)
 {
+#if MYNEWT_VAL(SELFTEST)
     struct sigaction sa;
     struct itimerval it;
     int rc;
@@ -51,6 +52,7 @@ os_test_restart(void)
         perror("Cannot set itimer");
         abort();
     }
+#endif /* MYNEWT_VAL(SELFTEST) */
 
     tu_restart();
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8eb68f6d/kernel/os/test/src/sem_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/sem_test.c b/kernel/os/test/src/sem_test.c
index 0aabd54..8f3b163 100644
--- a/kernel/os/test/src/sem_test.c
+++ b/kernel/os/test/src/sem_test.c
@@ -29,6 +29,7 @@
 #define SEM_TEST_STACK_SIZE     512
 #endif
 
+#if MYNEWT_VAL(SELFTEST)
 struct os_task task1;
 os_stack_t stack1[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
 
@@ -45,6 +46,7 @@ os_stack_t stack4[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
 #define TASK2_PRIO (2) 
 #define TASK3_PRIO (3) 
 #define TASK4_PRIO (4) 
+#endif /* MYNEWT_VAL(SELFTEST) */
 
 struct os_sem g_sem1;
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8eb68f6d/sys/log/src/log.c
----------------------------------------------------------------------
diff --git a/sys/log/src/log.c b/sys/log/src/log.c
index 1148058..99bf704 100644
--- a/sys/log/src/log.c
+++ b/sys/log/src/log.c
@@ -114,8 +114,10 @@ log_register(char *name, struct log *log, const struct log_handler *lh,
     log->l_arg = arg;
     log->l_level = level;
 
-    assert(!log_registered(log));
-    STAILQ_INSERT_TAIL(&g_log_list, log, l_next);
+    /*assert(!log_registered(log));*/
+    if (!log_registered(log)) {
+        STAILQ_INSERT_TAIL(&g_log_list, log, l_next);
+    }
 
     return (0);
 }


[2/2] incubator-mynewt-core git commit: MYNEWT-139 - Don't call tu_case_pass on fail.

Posted by pe...@apache.org.
MYNEWT-139 - Don't call tu_case_pass on fail.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/087532bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/087532bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/087532bb

Branch: refs/heads/develop
Commit: 087532bb09f1f1136f887150ebec46be0a6b5340
Parents: 8eb68f6
Author: Peter Snyder <gi...@peterfs.com>
Authored: Fri Oct 28 12:20:03 2016 -0700
Committer: Peter Snyder <gi...@peterfs.com>
Committed: Fri Oct 28 12:20:03 2016 -0700

----------------------------------------------------------------------
 test/testutil/include/testutil/testutil.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/087532bb/test/testutil/include/testutil/testutil.h
----------------------------------------------------------------------
diff --git a/test/testutil/include/testutil/testutil.h b/test/testutil/include/testutil/testutil.h
index fbd58bd..88eaebe 100644
--- a/test/testutil/include/testutil/testutil.h
+++ b/test/testutil/include/testutil/testutil.h
@@ -213,7 +213,9 @@ TEST_SUITE_##suite_name(void);                               \
             if (setjmp(tu_case_jb) == 0) {                    \
                 TEST_CASE_##case_name();                      \
                 tu_case_post_test();                          \
-                tu_case_pass();                               \
+                if (!tu_case_failed) {                        \
+                    tu_case_pass();                           \
+                }                                             \
             }                                                 \
             tu_case_complete();                               \
         }                                                     \