From 21a8d1f638e618765e9beabba71f434fea7b4864 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Thu, 14 May 2009 19:24:24 +0000 Subject: Make develop.py work on eniacs the same way it works on stations --- indra/develop.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index f4143eb65c..363cec7583 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -370,22 +370,27 @@ class LinuxSetup(UnixSetup): cpus += m and int(m.group(1)) or 1 return hosts, cpus - def mk_distcc_hosts(): + def mk_distcc_hosts(basename, range): '''Generate a list of LL-internal machines to build on.''' loc_entry, cpus = localhost() hosts = [loc_entry] dead = [] - stations = [s for s in xrange(36) if s not in dead] + stations = [s for s in xrange(range) if s not in dead] random.shuffle(stations) - hosts += ['station%d.lindenlab.com/2,lzo' % s for s in stations] + hosts += ['%s%d.lindenlab.com/2,lzo' % (basename, s) for s in stations] cpus += 2 * len(stations) return ' '.join(hosts), cpus if job_count is None: hosts, job_count = count_distcc_hosts() - if hosts == 1 and socket.gethostname().startswith('station'): - hosts, job_count = mk_distcc_hosts() - os.putenv('DISTCC_HOSTS', hosts) + if hosts == 1: + hostname = socket.gethostname() + if hostname.startswith('station'): + hosts, job_count = mk_distcc_hosts('station', 36) + os.putenv('DISTCC_HOSTS', hosts) + if hostname.startswith('eniac'): + hosts, job_count = mk_distcc_hosts('eniac', 64) + os.putenv('DISTCC_HOSTS', hosts) opts.extend(['-j', str(job_count)]) if targets: -- cgit v1.2.3 From 32100098f59e7598f8399b319f1bab8df6827ef0 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Thu, 14 May 2009 20:26:00 +0000 Subject: There are 71 eniacs, not just 64 --- indra/develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index 363cec7583..ce12b33103 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -389,7 +389,7 @@ class LinuxSetup(UnixSetup): hosts, job_count = mk_distcc_hosts('station', 36) os.putenv('DISTCC_HOSTS', hosts) if hostname.startswith('eniac'): - hosts, job_count = mk_distcc_hosts('eniac', 64) + hosts, job_count = mk_distcc_hosts('eniac', 71) os.putenv('DISTCC_HOSTS', hosts) opts.extend(['-j', str(job_count)]) -- cgit v1.2.3 From 65c86eadcb954b85bc40ea4ea8300d80c0927521 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Thu, 14 May 2009 20:56:03 +0000 Subject: Max out distcc jobs to 12 in develop.py --- indra/develop.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index ce12b33103..dfc658edec 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -391,6 +391,8 @@ class LinuxSetup(UnixSetup): if hostname.startswith('eniac'): hosts, job_count = mk_distcc_hosts('eniac', 71) os.putenv('DISTCC_HOSTS', hosts) + if job_count > 12: + job_count = 12; opts.extend(['-j', str(job_count)]) if targets: -- cgit v1.2.3 From 0257214763203708e8e29d09346e777b95cdfce6 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Thu, 14 May 2009 21:20:37 +0000 Subject: Set DISTCC_DIR to a location inside the source tree to avoid causing NFS trouble with the default setting. --- indra/develop.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index dfc658edec..90b665e8b1 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -370,26 +370,32 @@ class LinuxSetup(UnixSetup): cpus += m and int(m.group(1)) or 1 return hosts, cpus - def mk_distcc_hosts(basename, range): + def mk_distcc_hosts(basename, range, num_cpus): '''Generate a list of LL-internal machines to build on.''' loc_entry, cpus = localhost() hosts = [loc_entry] dead = [] stations = [s for s in xrange(range) if s not in dead] random.shuffle(stations) - hosts += ['%s%d.lindenlab.com/2,lzo' % (basename, s) for s in stations] + hosts += ['%s%d.lindenlab.com/%d,lzo' % (basename, s, num_cpus) for s in stations] cpus += 2 * len(stations) return ' '.join(hosts), cpus + if os.getenv('DISTCC_DIR') is None: + distcc_dir = os.path.join(getcwd(), '.distcc') + if not os.path.exists(distcc_dir): + os.mkdir(distcc_dir) + os.putenv('DISTCC_DIR', distcc_dir) + if job_count is None: hosts, job_count = count_distcc_hosts() if hosts == 1: hostname = socket.gethostname() if hostname.startswith('station'): - hosts, job_count = mk_distcc_hosts('station', 36) + hosts, job_count = mk_distcc_hosts('station', 36, 2) os.putenv('DISTCC_HOSTS', hosts) if hostname.startswith('eniac'): - hosts, job_count = mk_distcc_hosts('eniac', 71) + hosts, job_count = mk_distcc_hosts('eniac', 71, 2) os.putenv('DISTCC_HOSTS', hosts) if job_count > 12: job_count = 12; -- cgit v1.2.3 From 8c5ca38f1d48edace2a67df00dc319381dc313af Mon Sep 17 00:00:00 2001 From: Mark Palange Date: Tue, 19 May 2009 23:41:59 +0000 Subject: Fix to develop.py to build on 64 bit windows. Added March 2009 DirectX SDK to cmake config. Reviewed by brad --- indra/develop.py | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index 90b665e8b1..f670c66639 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -538,27 +538,35 @@ class WindowsSetup(PlatformSetup): '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s "%(dir)s"' % args) + def get_HKLM_registry_value(self, key_str, value_str): + import _winreg + reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE) + key = _winreg.OpenKey(reg, key_str) + value = _winreg.QueryValueEx(key, value_str)[0] + print 'Found: %s' % value + return value + def find_visual_studio(self, gen=None): if gen is None: gen = self._generator gen = gen.lower() + value_str = (r'EnvironmentDirectory') + key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VS' % + self.gens[gen]['ver']) + print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' % + (key_str, value_str)) try: - import _winreg - key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VS' % - self.gens[gen]['ver']) - value_str = (r'EnvironmentDirectory') - 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] - print 'Found: %s' % value - return value + return self.get_HKLM_registry_value(key_str, value_str) except WindowsError, err: + key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' % + self.gens[gen]['ver']) + + try: + return self.get_HKLM_registry_value(key_str, value_str) + except: print >> sys.stderr, "Didn't find ", self.gens[gen]['gen'] - return '' + + return '' def get_build_cmd(self): if self.incredibuild: -- cgit v1.2.3 From 77c1e2b761b2d7321e9c5f39e716e769c3a2effd Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Thu, 21 May 2009 20:59:56 +0000 Subject: Fix develop.py putenv bug, use new etch build-linux hosts for parabuild. --- indra/develop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index f670c66639..1398bca935 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -385,7 +385,7 @@ class LinuxSetup(UnixSetup): distcc_dir = os.path.join(getcwd(), '.distcc') if not os.path.exists(distcc_dir): os.mkdir(distcc_dir) - os.putenv('DISTCC_DIR', distcc_dir) + os.environ['DISTCC_DIR'] = distcc_dir if job_count is None: hosts, job_count = count_distcc_hosts() @@ -393,10 +393,10 @@ class LinuxSetup(UnixSetup): hostname = socket.gethostname() if hostname.startswith('station'): hosts, job_count = mk_distcc_hosts('station', 36, 2) - os.putenv('DISTCC_HOSTS', hosts) + os.environ['DISTCC_HOSTS'] = hosts if hostname.startswith('eniac'): hosts, job_count = mk_distcc_hosts('eniac', 71, 2) - os.putenv('DISTCC_HOSTS', hosts) + os.environ['DISTCC_HOSTS'] = hosts if job_count > 12: job_count = 12; opts.extend(['-j', str(job_count)]) -- cgit v1.2.3 From 93cf3d89e51835dd2f61c32b16191ab724528055 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Thu, 21 May 2009 21:25:09 +0000 Subject: Put the os.environ["DISTCC"] = ... call into main() --- indra/develop.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index 1398bca935..345dd1cb9b 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -381,12 +381,6 @@ class LinuxSetup(UnixSetup): cpus += 2 * len(stations) return ' '.join(hosts), cpus - if os.getenv('DISTCC_DIR') is None: - distcc_dir = os.path.join(getcwd(), '.distcc') - if not os.path.exists(distcc_dir): - os.mkdir(distcc_dir) - os.environ['DISTCC_DIR'] = distcc_dir - if job_count is None: hosts, job_count = count_distcc_hosts() if hosts == 1: @@ -710,6 +704,15 @@ Examples: ''' def main(arguments): + if os.getenv('DISTCC_DIR') is None: + distcc_dir = os.path.join(getcwd(), '.distcc') + if not os.path.exists(distcc_dir): + os.mkdir(distcc_dir) + print "setting DISTCC_DIR to %s" % distcc_dir + os.environ['DISTCC_DIR'] = distcc_dir + else: + print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR') + setup = setup_platform[sys.platform]() try: opts, args = getopt.getopt( -- cgit v1.2.3 From f9b9372027a41900ad572afcd7ea0d2cc5489b8f Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Wed, 3 Jun 2009 23:18:22 +0000 Subject: Remove -parallelizeTargets from xcodebuild invocation, it seems to not work well enough --- indra/develop.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index 345dd1cb9b..b40e81bb07 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -451,8 +451,7 @@ class DarwinSetup(UnixSetup): targets = ' '.join(['-target ' + repr(t) for t in targets]) else: targets = '' - cmd = ('xcodebuild -parallelizeTargets ' - '-configuration %s %s %s' % + cmd = ('xcodebuild -configuration %s %s %s' % (self.build_type, ' '.join(opts), targets)) for d in self.build_dirs(): try: -- cgit v1.2.3 From 351ebe9fcb76f3b99c2957004bb8493a904869ee Mon Sep 17 00:00:00 2001 From: Paul Oppenheim Date: Fri, 19 Jun 2009 23:24:11 +0000 Subject: result of "svn merge -r123757:124890 svn+ssh://svn.lindenlab.com/svn/linden/branches/improve-unit-testing/iface-04" for QAR-1496 --- indra/develop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index b40e81bb07..1d7ac42c9c 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -451,7 +451,9 @@ class DarwinSetup(UnixSetup): targets = ' '.join(['-target ' + repr(t) for t in targets]) else: targets = '' - cmd = ('xcodebuild -configuration %s %s %s' % + # cmd = ('xcodebuild -parallelizeTargets ' # parallelizeTargets is suspected of non-deterministic build failures. + poppy 2009-06-05 + cmd = ('xcodebuild ' + '-configuration %s %s %s' % (self.build_type, ' '.join(opts), targets)) for d in self.build_dirs(): try: -- cgit v1.2.3