diff --git a/tools/bin/scripts/cli.php b/tools/bin/scripts/cli.php deleted file mode 100644 index 823e82ee713d..000000000000 --- a/tools/bin/scripts/cli.php +++ /dev/null @@ -1,110 +0,0 @@ -/sites directory) - * - */ -$include_path = "../packages/:" . get_include_path(); -set_include_path($include_path); - -/** - * Class civicrm_CLI - */ -class civicrm_CLI { - - /** - * constructor - */ - function __construct() { - // $include_path = "packages/" . get_include_path( ); - // set_include_path( $include_path ); - require_once 'Console/Getopt.php'; - $shortOptions = "s:u:p:k:"; - $longOptions = ['site=', 'user', 'pass']; - - $getopt = new Console_Getopt(); - $args = $getopt->readPHPArgv(); - array_shift($args); - list($valid, $this->args) = $getopt->getopt2($args, $shortOptions, $longOptions); - - $vars = [ - 'user' => 'u', - 'pass' => 'p', - 'key' => 'k', - 'site' => 's', - ]; - - foreach ($vars as $var => $short) { - $$var = NULL; - foreach ($valid as $v) { - if ($v[0] == $short || $v[0] == "--$var") { - $$var = $v[1]; - break; - } - } - if (!$$var) { - die("\nUsage: $ php5 " . $_SERVER['PHP_SELF'] . " -k key -u user -p password -s yoursite.org\n"); - } - } - $this->site = $site; - $this->key = $key; - $this->setEnv(); - $this->authenticate($user, $pass); - } - - /** - * @param $user - * @param $pass - */ - function authenticate($user, $pass) { - session_start(); - require_once 'CRM/Core/Config.php'; - // Does calling this do anything here? - CRM_Core_Config::singleton(); - - // this does not return on failure - // require_once 'CRM/Utils/System.php'; - // CRM_Utils_System::authenticateScript( true ); - CRM_Utils_System::authenticateScript(TRUE, $user, $pass); - } - - function setEnv() { - // so the configuration works with php-cli - $_SERVER['PHP_SELF'] = "/index.php"; - $_SERVER['HTTP_HOST'] = $this->site; - $_REQUEST['key'] = $this->key; - require_once("./civicrm.config.php"); - } -} - - -//$cli=new civicrm_cli (); - diff --git a/tools/bin/scripts/replace.sh b/tools/bin/scripts/replace.sh deleted file mode 100755 index a272eb9f7713..000000000000 --- a/tools/bin/scripts/replace.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -for i in `find . -name '*.js' -or -name '*.module' -or -name '*.php' -or -name '*.po*' -or -name '*.tpl' -or -name '*.hlp' -or -name '*.txt' -or -name '*.install' -or -name '*.inc' -or -name '*.test'`; do - echo $i; - perl -pi -e 's/CiviCRM version .\../CiviCRM version 5 /' $i; - perl -pi -e 's/Copyright CiviCRM LLC \(c\) 2004-20../Copyright CiviCRM LLC (c) 2004-2020/' $i; - perl -pi -e 's/CiviCRM LLC \(c\) 2004-20../CiviCRM LLC (c) 2004-2020/' $i; -done diff --git a/tools/bin/scripts/runCPSTest.sh b/tools/bin/scripts/runCPSTest.sh deleted file mode 100755 index 40d01136431a..000000000000 --- a/tools/bin/scripts/runCPSTest.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# Script for Running all the Tests one after other - -# Where are we called from? -P=`dirname $0` - -# Current dir -ORIGPWD=`pwd` - -# File for Storing Log Of Test. - -logCPS=CPSTestResult -########################################################### -## -## Create log for the tests -## -########################################################### - -# Method to Create Log Folder if it does not Exists. -create_log() -{ - cd $ORIGPWD/../test/ - - PATH4LOG=`pwd` - - if [ ! -d "Result" ] ; then - mkdir Result - fi -} - - -########################################################### -## -## Following methods is used to run the test -## -########################################################### - - -# Method to Run Selenium Ruby Tests. -run_cpsTest() -{ - cd $ORIGPWD/../test/selenium-ruby/CPS - # Running Selenium (ruby) Tests - ruby test_cps_personal.rb -} -########################################################### -## -## Start of the script. -## -########################################################### - -start() -{ -create_log -clear - echo - echo " *********************** Load Testing for Quest/CPS *********************** " - echo -run_cpsTest -echo; -} - -########################################################### -## -## Call to start of the script -## -########################################################### - -start diff --git a/tools/bin/scripts/runTest.sh b/tools/bin/scripts/runTest.sh deleted file mode 100755 index d5966b8c4109..000000000000 --- a/tools/bin/scripts/runTest.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/bin/sh -# Script for Running all the Tests one after other - -# Where are we called from? -P=`dirname $0` - -# Current dir -ORIGPWD=`pwd` - -# File for Storing Log Of UnitTest. -logUT=UnitTestResult -logSRT=SeleniumTestResult - -########################################################### -## -## Create log for the tests -## -########################################################### - -# Method to Create Log Folder if it does not Exists. -create_log() -{ - cd $ORIGPWD/../test/ - - PATH4LOG=`pwd` - - if [ ! -d "Result" ] ; then - mkdir Result - fi -} - -########################################################### -## -## Following methods are used to run the different tests -## -########################################################### - -# Method to Run Unit Tests. -run_UnitTest() -{ - cd $ORIGPWD/../test - # Running Unit Tests - php UnitTests.php > $PATH4LOG/Result/$logUT -} - -# Method to Run Selenium Ruby Tests. -run_seleniumTest() -{ - sub_menu - echo "Enter Your Option: " - read choice - - cd $ORIGPWD/../test/selenium-ruby/CRM - # Running Selenium (ruby) Tests - ruby ruby_unit_tests.rb $choice -} - -# Method to Run Stress Test. -run_stressTest() -{ - cd $ORIGPWD/ - # running stress test - ./runStressTest.sh -} - -########################################################### -## -## Menu system for different purpos -## -########################################################### - -main_menu() -{ - clear - echo - echo " *********************** Select Method for Test *********************** " - echo - echo "Options available: " - echo " UT - Carry out Unit Tests" - echo " ST - Carry out Stress Tests" - echo " SRT - Carry out Selenium (Ruby) Tests" - echo " All - Carry out all the above mentioned Tests i.e. Unit Tests, Stress Test, Selenium Test" - echo - echo -} - -sub_menu() -{ - clear - - echo - echo " *********************** Select the Option *********************** " - echo - echo "Options available: " - echo " 1 : Contact Individual" - echo " 2 : Contact Household" - echo " 3 : Contact Organization" - echo " 4 : New Group" - echo " 5 : Manage Group" - echo " 6 : Administer - Configuration Section" - echo " 7 : Administer - Configuration Custom Data" - echo " 8 : Administer - Configuration Profile" - echo " 9 : Administer - Setup Section" - echo " 10 : Administer - CiviContribute" - echo " 11 : Administer - CiviMember" - echo " 12 : Administer - CiviEvent" - echo " 13 : Find Contact - Basic Search" - echo " 14 : Advanced Search" - echo " 15 : Search Builder" - echo " 16 : Import - Contacts" - echo " 17 : Import - Activity History" - echo " 18 : CiviContribute - Find Contribution" - echo " 19 : CiviContribute - Import Contribution" - echo " 20 : CiviMember - Find Memberships" - echo " 21 : CiviMember - Import Memberships" - echo " 22 : CiviMail" - echo " 23 : CiviEvent" -} - -########################################################### -## -## Main execution method. -## -## All test scripts will run usnig this method -## -########################################################### - -run_option() -{ - # Following Case Structure is used for Executing Menuing System. - case $1 in - # Unit Tests - "UT" | "ut" | "Ut") - echo "Running Unit Tests"; echo; - run_UnitTest - echo "Unit Tests Successfully Completed. Log stored in the File : " $PATH4LOG/Result/$logUT; echo; - echo " **************************************************************************** "; - ;; - - # Stress Tests - "ST" | "st" | "St") - echo "Running Stress Tests"; echo; - run_stressTest - echo "Stress Tests Successfully Completed."; echo; - echo " **************************************************************************** "; - ;; - - # Selenium (Ruby) Tests - "SRT" | "srt" | "Srt") - echo "Running Selenium (Ruby) Tests"; echo; - run_seleniumTest - #echo "Selenium (Ruby) Testing Successfully Completed. Log stored in the File : " $PATH4LOG/Result/$logSRT; echo; - echo " **************************************************************************** "; - ;; - - # All the Tests will be Executed one after other - "All" | "all" ) - echo "Running all three Tests i.e. Unit Tests, Web Tests, maxQ Tests, Stress Test and Selenium(Ruby) Tests"; echo; - echo "Running Unit Tests"; echo; - run_UnitTest - echo "Unit Tests Successfully Completed. Log stored in the File : " $PATH4LOG/Result/$logUT; echo; - echo "Running Stress Tests"; echo; - run_stressTest - echo "Stress Tests Successfully Completed."; echo; - echo " **************************************************************************** "; - echo "Running Selenium (ruby) Tests"; echo; - run_seleniumTest - #echo "Selenium (Ruby) Testing Successfully Completed. Log stored in the File : " $PATH4LOG/Result/$logSRT; echo; - echo " **************************************************************************** "; - ;; - *) - echo "You have entered Invalid Option."; echo; - exit - ;; - esac -} - -########################################################### -## -## Start of the script. -## -########################################################### - -start() -{ -create_log - -main_menu -echo "Enter Your Option: " -read option -run_option $option -echo; - -} - -########################################################### -## -## Call to start of the script -## -########################################################### - -start diff --git a/tools/bin/scripts/syncPackages.sh b/tools/bin/scripts/syncPackages.sh deleted file mode 100755 index f40cfcdde008..000000000000 --- a/tools/bin/scripts/syncPackages.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -src=/opt/local/lib/php -dst=../packages - -rsyncOptions="-avC --exclude=svn" -rsync="rsync $rsyncOptions" - -for code in PEAR DB HTML Log Smarty Validate Pager PHP Archive System Console XML PhpDocumentor Mail Net/Socket Net/SMTP; do - echo $code - [ -a $src/$code.php ] && $rsync $src/$code.php $dst - [ -d $src/$code ] && $rsync $src/$code $dst -done - -[ -d ../PEAR/HTML ] && $rsync ../PEAR/HTML $dst -[ -d ../PEAR/DB ] && $rsync ../PEAR/DB $dst -