本文整理汇总了PHP中phodevi::read_device_notes方法的典型用法代码示例。如果您正苦于以下问题:PHP phodevi::read_device_notes方法的具体用法?PHP phodevi::read_device_notes怎么用?PHP phodevi::read_device_notes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phodevi
的用法示例。
在下文中一共展示了phodevi::read_device_notes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run_test
//.........这里部分代码省略.........
// The test ended too quickly, results are not valid
self::test_run_error($test_run_manager, $test_run_request, 'This test ended prematurely.');
return false;
}
}
if (!empty($max_length)) {
if ($max_length < $time_test_elapsed_actual) {
// The test took too much time, results are not valid
self::test_run_error($test_run_manager, $test_run_request, 'This test run was exhausted.');
return false;
}
}
if ($allow_cache_share && !is_file($cache_share_pt2so) && $cache_share instanceof pts_storage_object) {
$cache_share->save_to_file($cache_share_pt2so);
unset($cache_share);
}
if ($test_run_manager->get_results_identifier() != null && pts_config::read_bool_config('PhoronixTestSuite/Options/Testing/SaveInstallationLogs', 'FALSE')) {
if (is_file($test_run_request->test_profile->get_install_dir() . 'install.log')) {
$backup_log_dir = PTS_SAVE_RESULTS_PATH . $test_run_manager->get_file_name() . '/installation-logs/' . $test_run_manager->get_results_identifier() . '/';
pts_file_io::mkdir($backup_log_dir, 0777, true);
copy($test_run_request->test_profile->get_install_dir() . 'install.log', $backup_log_dir . basename($test_identifier) . '.log');
}
}
// Fill in missing test details
if (empty($arguments_description)) {
$arguments_description = $test_run_request->test_profile->get_test_subtitle();
}
$file_var_checks = array(array('pts-results-scale', 'set_result_scale', null), array('pts-results-proportion', 'set_result_proportion', null), array('pts-results-quantifier', 'set_result_quantifier', null), array('pts-test-version', 'set_version', null), array('pts-test-description', null, 'set_used_arguments_description'), array('pts-footnote', null, null));
foreach ($file_var_checks as &$file_check) {
list($file, $set_function, $result_set_function) = $file_check;
if (is_file($test_directory . $file)) {
$file_contents = pts_file_io::file_get_contents($test_directory . $file);
unlink($test_directory . $file);
if (!empty($file_contents)) {
if ($set_function != null) {
call_user_func(array($test_run_request->test_profile, $set_function), $file_contents);
} else {
if ($result_set_function != null) {
if ($result_set_function == 'set_used_arguments_description') {
$arguments_description = $file_contents;
} else {
call_user_func(array($test_run_request, $result_set_function), $file_contents);
}
} else {
if ($file == 'pts-footnote') {
$test_run_request->test_profile->test_installation->set_install_footnote($file_contents);
}
}
}
}
}
}
if (empty($arguments_description)) {
$arguments_description = 'Phoronix Test Suite v' . PTS_VERSION;
}
foreach (pts_client::environmental_variables() as $key => $value) {
$arguments_description = str_replace('$' . $key, $value, $arguments_description);
if (!in_array($key, array('VIDEO_MEMORY', 'NUM_CPU_CORES', 'NUM_CPU_JOBS'))) {
$extra_arguments = str_replace('$' . $key, $value, $extra_arguments);
}
}
// Any device notes to add to PTS test notes area?
foreach (phodevi::read_device_notes($test_type) as $note) {
pts_test_notes_manager::add_note($note);
}
// As of PTS 4.4, this is removed and superceded effectively by reporting the notes to table
// Any special information (such as forced AA/AF levels for graphics) to add to the description string of the result?
/*
if(($special_string = phodevi::read_special_settings_string($test_type)) != null)
{
if(strpos($arguments_description, $special_string) === false)
{
if($arguments_description != null)
{
$arguments_description .= ' | ';
}
$arguments_description .= $special_string;
}
}
*/
// Result Calculation
$test_run_request->set_used_arguments_description($arguments_description);
$test_run_request->set_used_arguments($extra_arguments);
pts_test_result_parser::calculate_end_result($test_run_request, $active_result_buffer);
// Process results
pts_client::$display->test_run_end($test_run_request);
pts_client::$display->display_interrupt_message($test_run_request->test_profile->get_post_run_message());
pts_module_manager::module_process('__post_test_run', $test_run_request);
$report_elapsed_time = $cache_share_present == false && $test_run_request->active->get_result() != 0;
pts_tests::update_test_install_xml($test_run_request->test_profile, $report_elapsed_time ? $time_test_elapsed : 0);
pts_storage_object::add_in_file(PTS_CORE_STORAGE, 'total_testing_time', $time_test_elapsed / 60);
if ($report_elapsed_time && pts_client::do_anonymous_usage_reporting() && $time_test_elapsed >= 60) {
// If anonymous usage reporting enabled, report test run-time to OpenBenchmarking.org
pts_openbenchmarking_client::upload_usage_data('test_complete', array($test_run_request, $time_test_elapsed));
}
// Remove lock
pts_client::release_lock($lock_file);
return $active_result_buffer;
}