[Tinyos-2-commits] CVS: tinyos-2.x/apps/tosthreads/apps/TestBlockStorage Makefile, 1.1, 1.2 TestBlockStorageP.nc, 1.1, 1.2

Chieh-Jan Mike Liang liang_mike at users.sourceforge.net
Fri Jul 11 23:44:57 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/apps/tosthreads/apps/TestBlockStorage
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10432

Modified Files:
	Makefile TestBlockStorageP.nc 
Log Message:
Fix the problem where MicaZ failed the test


Index: Makefile
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tosthreads/apps/TestBlockStorage/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile	12 Jun 2008 15:11:38 -0000	1.1
--- Makefile	12 Jul 2008 06:44:55 -0000	1.2
***************
*** 1,3 ****
--- 1,10 ----
  COMPONENT=TestBlockStorageAppC
  
+ ifneq ($(filter telosb,$(MAKECMDGOALS)),)
+   CFLAGS+=-DUSE_STM25P
+ endif
+ ifneq ($(filter micaz,$(MAKECMDGOALS)),)
+   CFLAGS+=-DUSE_AT45DB
+ endif
+ 
  include $(MAKERULES)

Index: TestBlockStorageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tosthreads/apps/TestBlockStorage/TestBlockStorageP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestBlockStorageP.nc	12 Jun 2008 15:11:38 -0000	1.1
--- TestBlockStorageP.nc	12 Jul 2008 06:44:55 -0000	1.2
***************
*** 48,55 ****
      int i;
      error_t error;
  
      call Leds.set(1);
  
!     if (call BlockingBlock1.getSize() != 1048576) {
        call Leds.set(7);
        return;
--- 48,60 ----
      int i;
      error_t error;
+ #if defined USE_AT45DB
+     storage_len_t expectedVolumeSize = 262144;
+ #elif defined USE_STM25P
+     storage_len_t expectedVolumeSize = 1048576;
+ #endif
  
      call Leds.set(1);
  
!     if (call BlockingBlock1.getSize() != expectedVolumeSize) {
        call Leds.set(7);
        return;
***************
*** 62,66 ****
      }
      
!     for (i = 0; i < 20; i++) {
        storage_addr_t writeAddr = call Random.rand32() % (call BlockingBlock1.getSize() - sizeof(storage_addr_t));
        storage_len_t len = sizeof(storage_addr_t);
--- 67,71 ----
      }
      
!     for (i = 0; i < 50; i++) {
        storage_addr_t writeAddr = call Random.rand32() % (call BlockingBlock1.getSize() - sizeof(storage_addr_t));
        storage_len_t len = sizeof(storage_addr_t);



More information about the Tinyos-2-commits mailing list