# HG changeset patch # User Iain Williamson # Date 1264786566 0 # Node ID 7c04ad290acaba1271ffd18ef330e64cb5de16f1 # Parent 6080bce951bf5881fd245f61fd2b5d5ade5a862b First drop of untested winscw TC code. Also adding missing testcase ID to tracecompiler_whatlog diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/CommonFramework.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/CommonFramework.h Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __CommonFramework_H +#define __CommonFramework_H + +#include +#include + +_LIT(KTxtEPOC32EX,"EXAMPLES"); +_LIT(KTxtExampleCode,"Symbian OS Example Code"); +_LIT(KFormatFailed,"failed: leave code=%d"); +_LIT(KTxtOK,"ok"); +_LIT(KTxtPressAnyKey," [press any key]"); + +// public +LOCAL_D CConsoleBase* console; // write all your messages to this +LOCAL_C void doExampleL(); // code this function for the real example + +// private +LOCAL_C void callExampleL(); // initialize with cleanup stack, then do example + +GLDEF_C TInt E32Main() // main function called by E32 + { + __UHEAP_MARK; + CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack + TRAPD(error,callExampleL()); // more initialization, then do example + __ASSERT_ALWAYS(!error,User::Panic(KTxtEPOC32EX,error)); + delete cleanup; // destroy clean-up stack + __UHEAP_MARKEND; + return 0; // and return + } + +LOCAL_C void callExampleL() // initialize and call example code under cleanup stack + { + console=Console::NewL(KTxtExampleCode,TSize(KConsFullScreen,KConsFullScreen)); + CleanupStack::PushL(console); + TRAPD(error,doExampleL()); // perform example function + if (error) + console->Printf(KFormatFailed, error); + else + console->Printf(KTxtOK); + console->Printf(KTxtPressAnyKey); + console->Getch(); // get and ignore character + CleanupStack::PopAndDestroy(); // close console + } + +#endif diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/TCSTATICDLLWINS.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/TCSTATICDLLWINS.def Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,4 @@ +EXPORTS + ?NewLC@CMessenger@@SAPAV1@AAVCConsoleBase@@ABVTDesC16@@@Z @ 1 NONAME ; ?NewLC@CMessenger@@SAPAV1@AAVCConsoleBase@@ABVTDesC16@@@Z + ?ShowMessage@CMessenger@@QAEXXZ @ 2 NONAME ; ?ShowMessage@CMessenger@@QAEXXZ + diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/bld.inf Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Component description file +* +*/ + + +PRJ_PLATFORMS +WINSCW + +PRJ_MMPFILES + +tcwinsStaticDLL.mmp diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.cpp Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* This program creates a dll. +* +*/ + + +#include "tcwinsStaticDLL.h" +#include +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "CreateStaticDLLTraces.h" +#endif + + +// construct/destruct + + +extern "C" void __ARM_switch8(); + +void sbs_test() + { + __ARM_switch8(); + } + + +EXPORT_C CMessenger* CMessenger::NewLC(CConsoleBase& aConsole, const TDesC& aString) + { + OstTrace0( TRACE_API, CMESSENGER_NEWL, "CMessenger::NewLC()" ); + OstTrace0( TRACE_NORMAL, DUP1_CMESSENGER_NEWL, "CMessenger::NewLC()" ); + CMessenger* self=new (ELeave) CMessenger(aConsole); + CleanupStack::PushL(self); + self->ConstructL(aString); + return self; + } + +CMessenger::~CMessenger() // destruct - virtual, so no export + { + TraceDump( INFO_LEVEL, ( _L( "CMessenger::~CMessenger()" ) ) ); + OstTrace0( TRACE_API, DUP1_CMESSENGER_CMESSENGER, "CMessenger::~CMessenger()" ); + OstTrace0( TRACE_NORMAL, DUP2_CMESSENGER_CMESSENGER, "CMessenger::~CMessenger()" ); + delete iString; + } + +EXPORT_C void CMessenger::ShowMessage() + { + _LIT(KFormat1,"%S\n"); + iConsole.Printf(KFormat1, iString); // notify completion + } + +// constructor support +// don't export these, because used only by functions in this DLL, eg our NewLC() + +CMessenger::CMessenger(CConsoleBase& aConsole) // first-phase C++ constructor + : iConsole(aConsole) + { + } + +void CMessenger::ConstructL(const TDesC& aString) // second-phase constructor + { + iString=aString.AllocL(); // copy given string into own descriptor + } + diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.h Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#include + + +class CMessenger : public CBase + { +public: + // Construction + IMPORT_C static CMessenger* NewLC(CConsoleBase& aConsole, const TDesC& aString); + // Destructor - virtual and class not intended + // for derivation, so not exported + ~CMessenger(); + // general functions - exported + IMPORT_C void ShowMessage(); +private: + // C++ constructor - not exported; + // implicitly called from NewLC() + CMessenger(CConsoleBase& aConsole); + // 2nd phase construction, called by NewLC() + void ConstructL(const TDesC& aString); // second-phase constructor +private: + CConsoleBase& iConsole; // Use the console (but not owned) + HBufC* iString; // Allocated container for string data (destructor destroys) + }; diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/tcwinsStaticDLL.mmp Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +TARGET tcwinsstaticdll.dll +TARGETTYPE dll + +UID 0xE800004C +CAPABILITY All -TCB + + +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE CreateStaticDLL.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include + +LIBRARY euser.lib + +#if defined(WINS) + deffile ./TCSTATICDLLWINS.def +#endif +nostrictdef diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/bld.inf Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,24 @@ +/* +* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Component description file +* +*/ + + +PRJ_PLATFORMS +WINSCW + +PRJ_MMPFILES +win32resourcedll.mmp diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/epoc32.ico Binary file sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/epoc32.ico has changed diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/gui.rc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/gui.rc Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,79 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +EPOC_ICON ICON DISCARDABLE "epoc32.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Cursor +// + +OVERKEY CURSOR DISCARDABLE "hand.cur" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/hand.cur Binary file sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/hand.cur has changed diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/resource.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/resource.h Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + //{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by gui.rc +// +#define EPOC_ICON 102 +#define OVERKEY 104 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 105 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/win32resourcedll.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_winscw/win32resource/win32resourcedll.mmp Fri Jan 29 17:36:06 2010 +0000 @@ -0,0 +1,24 @@ +/* +* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#include "../CreateStaticDLL.mmp" + +START WINS +WIN32_RESOURCE gui.rc +END + diff -r 6080bce951bf -r 7c04ad290aca sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Tue Jan 26 13:42:54 2010 +0000 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Fri Jan 29 17:36:06 2010 +0000 @@ -20,7 +20,7 @@ def run(): t = CheckWhatSmokeTest() t.description = "Trace Compiler Whatlog test" - t.id = "xxx" + t.id = "112" t.name = "tracecompiler_whatlog" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE}"