[RURBAN - Sat Sep 10 14:52:52 2005]:
Show quoted text> Windows requires a fallback on ncpu failure. See attached patch.
>
> Mysteriously Win32-TieRegistry-0.24 returns no keys for LMachine
> HARDWARE DESCRIPTION System CentralProcessor
>
> With this patch all tests pass.
I am confused. scalar keys() cannot return 0 for
\\LMachine\Hardware\Description\System\CentralProcessor when it returns values for keys
under subkey '0'. My cygwin (1.5.10 on W2k) just works fine.
I have applied the following patch to the development tree:
[ 911] By: abeltje on 2005-09-11 00:48:21 +0200
Log: * [CHANGE] thanks to reini urban
* use the Windows environment variables always as fallback
Url:
http://source.Test-Smoke.org/svn/Test-Smoke
! /Test-Smoke/lib/Test/Smoke/SysInfo.pm
Index: lib/Test/Smoke/SysInfo.pm
=========================================================
==========
--- lib/Test/Smoke/SysInfo.pm (revision 910)
+++ lib/Test/Smoke/SysInfo.pm (revision 911)
@@ -3,7 +3,7 @@
# $Id$
use vars qw( $VERSION @EXPORT_OK );
-$VERSION = '0.026';
+$VERSION = '0.027';
use base 'Exporter';
@EXPORT_OK = qw( &sysinfo &tsuname );
@@ -551,10 +551,8 @@
=cut
sub Windows {
+ my( $cpu_type, $cpu, $ncpu );
- my $cpu_type = $ENV{PROCESSOR_ARCHITECTURE};
- my $cpu = $ENV{PROCESSOR_IDENTIFIER};
- my $ncpu = $ENV{NUMBER_OF_PROCESSORS};
eval { require Win32::TieRegistry };
unless ( $@ ) {
Win32::TieRegistry->import();
@@ -574,9 +572,9 @@
}
return {
- _cpu_type => $cpu_type,
- _cpu => $cpu,
- _ncpu => $ncpu,
+ _cpu_type => ( $cpu_type || $ENV{PROCESSOR_ARCHITECTURE} ),
+ _cpu => ( $cpu || $ENV{PROCESSOR_IDENTIFIER} ),
+ _ncpu => ( $ncpu || $ENV{NUMBER_OF_PROCESSORS} ),
_host => __get_hostname(),
_os => __get_os(),
};
-- Generated by 'svnchanges' (0.013) --