This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Infra - reseet target on test exit


Configurable, of course!

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: infra/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/infra/current/ChangeLog,v
retrieving revision 1.39
diff -u -5 -p -r1.39 ChangeLog
--- infra/current/ChangeLog	6 Oct 2003 17:29:01 -0000	1.39
+++ infra/current/ChangeLog	11 Oct 2003 19:49:49 -0000
@@ -1,5 +1,12 @@
+2003-10-11  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/tcdiag.cxx (cyg_test_exit): 
+	* cdl/infra.cdl: New option CYGSEM_INFRA_RESET_ON_TEST_EXIT which
+	[if defined] indicates that "cyg_test_exit()" should reset the 
+	platform instead of the default hang.
+
 2003-10-03  Nick Garnett  <nickg@balti.calivar.com>
 
 	* tests/cxxsupp.cxx: Added ifdef to disable this test on H8/300
 	targets. The H8/300 toolchain does not currently have C++ support.
 
Index: infra/current/cdl/infra.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/infra/current/cdl/infra.cdl,v
retrieving revision 1.10
diff -u -5 -p -r1.10 infra.cdl
--- infra/current/cdl/infra.cdl	6 May 2003 16:10:02 -0000	1.10
+++ infra/current/cdl/infra.cdl	11 Oct 2003 12:07:09 -0000
@@ -193,10 +193,21 @@ cdl_package CYGPKG_INFRA {
             will ever be called, so its current behaviour is to simply loop."
     }
 
     # ========================================================================
 
+    cdl_option CYGSEM_INFRA_RESET_ON_TEST_EXIT {
+        display       "Reset platform at end of test case execution"
+        default_value 0
+        description   "
+            If this option is set then test case programs will reset the platform
+            when they terminate, as opposed to the default which is to just hang
+            in a loop."
+    }
+
+    # ========================================================================
+
     cdl_option CYGFUN_INFRA_DUMMY_STRLEN {
         display       "Provide dummy strlen() function"
         requires      !CYGINT_ISO_STRING_STRFUNCS
         default_value { CYGINT_ISO_STRING_STRFUNCS == 0 }
         compile       strlen.cxx
Index: infra/current/src/tcdiag.cxx
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/infra/current/src/tcdiag.cxx,v
retrieving revision 1.10
diff -u -5 -p -r1.10 tcdiag.cxx
--- infra/current/src/tcdiag.cxx	23 May 2002 23:05:53 -0000	1.10
+++ infra/current/src/tcdiag.cxx	11 Oct 2003 12:07:08 -0000
@@ -254,10 +254,17 @@ cyg_test_exit(void)
     i++;
 #endif
 #ifdef CYGHWR_TEST_PROGRAM_EXIT
     CYGHWR_TEST_PROGRAM_EXIT();
 #endif
-
+#ifdef CYGSEM_INFRA_RESET_ON_TEST_EXIT
+#ifdef HAL_PLATFORM_RESET
+    HAL_PLATFORM_RESET();
+#else
+#warning "Reset selected for test case exit, but none defined"
+#endif
+#endif
+    // Default behaviour - simply hang in a loop
     for(;;)
         ;
 }
 // EOF tcdiag.cxx

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]