|
ensembl-hive
2.8.1
|
Public Member Functions | |
| protected | _compare_job_warnings () |
| protected | _compare_job_dataflows () |
| public void | standaloneJob () |
| public void | init_pipeline () |
| protected void | _test_ehive_script () |
| public void | runWorker () |
| public void | seed_pipeline () |
| public void | beekeeper () |
| public void | tweak_pipeline () |
| public void | generate_graph () |
| public void | visualize_jobs () |
| public void | peekJob () |
| public void | db_cmd () |
| public void | run_sql_on_db () |
| public void | load_sql_in_db () |
| public Bio::EnsEMBL::Hive::DBSQL::DBConnection | make_new_db_from_sqls () |
| public void | make_hive_db () |
| public Listref | get_test_urls () |
| public Db | get_test_url_or_die () |
| public void | safe_drop_database () |
| public Array | all_source_files () |
| protected Bio::EnsEMBL::Hive::Utils::Test::_compare_job_dataflows | ( | ) |
Undocumented method
Code:
| protected Bio::EnsEMBL::Hive::Utils::Test::_compare_job_warnings | ( | ) |
Undocumented method
Code:
| protected void Bio::EnsEMBL::Hive::Utils::Test::_test_ehive_script | ( | ) |
Arg[1] : String $script_name. The name of the script (assumed to be found in
ensembl-hive/scripts/ once the .pl suffix added)
Arg[2] : String $url. The location of the database
Arg[3] : Arrayref $args. Extra arguments given to the script
Arg[4] : String $test_name (optional). The name of the test
Description : Generic method that can run any eHive script and check its return status
Returntype : None
Exceptions : TAP-style
Caller : other methods in Utils::Test
Status : Stable
Code:
| public Array Bio::EnsEMBL::Hive::Utils::Test::all_source_files | ( | ) |
Arg [n] : Directories to scan. Example :
Description: Scans the given directories and returns all found instances of
source code. This includes Perl (pl,pm,t), C(c,h) and
SQL (sql) suffixed files.
Returntype : Array of all found files
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::beekeeper | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to beekeeper.pl Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run beekeeper on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::db_cmd | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to db_cmd.pl Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run db_cmd.pl on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::generate_graph | ( | ) |
Arg[1] : String $url or undef. The location of the database Arg[2] : Arrayref $args. Extra arguments given to generate_graph.pl Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run generate_graph.pl on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public Db Bio::EnsEMBL::Hive::Utils::Test::get_test_url_or_die | ( | ) |
Arg [1] : see get_test_urls() Example :
Example :
Example :
Example :
Description : Wrapper around get_test_urls() that returns one of the test URLs, or die if no databases are available Returntype : db connection URL as a string
Code:
| public Listref Bio::EnsEMBL::Hive::Utils::Test::get_test_urls | ( | ) |
Arg [1] : -driver => driver, -tag => tag, -no_user_prefix => 1 Example :
Example :
Example :
Example :
Description : Creates a listref containing db urls based on the drivers specified in
: the environment variable EHIVE_TEST_PIPELINE_URLS.
: The URLs will be standard eHive URLs, looking like driver://connection/database
: A database name consisting of [username]_ehive_test will be created
: and placed in the URL
: For example - mysql://me@127.0.0.1/ghopper_ehive_test
:
: If -tag is specified, then the list will have db names appended with '_tag'
: For example - (-tag => 'longmult') giving mysql://me@127.0.0.1/ghopper_ehive_test_longmult
:
: If -driver is specified, then the list will be restricted to urls for the
: particular driver or comma-separated list of drivers specified (e.g. 'mysql,pgsql')
:
: If -no_user_prefix is specified, then the automatically-generated database names
: won't be prefixed with the name of the current user
:
: If no drivers are specified in EHIVE_TEST_PIPELINE_URLS, it will check
: to see if sqlite is available in the current path, and return a sqlite url
: in the listref. Otherwise it will return an empty listref.
:
Returntype : listref of db connection URLs as strings
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::init_pipeline | ( | ) |
Arg[1] : String $file_or_module. The location of the PipeConfig file Arg[2] : String $url. The location of the database to be created Arg[3] : (optional) Arrayref $args. Extra parameters of the pipeline (as on the command-line) Arg[4] : (optional) Arrayref $tweaks. Tweaks to be applied to the database (as with the -tweak command-line option) Example :
Description : Initialize a new pipeline database for the given PipeConfig module name on that URL. $options simply represents the command-line options one would give on the command-line. Additionally, tweaks can be defined. Note that -hive_force_init is automatically added. Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::load_sql_in_db | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : String $sql_file. The location of a file to load in the database Arg[3] : String $test_name (optional). The name of the test Example :
Description : Execute an SQL script on the given database and test its execution.
This expects the command-line client to return a non-zero code in
case of a failure.
Returntype : None
Exceptions : TAP-style
Caller : general
Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::make_hive_db | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Boolean $use_triggers (optional, default 0). Whether we want to load the SQL triggers Example :
Description : Create a new (empty) eHive database using the two above functions.
This function follows the same step as init_pipeline
Note that it first issues a DROP DATABASE statement in case the database already exists
Returntype : None
Exceptions : TAP-style
Caller : general
Status : Stable
Code:
| public Bio::EnsEMBL::Hive::DBSQL::DBConnection Bio::EnsEMBL::Hive::Utils::Test::make_new_db_from_sqls | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref of string $sqls. Each element can be a SQL command or file to load Arg[3] : String $test_name (optional). The name of the test Example :
Description : Create a new database and apply a list of SQL commands using the two above functions.
When an SQL command is a valid filename, the file is loaded rather than the command executed.
Note that it first issues a DROP DATABASE statement in case the database already exists
Returntype : Bio::EnsEMBL::Hive::DBSQL::DBConnection $dbc
Exceptions : TAP-style
Caller : general
Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::peekJob | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to peekJob.pl Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run peekJob.pl on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::run_sql_on_db | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : String $sql. The SQL to run on the database Arg[3] : String $test_name (optional). The name of the test Example :
Description : Execute an SQL command on the given database and test its execution. This expects the
command-line client to return a non-zero code in case of a failure.
Returntype : None
Exceptions : TAP-style
Caller : general
Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::runWorker | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to runWorker Arg[3] : String $test_name (optional). The name of the test Example :
Description : Run a worker on the given pipeline in the current process.
The worker options have been divided in three groups: the ones affecting its specialization,
the ones affecting its "life" (how long it lasts), and the ones controlling its execution mode.
Returntype : None
Exceptions : TAP-style
Caller : general
Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::safe_drop_database | ( | ) |
Arg[1] : DBAdaptor $hive_dba Example :
Description : Wait for all workers to complete, disconnect from the database and drop it. Returntype : None Caller : test scripts
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::seed_pipeline | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to seed_pipeline Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run seed_pipeline on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::standaloneJob | ( | ) |
Example :
Description : Run a given Runnable in "standalone job" mode, i.e. with parameters but no connection to the database.
One can also give a list of events that the job is expected to raise. Currently, dataflows and warnings
are supported. Examples can be found under t/05.runnabledb/
Returntype : None
Exceptions : TAP-style
Caller : general
Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::tweak_pipeline | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to beekeeper.pl Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run tweak_pipeline on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Hive::Utils::Test::visualize_jobs | ( | ) |
Arg[1] : String $url. The location of the database Arg[2] : Arrayref $args. Extra arguments given to visualize_jobs.pl Arg[3] : String $test_name (optional). The name of the test Example :
Description : Very generic function to run visualize_jobs.pl on the given database with the given arguments Returntype : None Exceptions : TAP-style Caller : general Status : Stable
Code: