當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。