Merged: Enable Coverity, Separate out debug and release builds for faster turnaround.

master
Christian Goetze (CG) 2010-08-18 19:30:59 -07:00
commit 7545d6209a
16 changed files with 166 additions and 92 deletions

View File

@ -175,8 +175,8 @@ viewer-development.login_channel = "Second Life Beta Development"
viewer-development.viewer_grid = agni
viewer-development.build_viewer_update_version_manager = false
# Notifications
viewer-development.email = "oz@lindenlab.com cg@lindenlab.com"
# Notifications - to configure email notices, add a setting like this:
# <username>_<reponame>.email = <email-address>
# =======================================
# brad

View File

@ -150,6 +150,8 @@ blino Nakamura
VWR-17
Boroondas Gupte
SNOW-278
SNOW-527
SNOW-624
VWR-233
WEB-262
Bulli Schumann
@ -518,6 +520,11 @@ Robin Cornelius
SNOW-108
SNOW-204
SNOW-484
SNOW-506
SNOW-514
SNOW-520
SNOW-507
SNOW-585
VWR-2488
VWR-9557
VWR-11128
@ -609,6 +616,7 @@ Teardrops Fall
VWR-5366
Techwolf Lupindo
SNOW-92
SNOW-649
VWR-12385
tenebrous pau
VWR-247
@ -616,6 +624,7 @@ Tharax Ferraris
VWR-605
Thickbrick Sleaford
SNOW-207
SNOW-743
VWR-7109
VWR-9287
VWR-13483

51
indra/develop.py Normal file → Executable file
View File

