当前位置: 首页>>代码示例>>PHP>>正文


PHP phodevi::system_id_string方法代码示例

本文整理汇总了PHP中phodevi::system_id_string方法的典型用法代码示例。如果您正苦于以下问题:PHP phodevi::system_id_string方法的具体用法?PHP phodevi::system_id_string怎么用?PHP phodevi::system_id_string使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phodevi的用法示例。


在下文中一共展示了phodevi::system_id_string方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: needs_updated_install

 public function needs_updated_install()
 {
     foreach (pts_types::identifiers_to_test_profile_objects($this->get_identifier(), false, true) as $test_profile) {
         if ($test_profile->test_installation == false || $test_profile->test_installation->get_installed_system_identifier() != phodevi::system_id_string() || pts_c::$test_flags & pts_c::force_install) {
             return true;
         }
     }
     return false;
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:9,代码来源:pts_test_suite.php

示例2: needs_updated_install

 public function needs_updated_install()
 {
     // Checks if test needs updating
     return $this->test_installation == false || $this->get_test_profile_version() != $this->test_installation->get_installed_version() || $this->get_installer_checksum() != $this->test_installation->get_installed_checksum() || $this->test_installation->get_installed_system_identifier() != phodevi::system_id_string();
 }
开发者ID:pacificIT,项目名称:phoronix-test-suite,代码行数:5,代码来源:pts_test_profile.php

示例3: update_test_install_xml

 public static function update_test_install_xml(&$test_profile, $this_duration = 0, $is_install = false, $compiler_data = null, $install_footnote = null)
 {
     // Refresh/generate an install XML for pts-install.xml
     if ($test_profile->test_installation == false) {
         // XXX: Hackish way to avoid problems until this function is better written for clean installations, etc
         $test_profile->test_installation = new pts_installed_test($test_profile);
     }
     $xml_writer = new nye_XmlWriter('file://' . PTS_USER_PATH . 'xsl/' . 'pts-test-installation-viewer.xsl');
     $test_duration = $test_profile->test_installation->get_average_run_time();
     if (!is_numeric($test_duration) && !$is_install) {
         $test_duration = $this_duration;
     }
     if (!$is_install && is_numeric($this_duration) && $this_duration > 0) {
         $test_duration = ceil(($test_duration * $test_profile->test_installation->get_run_count() + $this_duration) / ($test_profile->test_installation->get_run_count() + 1));
     }
     $compiler_data = $is_install ? $compiler_data : $test_profile->test_installation->get_compiler_data();
     $install_footnote = $is_install ? $install_footnote : $test_profile->test_installation->get_install_footnote();
     $test_version = $is_install ? $test_profile->get_test_profile_version() : $test_profile->test_installation->get_installed_version();
     $test_checksum = $is_install ? $test_profile->get_installer_checksum() : $test_profile->test_installation->get_installed_checksum();
     $sys_identifier = $is_install ? phodevi::system_id_string() : $test_profile->test_installation->get_installed_system_identifier();
     $install_time = $is_install ? date('Y-m-d H:i:s') : $test_profile->test_installation->get_install_date_time();
     $install_time_length = $is_install ? $this_duration : $test_profile->test_installation->get_latest_install_time();
     $latest_run_time = $is_install || $this_duration == 0 ? $test_profile->test_installation->get_latest_run_time() : $this_duration;
     $times_run = $test_profile->test_installation->get_run_count();
     if ($is_install) {
         $last_run = $latest_run_time;
         if (empty($last_run)) {
             $last_run = '0000-00-00 00:00:00';
         }
     } else {
         $last_run = date('Y-m-d H:i:s');
         $times_run++;
     }
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/Environment/Identifier', $test_profile->get_identifier());
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/Environment/Version', $test_version);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/Environment/CheckSum', $test_checksum);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/Environment/CompilerData', json_encode($compiler_data));
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/Environment/InstallFootnote', $install_footnote);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/Environment/SystemIdentifier', $sys_identifier);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/History/InstallTime', $install_time);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/History/InstallTimeLength', $install_time_length);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/History/LastRunTime', $last_run);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/History/TimesRun', $times_run);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/History/AverageRunTime', $test_duration);
     $xml_writer->addXmlNode('PhoronixTestSuite/TestInstallation/History/LatestRunTime', $latest_run_time);
     $xml_writer->saveXMLFile($test_profile->get_install_dir() . 'pts-install.xml');
 }
开发者ID:ptzafrir,项目名称:phoronix-test-suite,代码行数:47,代码来源:pts_tests.php


注:本文中的phodevi::system_id_string方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。