pts-core: Various fixes
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
if [ `whoami` = "root" ] && [ ! -w /usr/bin/sudo ]; then
|
||||
yum -y install $*
|
||||
elif [ -x /usr/bin/dnf ]; then
|
||||
sudo dnf -y --skip-unavailable install $*
|
||||
sudo dnf -y install $* --skip-unavailable
|
||||
command_status=$?
|
||||
if [ $command_status -ne 0 ]; then
|
||||
# RHEL 10 and older error out, Fedora ~42 and newer have --skip-unavailable
|
||||
|
||||
@@ -400,11 +400,6 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
}
|
||||
else if(phodevi::is_linux() || phodevi::is_bsd() || phodevi::is_solaris())
|
||||
{
|
||||
if($resolution == false && pts_client::executable_in_path('xrandr'))
|
||||
{
|
||||
$resolution = self::gpu_xrandr_resolution();
|
||||
}
|
||||
|
||||
if($resolution == false && phodevi::is_linux())
|
||||
{
|
||||
// Before calling xrandr first try to get the resolution through KMS path
|
||||
@@ -426,6 +421,11 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
|
||||
if($resolution == false && pts_client::executable_in_path('xrandr'))
|
||||
{
|
||||
$resolution = self::gpu_xrandr_resolution();
|
||||
}
|
||||
|
||||
if($resolution == false && phodevi::is_nvidia_graphics())
|
||||
{
|
||||
// Way to find resolution through NVIDIA's NV-CONTROL extension
|
||||
|
||||
@@ -97,6 +97,18 @@ class phodevi_memory extends phodevi_device_interface
|
||||
else if(pts_client::executable_in_path('udevadm'))
|
||||
{
|
||||
$memory_device_data = phodevi_linux_parser::read_udevadm_info(array('MEMORY_DEVICE', 'MEMORY_ARRAY'));
|
||||
if(!isset($memory_device_data['MEMORY_ARRAY_NUM_DEVICES']))
|
||||
{
|
||||
$num_devices = 0;
|
||||
while(isset($memory_device_data['MEMORY_DEVICE_' . $num_devices . '_SIZE']))
|
||||
{
|
||||
$num_devices++;
|
||||
}
|
||||
if($num_devices > 0)
|
||||
{
|
||||
$memory_device_data['MEMORY_ARRAY_NUM_DEVICES'] = $num_devices;
|
||||
}
|
||||
}
|
||||
if(isset($memory_device_data['MEMORY_ARRAY_NUM_DEVICES']) && is_numeric($memory_device_data['MEMORY_ARRAY_NUM_DEVICES']) && $memory_device_data['MEMORY_ARRAY_NUM_DEVICES'] > 0)
|
||||
{
|
||||
for($i = 0; $i < $memory_device_data['MEMORY_ARRAY_NUM_DEVICES']; $i++)
|
||||
@@ -241,7 +253,7 @@ class phodevi_memory extends phodevi_device_interface
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = str_replace(array(' MB', ' GB'), '', $mem_size[0]);
|
||||
$t = !isset($mem_size[0]) || empty($mem_size[0]) ? 0 : str_replace(array(' MB', ' GB'), '', $mem_size[0]);
|
||||
if(($mem_count * $t) != phodevi::read_property('memory', 'capacity') && phodevi::read_property('memory', 'capacity') % $t == 0)
|
||||
{
|
||||
// This makes sure the correct number of RAM modules is reported...
|
||||
|
||||
@@ -33,7 +33,7 @@ class memory_temp extends phodevi_sensor
|
||||
|
||||
if(pts_client::executable_in_path('ipmitool'))
|
||||
{
|
||||
$ipmi = phodevi_linux_parser::read_ipmitool_sensor(array('DIMM_MOSFET_1', 'DIMM_MOSFET_2', 'DDR4_A1_Temp', 'DIMMA~F Temp'));
|
||||
$ipmi = phodevi_linux_parser::read_ipmitool_sensor(array('DIMM_MOSFET_1', 'DIMM_MOSFET_2', 'DDR4_A1_Temp', 'DIMMA~F Temp', 'DIMMG0_TEMP'));
|
||||
|
||||
if($ipmi > 0 && is_numeric($ipmi))
|
||||
{
|
||||
|
||||
@@ -512,7 +512,7 @@ class phoromatic_server
|
||||
$headers = "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-type:text/html;charset=UTF-8\r\n";
|
||||
$headers .= "From: Phoromatic - Phoronix Test Suite <no-reply@phoromatic.com>\r\n";
|
||||
$headers .= "Reply-To: " . $from . " <" . $from . ">\r\n";
|
||||
$headers .= "Reply-To: " . $from . "\r\n";
|
||||
mail($to, $subject, $msg, $headers);
|
||||
}
|
||||
protected static function rebuild_pprid_entries()
|
||||
|
||||
@@ -322,7 +322,7 @@ class pts_render
|
||||
{
|
||||
$paint_color = '#f1052d';
|
||||
}
|
||||
else if(strpos($i, 'intel ') !== false || strpos($i, 'xeon ') !== false || strpos($i, 'core i') !== false || strpos($i, 'core ultra') !== false || strpos($i, 'pentium') !== false || strpos($i, 'celeron') !== false || strpos($i, 'Arc ') !== false)
|
||||
else if(strpos($i, 'intel ') !== false || strpos($i, 'xeon ') !== false || strpos($i, 'core i') !== false || strpos($i, 'core ultra') !== false || strpos($i, 'pentium') !== false || strpos($i, 'celeron') !== false || strpos($i, 'arc ') !== false)
|
||||
{
|
||||
$paint_color = '#0b5997';
|
||||
}
|
||||
|
||||
@@ -831,7 +831,15 @@ class pts_result_file_analyzer
|
||||
|
||||
if($do_perf_per_sensor != false && stripos($this_sensor, $do_perf_per_sensor) !== false && $result->get_parent_hash() != '' && !empty($this_round))
|
||||
{
|
||||
$perf_per_result = clone $result_file->get_result($result->get_parent_hash());
|
||||
if($result_file->get_result($result->get_parent_hash()))
|
||||
{
|
||||
$perf_per_result = clone $result_file->get_result($result->get_parent_hash());
|
||||
}
|
||||
else
|
||||
{
|
||||
$perf_per_result = false;
|
||||
}
|
||||
|
||||
if($perf_per_result && $perf_per_result->test_profile->get_display_format() == 'BAR_GRAPH')
|
||||
{
|
||||
$perf_per_result->test_profile->set_identifier(null);
|
||||
|
||||
@@ -124,7 +124,7 @@ if(defined('PATH_TO_PHOROMATIC_ML_DB') && PATH_TO_PHOROMATIC_ML_DB != null)
|
||||
$headers = "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-type:text/html;charset=UTF-8\r\n";
|
||||
$headers .= "From: Phoromatic - Phoronix Test Suite <no-reply@phoromatic.com>\r\n";
|
||||
$headers .= "Reply-To: " . $from . " <" . $from . ">\r\n";
|
||||
$headers .= "Reply-To: " . $from . "\r\n";
|
||||
|
||||
mail($to, $subject, $msg, $headers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user