Advertisement

Buildbot for AngelScript

Started by October 02, 2010 08:58 PM
19 comments, last by droz 14 years, 1 month ago
I've made these changes in revision 710. Thanks.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Since you're running this on Linux. Would you be interested in running the tests with Valgrind as well? That would be very useful. MSVC9 that I use is very good at detecting memory problems, but Valgrind has proven to be even better in some instances.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
I check my project periodically with valgrind and haven't found any leaks, but here is the output when running test_feature:

==5763==
==5763== HEAP SUMMARY:
==5763== in use at exit: 0 bytes in 0 blocks
==5763== total heap usage: 906,657 allocs, 906,657 frees, 45,466,142 bytes allocated
==5763==
==5763== All heap blocks were freed -- no leaks are possible
==5763==
==5763== For counts of detected and suppressed errors, rerun with: -v
==5763== Use --track-origins=yes to see where uninitialised values come from
==5763== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 19 from 8)

Using leak-check=full gives you some more information about uninitialized values:
==5778== Memcheck, a memory error detector==5778== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.==5778== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info==5778== Command: ./testgnuc==5778== AngelScript version: 2.20.0 WIPAngelScript options:  AS_LINUX AS_X86 -- TestScriptRetRef passed-- TestGarbageCollect passed-- TestFunctionPtr passed-- TestModule passed==5778== Conditional jump or move depends on uninitialised value(s)==5778==    at 0x813CB73: asCCompiler::MatchFunctions(asCArray<int>&, asCArray<asSExprContext*>&, asCScriptNode*, char const*, asCObjectType*, bool, bool, bool, asCString const&) (as_compiler.cpp:1426)==5778==    by 0x81575CC: asCCompiler::ProcessPropertySetAccessor(asSExprContext*, asSExprContext*, asCScriptNode*) (as_compiler.cpp:7527)==5778==    by 0x814C2FF: asCCompiler::DoAssignment(asSExprContext*, asSExprContext*, asSExprContext*, asCScriptNode*, asCScriptNode*, int, asCScriptNode*) (as_compiler.cpp:5051)==5778==    by 0x814D0FD: asCCompiler::CompileAssignment(asCScriptNode*, asSExprContext*) (as_compiler.cpp:5221)==5778==    by 0x8142315: asCCompiler::CompileExpressionStatement(asCScriptNode*, asCByteCode*) (as_compiler.cpp:2682)==5778==    by 0x813F3BA: asCCompiler::CompileStatement(asCScriptNode*, bool*, asCByteCode*) (as_compiler.cpp:1934)==5778==    by 0x813947D: asCCompiler::CompileStatementBlock(asCScriptNode*, bool, bool*, asCByteCode*) (as_compiler.cpp:630)==5778==    by 0x81380FB: asCCompiler::CompileFunction(asCBuilder*, asCScriptCode*, asCScriptNode*, asCScriptFunction*) (as_compiler.cpp:316)==5778==    by 0x8122079: asCBuilder::CompileFunctions() (as_builder.cpp:507)==5778==    by 0x8120C0B: asCBuilder::Build() (as_builder.cpp:182)==5778==    by 0x8168CB4: asCModule::Build() (as_module.cpp:142)==5778==    by 0x807B350: TestGetSet::Test() (test_getset.cpp:704)==5778== ==5778== Conditional jump or move depends on uninitialised value(s)==5778==    at 0x8157061: asCCompiler::FindPropertyAccessor(asCString const&, asSExprContext*, asCScriptNode*) (as_compiler.cpp:7445)==5778==    by 0x814F167: asCCompiler::CompileVariableAccess(asCString const&, asCString const&, asSExprContext*, asCScriptNode*, bool, bool, bool) (as_compiler.cpp:5671)==5778==    by 0x814FDE4: asCCompiler::CompileExpressionValue(asCScriptNode*, asSExprContext*) (as_compiler.cpp:5864)==5778==    by 0x814E721: asCCompiler::CompileExpressionTerm(asCScriptNode*, asSExprContext*) (as_compiler.cpp:5522)==5778==    by 0x814E4C8: asCCompiler::CompilePostFixExpression(asCArray<asCScriptNode*>*, asSExprContext*) (as_compiler.cpp:5495)==5778==    by 0x814E2BE: asCCompiler::CompileExpression(asCScriptNode*, asSExprContext*) (as_compiler.cpp:5460)==5778==    by 0x814E077: asCCompiler::CompileCondition(asCScriptNode*, asSExprContext*) (as_compiler.cpp:5415)==5778==    by 0x814D18F: asCCompiler::CompileAssignment(asCScriptNode*, asSExprContext*) (as_compiler.cpp:5228)==5778==    by 0x8139E01: asCCompiler::CompileGlobalVariable(asCBuilder*, asCScriptCode*, asCScriptNode*, sGlobalVariableDescription*, asCScriptFunction*) (as_compiler.cpp:771)==5778==    by 0x812570E: asCBuilder::CompileGlobalVariables() (as_builder.cpp:1305)==5778==    by 0x8120C00: asCBuilder::Build() (as_builder.cpp:181)==5778==    by 0x8168CB4: asCModule::Build() (as_module.cpp:142)==5778== -- TestGetSet passed-- Test_Addon_ScriptArray passed-- TestOperator passed-- TestTemplate passed-- TestDump passed-- TestInheritance passed-- TestScriptClassMethod passed-- TestScriptString passed-- TestSaveLoad passed-- TestInterface passed-- TestCastOp passed-- Test2Modules passed-- TestFile passed-- TestArrayObject passed-- TestCompiler passed-- TestOptimize passed-- TestConversion passed-- TestRegisterType passed-- TestRefArgument passed-- TestStream passed-- TestEnum passed==5778== Invalid read of size 4==5778==    at 0x811F73E: asCAtomic::get() const (as_atomic.cpp:48)==5778==    by 0x8167827: asCGlobalProperty::GetRefCount() (as_globalproperty.cpp:118)==5778==    by 0x810B2B9: asCScriptEngine::FreeUnusedGlobalProperties() (as_scriptengine.cpp:1934)==5778==    by 0x8103E0A: asCScriptEngine::~asCScriptEngine() (as_scriptengine.cpp:541)==5778==    by 0x8105CC8: asCScriptEngine::Release() const (as_scriptengine.cpp:619)==5778==    by 0x806E885: TestDynamicConfig::Test() (test_dynamicconfig.cpp:179)==5778==    by 0x804D0C7: main (main.cpp:214)==5778==  Address 0x42ed3c0 is 56 bytes inside a block of size 64 free'd==5778==    at 0x4024B3A: free (vg_replace_malloc.c:366)==5778==    by 0x80CEDE5: MyFreeWithStats(void*) (utils.cpp:164)==5778==    by 0x8103DC5: asCScriptEngine::~asCScriptEngine() (as_scriptengine.cpp:537)==5778==    by 0x8105CC8: asCScriptEngine::Release() const (as_scriptengine.cpp:619)==5778==    by 0x806E885: TestDynamicConfig::Test() (test_dynamicconfig.cpp:179)==5778==    by 0x804D0C7: main (main.cpp:214)==5778== -- TestDynamicConfig passed-- TestObjHandle passed-- TestGlobalVar passed-- TestScriptStruct passed-- TestRZ passed-- TestArray passed-- TestAny passed-- TestObjHandle2 passed-- TestMetaData passed-- TestDictionary passed-- TestVector3 passed-- TestConstObject passed-- TestImplicitCast passed-- TestImplicitHandle passed-- TestFor passed-- TestRefCast passed-- TestStdString passed-- TestStack2 passed-- TestStdVector passed-- TestArrayHandle passed-- TestDict passed-- TestMultiAssign passed-- TestException passed-- TestInt8 passed-- TestGeneric passed-- TestBStr passed-- TestTypedef passed-- TestImport passed-- TestAssign passed-- TestSwitch passed-- TestExceptionMemory passed-- TestObject passed-- TestFactory passed-- TestFuncOverload passed-- TestObjZeroSize passed-- TestSingleton passed-- TestCondition passed-- TestObject2 passed-- TestShark passed-- TestBool passed-- TestBits passed-- TestDestructor passed-- TestConstructor2 passed-- TestUnsafeRef passed-- TestVarType passed-- TestScriptMath passed-- TestDebug passed-- TestGetArgPtr passed-- TestAutoHandle passed-- TestObject3 passed-- TestArrayIntf passed-- TestConstProperty passed-- TestSuspend passed-- TestVector3_2 passed-- TestNested passed-- TestConstructor passed-- TestExecuteScript passed-- TestCustomMem passed-- TestPostProcess passed-- TestArgRef passed-- TestNotInitialized passed-- TestConfig passed-- TestInt64 passed-- TestImport2 passed-- TestEnumGlobVar passed-- TestConfigAccess passed-- TestDiscard passed-- TestParser passed-- TestFloat passed-- TestTempVar passed-- TestModuleRef passed-- TestExecuteString passed-- TestStack passed-- TestCreateEngine passed-- TestLongToken passed-- TestOutput passed-- Test2Func passed-- TestCircularImport passed-- TestNeverVisited passed-- TestExecute passed-- TestCDeclReturn passed-- TestExecute1Arg passed-- TestExecute2Args passed-- TestExecute4Args passed-- TestExecute4Argsf passed-- TestExecuteMixedArgs passed-- TestExecute32Args passed-- TestExecute32MixedArgs passed-- TestCDecl_Class passed-- TestCDecl_ClassA passed-- TestCDecl_ClassC passed-- TestCDecl_ClassD passed-- TestReturnString passed-- TestNegateOperator passed-- TestReturnWithCDeclObjFirst passed-- TestExecuteThis32MixedArgs passed-- TestNotComplexThisCall passed-- TestVirtualMethod passed-- TestMultipleInheritance passedTestVirtualInheritance: GNUC: AngelScript cannot detect virtual inheritance thus this test doesn't apply-- TestVirtualInheritance passed-- TestStdcall4Args passed-- TestNotComplexStdcall passed---------MEMORY STATISTICSnumber of allocations                 : 300599max allocated memory at any one time  : 147908max number of simultaneous allocations: 2508total amount of allocated memory      : 30703697medium size of allocations            : 102--------------------------------------------All of the tests passed with success.==5778== ==5778== HEAP SUMMARY:==5778==     in use at exit: 0 bytes in 0 blocks==5778==   total heap usage: 906,657 allocs, 906,657 frees, 45,466,142 bytes allocated==5778== ==5778== All heap blocks were freed -- no leaks are possible==5778== ==5778== For counts of detected and suppressed errors, rerun with: -v==5778== Use --track-origins=yes to see where uninitialised values come from==5778== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 19 from 8)
Exactly. This is the kind of information that MSVC doesn't give me. It would be great if this could be part of the automated runs.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Quote: Original post by WitchLord
Exactly. This is the kind of information that MSVC doesn't give me. It would be great if this could be part of the automated runs.


