comparison host/tools/ecostest/common/eCosTest.cpp @ 101:c37d3a9e1b28 ecos-sw-2000-06-16

Merge from eCos master repository on 2000-06-16-07:47:03-BST
author jlarmour
date Fri, 16 Jun 2000 16:43:59 +0000
parents 489eb5632bc3
children 518f42066aba
comparison
equal deleted inserted replaced
100:991657282121 101:c37d3a9e1b28
95 95
96 TRACE(_T("%%%% Create test instance %08x count:=%d\n"),this,InstanceCount+1); 96 TRACE(_T("%%%% Create test instance %08x count:=%d\n"),this,InstanceCount+1);
97 97
98 // By recording the path now, we ensure processes are always run in the context in which the test instance 98 // By recording the path now, we ensure processes are always run in the context in which the test instance
99 // is created (important for the ConfigTool to be able to call PrepareEnvironment). 99 // is created (important for the ConfigTool to be able to call PrepareEnvironment).
100
101 #ifdef _WIN32
102 // for some reason _tgetenv() doesn't return the PATH set
103 // by PrepareEnvironment() so use GetEnvironmentVariable() instead
104 // JLD - 2000-06-09
105 String strPath;
106 int nSize=GetEnvironmentVariable(_T("PATH"), NULL, 0);
107 GetEnvironmentVariable(_T("PATH"), strPath.GetBuffer(nSize), nSize);
108 strPath.ReleaseBuffer();
109 m_strPath=strPath;
110 #else
100 LPCTSTR pszPath=_tgetenv(_T("PATH")); 111 LPCTSTR pszPath=_tgetenv(_T("PATH"));
101 if(pszPath){ 112 if(pszPath){
102 m_strPath=pszPath; 113 m_strPath=pszPath;
103 } 114 }
115 #endif
104 116
105 ENTERCRITICAL; 117 ENTERCRITICAL;
106 InstanceCount++; 118 InstanceCount++;
107 m_pNextInstance=pFirstInstance; 119 m_pNextInstance=pFirstInstance;
108 if(m_pNextInstance){ 120 if(m_pNextInstance){