public function check_download_caches_for_files() { pts_client::$display->test_install_progress_start('Searching Download Caches'); $test_count = count($this->tests_to_install); $remote_files = self::remote_files_available_in_download_caches(); $local_download_caches = self::local_download_caches(); $remote_download_caches = self::remote_download_caches(); $phoromatic_server_caches = pts_test_install_manager::phoromatic_download_server_caches(); foreach ($this->tests_to_install as $i => &$test_install_request) { $test_install_request->scan_download_caches($local_download_caches, $remote_download_caches, $remote_files, $phoromatic_server_caches); pts_client::$display->test_install_progress_update($i / $test_count); } pts_client::$display->test_install_progress_completed(); }
public static function test_files_available_locally(&$test_profile, $include_extended_test_profiles = true) { $install_request = new pts_test_install_request($test_profile); $remote_files = pts_test_install_manager::remote_files_available_in_download_caches(); $local_download_caches = pts_test_install_manager::local_download_caches(); $remote_download_caches = pts_test_install_manager::remote_download_caches(); $phoromatic_server_caches = pts_test_install_manager::phoromatic_download_server_caches(); $install_request->generate_download_object_list(); $install_request->scan_download_caches($local_download_caches, $remote_download_caches, $remote_files, $phoromatic_server_caches); foreach ($install_request->get_download_objects() as $download_object) { if ($download_object->get_download_location_type() == null) { return false; } } foreach ($install_request->test_profile->extended_test_profiles() as $extended_test_profile) { if (self::test_files_available_locally($extended_test_profile) == false) { return false; } } return true; }