I added it to the Linux build.

I've added the MinGW build and it now works fine. You can ignore the warning about using -fPIC as it's not supported by windows.

You will also see the following warning in the output from test_feature:
Application tried to create a window, but no driver could be loaded.Make sure that your X server is running and that $DISPLAY is set correctly.err:systray:initialize_systray Could not create tray window


That is just WINE complaining that I don't have a X server running. Now I'm going to setup debian 64-bit.
I got the 64-bit slave working again, but I've now thought of another method. I know qemu also supports user-space emulation. With that I can cross-compile it on a 32-Bit machine and then just run test_feature using the emulation, which will greatly improve the speed.

I need to do some investigation on how to set-up a cross-compiler, and I've never tried the user-emulation.
Advertisement
I setup my webserver to proxy requests to the buildbot server, now you don't have to add the port number as it'll be transparently sent to the actual server.

http://angelscript-build.dyndns.org/
There is a problem with the way the builds are done. It doesn't detect when a file needs to be recompiled due to changes in a header file.

I added a couple of new properties in the script engine today, and now the automated tests failed. It links, but as the files were not recompiled so the code is not behaving as expected.

Any suggestion for how to improve that? Perhaps a manual 'make clean' command to force the rebuild of all files?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I deleted the build folders on the slaves to force a complete re-build. I'll have to figure out how to fix this in the future. Buildbot's config is difficult, probably mostly because of my dislike for Python.
Okay, I changed the svn checkout mode to clobber, which will make sure it deletes the old source-tree on each build.

This topic is closed to new replies.

Advertisement