Place pifr.php in the root of drupal to make test run without configuring master
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once drupal_get_path('module', 'pifr_client') . '/review/pifr_client_review.inc';
$base_url = 'http://test.client.example.com';
$test = array(
'test_id' => '7',
'core' => array (
'repository' => array (
'type' => 'cvs',
'url' => ':pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/drupal',
),
'branch_identifier' => 'HEAD',
),
// 'file_url' => url('pass.patch', array('absolute' => TRUE)), //'http://example.com/pifr_server/some.patch',
'file_url' => url(drupal_get_path('module', 'pifr_server') .'/confirmation/pass.patch', array('absolute' => TRUE)),
);
$review = new PIFRClientReview($test);
$review->run();
print '<h3>' . t('Self test') . '</h3>';
print '<div class="pifr-client-section">'. var_export($review, TRUE) .'</div>';
drupal_page_footer();
Comments
Comment #1
boombatower commentedLets work this into a button or something and make a proper patch.
Comment #2
boombatower commentedComment #3
boombatower commentedHere is a cleaned up version.
Comment #4
boombatower commentedCommitted.
Comment #5
Amazon commentedAre there some instructions on how this to use this? Is this script going to be installed in all instances, or do you symlink it from the /scripts directory to the root directory?
Comment #6
boombatower commentedAll you need to do is hit in web browser and it will dump out the results.
Comment #7
boombatower commentedComment #8
boombatower commentedCommitted.
Comment #9
robezy commentedHi,
I got following error when i ran the script.
PIFRClientReview::__set_state(array( 'CHECKOUT_DIRECTORY' => 'sites/default/files/checkout', 'REVIEW_DIRECTORY' => 'sites/default/files/review', 'database' => PIFRClientReviewDB_mysql::__set_state(array( )), 'vcs' => array ( 'cvs' => PIFRClientReviewVCS_cvs::__set_state(array( )), ), 'test' => array ( 'test_id' => '7', 'core' => array ( 'repository' => array ( 'type' => 'cvs', 'url' => ':pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/drupal', ), 'branch_identifier' => 'HEAD', ), 'file_url' => 'http://test.client.example.com/sites/all/modules/project_issue_file_revi...', ), 'filePath' => NULL, 'adminPassword' => NULL, 'error' => array ( '@reason' => 'failed to retrieve file from project client', 'code' => 2, ), ))
Am i supposed to change the base_url of variable in the script?
Comment #10
boombatower commentedI guess you can add the base_url variable as in the initial post. My thoughts were to run it through the browser so all the regular variables were created.
Per #6: