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


PHP phodevi::cpu_arch_compatible方法代码示例

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


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

示例1: generate_download_object_list

 public function generate_download_object_list($do_file_checks = true)
 {
     $download_xml_file = $this->test_profile->get_file_download_spec();
     if ($download_xml_file != null) {
         $xml_parser = new pts_test_downloads_nye_XmlReader($download_xml_file);
         $package_url = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/URL');
         $package_md5 = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/MD5');
         $package_sha256 = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/SHA256');
         $package_filename = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/FileName');
         $package_filesize = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/FileSize');
         $package_platform = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/PlatformSpecific');
         $package_architecture = $xml_parser->getXMLArrayValues('PhoronixTestSuite/Downloads/Package/ArchitectureSpecific');
         foreach (array_keys($package_url) as $i) {
             if (!empty($package_platform[$i]) && $do_file_checks) {
                 $platforms = pts_strings::comma_explode($package_platform[$i]);
                 if (!in_array(phodevi::operating_system(), $platforms) && !(phodevi::is_bsd() && in_array('Linux', $platforms) && (pts_client::executable_in_path('kldstat') && strpos(shell_exec('kldstat -n linux 2>&1'), 'linux.ko') != false))) {
                     // This download does not match the operating system
                     continue;
                 }
             }
             if (!empty($package_architecture[$i]) && $do_file_checks) {
                 $architectures = pts_strings::comma_explode($package_architecture[$i]);
                 if (phodevi::cpu_arch_compatible($architectures) == false) {
                     // This download does not match the CPU architecture
                     continue;
                 }
             }
             $this->test_files[] = new pts_test_file_download($package_url[$i], $package_filename[$i], $package_filesize[$i], $package_md5[$i], $package_sha256[$i], $package_platform[$i], $package_architecture[$i]);
         }
     }
 }
开发者ID:pacificIT,项目名称:phoronix-test-suite,代码行数:31,代码来源:pts_test_install_request.php

示例2: is_test_architecture_supported

 public function is_test_architecture_supported()
 {
     // Check if the system's architecture is supported by a test
     $archs = $this->get_supported_architectures();
     return !empty($archs) ? phodevi::cpu_arch_compatible($archs) : true;
 }
开发者ID:pacificIT,项目名称:phoronix-test-suite,代码行数:6,代码来源:pts_test_profile.php

示例3: is_test_architecture_supported

 public function is_test_architecture_supported()
 {
     // Check if the system's architecture is supported by a test
     $supported = true;
     $archs = $this->get_supported_architectures();
     if (!empty($archs)) {
         $supported = phodevi::cpu_arch_compatible($archs);
     }
     return $supported;
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:10,代码来源:pts_test_profile.php


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