@ -76,6 +76,7 @@ class PlatformSetup(object):
distcc = True
cmake_opts = []
word_size = 32
using_express = False
def __init__(self):
self.script_dir = os.path.realpath(
@ -497,9 +498,17 @@ class WindowsSetup(PlatformSetup):
self._generator = version
print 'Building with ', self.gens[version]['gen']
break
else:
print >> sys.stderr, 'Cannot find a Visual Studio installation!'
sys.exit(1)
else:
print >> sys.stderr, 'Cannot find a Visual Studio installation, testing for express editions'
for version in 'vc80 vc90 vc71'.split():
if self.find_visual_studio_express(version):
self._generator = version
self.using_express = True
print 'Building with ', self.gens[version]['gen'] , "Express edition"
break
else:
print >> sys.stderr, 'Cannot find any Visual Studio installation'
sys.exit(1)
return self._generator
def _set_generator(self, gen):
@ -562,6 +571,28 @@ class WindowsSetup(PlatformSetup):
return ''
def find_visual_studio_express(self, gen=None):
if gen is None:
gen = self._generator
gen = gen.lower()
try:
import _winreg
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s\Setup\VC' %
self.gens[gen]['ver'])
value_str = (r'ProductDir')
print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' %
(key_str, value_str))
print key_str
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
key = _winreg.OpenKey(reg, key_str)
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
print 'Found: %s' % value
return value
except WindowsError, err:
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
return ''
def get_build_cmd(self):
if self.incredibuild:
config = self.build_type
@ -572,6 +603,17 @@ class WindowsSetup(PlatformSetup):
cmd = "%(bin)s %(prj)s.sln /build /cfg=%(cfg)s" % {'prj': self.project_name, 'cfg': config, 'bin': executable}
return (executable, cmd)
environment = self.find_visual_studio()
if environment == '':
environment = self.find_visual_studio_express()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio installation."
else:
build_dirs=self.build_dirs();
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for express specific information"
exit(0)
# devenv.com is CLI friendly, devenv.exe... not so much.
executable = '%sdevenv.com' % (self.find_visual_studio(),)
cmd = ('"%s" %s.sln /build %s' %
@ -603,7 +645,8 @@ class WindowsSetup(PlatformSetup):
'''Override to add the vstool.exe call after running cmake.'''
PlatformSetup.run_cmake(self, args)
if self.unattended == 'OFF':
self.run_vstool()
if self.using_express == False:
self.run_vstool()
def run_vstool(self):
for build_dir in self.build_dirs():

View File

@ -26,8 +26,6 @@ THE SOFTWARE.
$/LicenseInfo$
"""
from sets import Set, ImmutableSet
from compatibility import Incompatible, Older, Newer, Same
from tokenstream import TokenStream
@ -44,8 +42,8 @@ class Template:
def compatibleWithBase(self, base):
messagenames = (
ImmutableSet(self.messages.keys())
| ImmutableSet(base.messages.keys())
frozenset(self.messages.keys())
| frozenset(base.messages.keys())
)
compatibility = Same()

View File

@ -77,11 +77,12 @@ list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES})
add_library (llcharacter ${llcharacter_SOURCE_FILES})
# Add tests
include(LLAddBuildTest)
# UNIT TESTS
SET(llcharacter_TEST_SOURCE_FILES
lljoint.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llcharacter "${llcharacter_TEST_SOURCE_FILES}")
if(LL_TESTS)
# Add tests
include(LLAddBuildTest)
# UNIT TESTS
SET(llcharacter_TEST_SOURCE_FILES
lljoint.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llcharacter "${llcharacter_TEST_SOURCE_FILES}")
endif(LL_TESTS)

View File

@ -33,7 +33,7 @@
#include "lltimer.h"
// class for scheduling a function to be called at a given frequency (approximate, inprecise)
class LL_COMMON_API LLEventTimer : protected LLInstanceTracker<LLEventTimer>
class LL_COMMON_API LLEventTimer : public LLInstanceTracker<LLEventTimer>
{
public:
LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds

View File

@ -59,16 +59,16 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES})
add_library (llinventory ${llinventory_SOURCE_FILES})
if(LL_TESTS)
#add unit tests
INCLUDE(LLAddBuildTest)
SET(llinventory_TEST_SOURCE_FILES
# no real unit tests yet!
)
LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
#add unit tests
INCLUDE(LLAddBuildTest)
SET(llinventory_TEST_SOURCE_FILES
# no real unit tests yet!
)
LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
#set(TEST_DEBUG on)
set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
endif(LL_TESTS)

View File

@ -57,18 +57,21 @@ add_library (llplugin ${llplugin_SOURCE_FILES})
add_subdirectory(slplugin)
# Add tests
include(LLAddBuildTest)
# UNIT TESTS
SET(llplugin_TEST_SOURCE_FILES
llplugincookiestore.cpp
)
if (LL_TESTS)
# Add tests
include(LLAddBuildTest)
# llplugincookiestore has a dependency on curl, so we need to link the curl library into the test.
set_source_files_properties(
llplugincookiestore.cpp
PROPERTIES
LL_TEST_ADDITIONAL_LIBRARIES "${CURL_LIBRARIES}"
)
# UNIT TESTS
SET(llplugin_TEST_SOURCE_FILES
llplugincookiestore.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llplugin "${llplugin_TEST_SOURCE_FILES}")
# llplugincookiestore has a dependency on curl, so we need to link the curl library into the test.
set_source_files_properties(
llplugincookiestore.cpp
PROPERTIES
LL_TEST_ADDITIONAL_LIBRARIES "${CURL_LIBRARIES}"
)
LL_ADD_PROJECT_UNIT_TESTS(llplugin "${llplugin_TEST_SOURCE_FILES}")
endif (LL_TESTS)

View File

@ -53,9 +53,11 @@ list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES})
add_library (llprimitive ${llprimitive_SOURCE_FILES})
#add unit tests
INCLUDE(LLAddBuildTest)
SET(llprimitive_TEST_SOURCE_FILES
llmediaentry.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llprimitive "${llprimitive_TEST_SOURCE_FILES}")
if(LL_TESTS)
#add unit tests
INCLUDE(LLAddBuildTest)
SET(llprimitive_TEST_SOURCE_FILES
llmediaentry.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llprimitive "${llprimitive_TEST_SOURCE_FILES}")
endif(LL_TESTS)

View File

@ -240,10 +240,12 @@ target_link_libraries(llui
${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender
)
# Add tests
include(LLAddBuildTest)
SET(llui_TEST_SOURCE_FILES
llurlmatch.cpp
llurlentry.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
if(LL_TESTS)
# Add tests
include(LLAddBuildTest)
SET(llui_TEST_SOURCE_FILES
llurlmatch.cpp
llurlentry.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
endif(LL_TESTS)

View File

@ -67,15 +67,17 @@ if (DARWIN)
endif (DARWIN)
# Add tests
include(LLAddBuildTest)
# UNIT TESTS
SET(llvfs_TEST_SOURCE_FILES
# none so far
)
LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
if(LL_TESTS)
# Add tests
include(LLAddBuildTest)
# UNIT TESTS
SET(llvfs_TEST_SOURCE_FILES
# none so far
)
LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
# INTEGRATION TESTS
set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
# TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
# INTEGRATION TESTS
set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
# TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
endif(LL_TESTS)

View File

@ -45,24 +45,27 @@ target_link_libraries( llxml
${EXPAT_LIBRARIES}
)
# tests
# unit tests
if(LL_TESTS)
# tests
SET(llxml_TEST_SOURCE_FILES
# none yet!
)
LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}")
# unit tests
# integration tests
SET(llxml_TEST_SOURCE_FILES
# none yet!
)
LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}")
# set(TEST_DEBUG on)
set(test_libs
${LLXML_LIBRARIES}
${WINDOWS_LIBRARIES}
${LLMATH_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
# integration tests
LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}")
# set(TEST_DEBUG on)
set(test_libs
${LLXML_LIBRARIES}
${WINDOWS_LIBRARIES}
${LLMATH_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}")
endif(LL_TESTS)

View File

@ -53,7 +53,7 @@
namespace po = boost::program_options;
// *NTOE:MEP - Currently the boost object reside in file scope.
// *NOTE:MEP - Currently the boost object reside in file scope.
// This has a couple of negatives, they are always around and
// there can be only one instance of each.
// The plus is that the boost-ly-ness of this implementation is
@ -156,6 +156,12 @@ public:
return mIsComposing;
}
// Needed for boost 1.42
virtual bool is_required() const
{
return false; // All our command line options are optional.
}
virtual bool apply_default(boost::any& value_store) const
{
return false; // No defaults.
@ -169,7 +175,6 @@ public:
{
mNotifyCallback(*value);
}
}
protected:

View File

@ -33,7 +33,7 @@
class LLNameListCtrl
: public LLScrollListCtrl, protected LLInstanceTracker<LLNameListCtrl>
: public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl>
{
public:
typedef enum e_name_type

View File

@ -2651,7 +2651,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
LLVector3 pos, look_at;
U64 region_handle;
U8 region_access;
U8 region_access = SIM_ACCESS_MIN;
std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size);
std::string region_access_str = LLStringUtil::null;
std::string region_access_icn = LLStringUtil::null;

View File

@ -316,8 +316,11 @@ class WindowsManifest(ViewerManifest):
# For use in crash reporting (generates minidumps)
self.path("dbghelp.dll")
# For using FMOD for sound... DJS
self.path("fmod.dll")
try:
# FMOD for sound
self.path("fmod.dll")
except:
print "Skipping FMOD - not found"
self.enable_no_crt_manifest_check()
@ -643,8 +646,11 @@ class DarwinManifest(ViewerManifest):
):
self.path(os.path.join(libdir, libfile), libfile)
#libfmodwrapper.dylib
self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
try:
# FMOD for sound
self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
except:
print "Skipping FMOD - not found"
# our apps
self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
@ -933,7 +939,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libfmod-3.75.so")
pass
except:
print "Skipping libkdu_v42R.so - not found"
print "Skipping libfmod-3.75.so - not found"
pass
self.end_prefix("lib")