Fix building error and warnings to add fletcher32 algo at nightly test.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 11 Jan 2012 14:40:30 +0000 (14:40 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 11 Jan 2012 14:40:30 +0000 (14:40 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5250 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/algo/fletcher32.h
bertos/algo/fletcher32_test.c
test/run_tests.sh

index e5c61f898199c942fee607125f816f56f07131eb..800c3476542ec919321fa6fb2f83b74607e4fee8 100644 (file)
@@ -50,4 +50,8 @@ void fletcher32_init(Fletcher32 *f);
 void fletcher32_update(Fletcher32 *f, const void *_buf, size_t len);
 uint32_t fletcher32_final(Fletcher32 *f);
 
+int fletcher32_testSetup(void);
+int fletcher32_testTearDown(void);
+int fletcher32_testRun(void);
+
 #endif /* ALGO_FLETCHER32_H */
index 7f13fdce1f06c1025f8dd95fb8facc745b58ee97..4f0fe618da34eb8e66bffd695b3e2b49704096f6 100644 (file)
@@ -520,7 +520,7 @@ int fletcher32_testRun(void)
                tot += strlen(tstbufs[t]);
 
                //kdump(tstbufs[t], strlen(tstbufs[t]));
-               kprintf("f1 %08X, f2 %08X\n", f1, f2);
+               kprintf("f1 %04lX, f2 %04lX\n", f1, f2);
                ASSERT(f1 == f2);
        }
 
@@ -536,7 +536,7 @@ int fletcher32_testRun(void)
        uint32_t ft1 = fletcher32_final(&ft);
        //kdump(start, tot);
        free(start);
-       kprintf("ft1 %08X, ft2 %08X\n", ft1, ft2);
+       kprintf("ft1 %04lX, ft2 %04lX\n", ft1, ft2);
        ASSERT(ft1 == ft2);
        return 0;
 }
index b6ffe00587f3467fe2f1d16f87d9bc35ea615b5e..139341860ddb049eb499dfe26414a91975295600 100755 (executable)
@@ -31,6 +31,9 @@ TESTS=${TESTS:-`find . \
 TESTOUT="testout"
 SRC_LIST="
        bertos/algo/ramp.c
+       bertos/algo/crc_ccitt.c
+       bertos/algo/crc.c
+       bertos/algo/fletcher32.c
        bertos/drv/kdebug.c
        bertos/drv/timer.c
        bertos/kern/monitor.c
@@ -54,8 +57,6 @@ SRC_LIST="
        bertos/emul/switch_ctx_emul.S
        bertos/mware/ini_reader.c
        bertos/emul/kfile_posix.c
-       bertos/algo/crc_ccitt.c
-       bertos/algo/crc.c
        bertos/struct/kfile_mem.c
        bertos/net/ax25.c
        bertos/net/afsk.c