Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pulsar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NDIP
Pulsar
Commits
0b78e5ae
Commit
0b78e5ae
authored
8 years ago
by
John Chilton
Browse files
Options
Downloads
Patches
Plain Diff
Refactor test_install.bash for reuse.
parent
35733412
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
install_test/common_functions.bash
+83
-0
83 additions, 0 deletions
install_test/common_functions.bash
install_test/test_install.bash
+9
-52
9 additions, 52 deletions
install_test/test_install.bash
with
92 additions
and
52 deletions
install_test/common_functions.bash
0 → 100644
+
83
−
0
View file @
0b78e5ae
set
-e
shopt
-s
nullglob
PULSAR_INSTALL_TARGET
=
"
${
PULSAR_INSTALL_TARGET
:-
pulsar
-app
}
"
PLANEMO_INSTALL_TARGET
=
"
${
PLANEMO_INSTALL_TARGET
:-
planemo
==0.36.1
}
"
init_temp_dir
()
{
TEMP_DIR
=
`
mktemp
-d
`
echo
"Setting up test directory
$TEMP_DIR
"
cd
"
$TEMP_DIR
"
}
init_pulsar
()
{
PULSAR_INSTALL_TARGET
=
"
${
PULSAR_INSTALL_TARGET
:-
pulsar
-app
}
"
PROJECT_DIR
=
"
$SCRIPT_DIR
/.."
mkdir
pulsar
cd
pulsar
echo
"Setting up virtualenv for Pulsar"
virtualenv venv
.
venv/bin/activate
# .venv\Scripts\activate if Windows
echo
"Installing Pulsar using 'pip install
$PULSAR_INSTALL_TARGET
'"
pip
install
$PULSAR_INSTALL_TARGET
cd
..
}
stop_pulsar
()
{
cd
pulsar
.
venv/bin/activate
echo
"Stopping Pulsar daemon."
pulsar
--stop-daemon
echo
"Ending tests."
}
check_pulsar
()
{
cd
pulsar
echo
"Starting Pulsar in daemon mode."
pulsar
--daemon
echo
"Waiting for Pulsar to start."
sleep
2
echo
"Running a standalone Pulsar job."
pulsar-check
# runs a test job
echo
"Stopping Pulsar daemon."
pulsar
--stop-daemon
echo
"End Pulsar Checks"
echo
"Testing Pulsar-Galaxy Interaction"
echo
"Starting Pulsar in daemon mode."
pulsar
--daemon
echo
"Waiting for Pulsar to start."
sleep
2
cd
..
}
init_planemo
()
{
template
=
"
$1
"
echo
"Creating a virtual environment for Planemo to drive a test job."
virtualenv planemo-venv
.
planemo-venv/bin/activate
echo
"Installing Pulsar using 'pip install
$PLANEMO_INSTALL_TARGET
'"
pip
install
--upgrade
pip
pip
install
"
$PLANEMO_INSTALL_TARGET
"
echo
"Setting up Planemo test tools."
planemo project_init
--template
=
"
$template
"
test_tools
}
run_planemo
()
{
echo
"Running tool tests with Planemo through Pulsar"
:
${
GALAXY_ROOT
:
=
""
}
galaxy_root_args
=
""
if
[
-d
"
$GALAXY_ROOT
"
]
;
then
galaxy_root_args
=
"--galaxy_root
$GALAXY_ROOT
"
fi
planemo
--verbose
test
$galaxy_root_args
"
$@
"
echo
"Tests complete."
}
This diff is collapsed.
Click to expand it.
install_test/test_install.bash
+
9
−
52
View file @
0b78e5ae
...
@@ -2,65 +2,22 @@
...
@@ -2,65 +2,22 @@
set
-e
set
-e
shopt
-s
nullglob
PULSAR_INSTALL_TARGET
=
"
${
PULSAR_INSTALL_TARGET
:-
pulsar
-app
}
"
PLANEMO_INSTALL_TARGET
=
"
${
PLANEMO_INSTALL_TARGET
:-
planemo
==0.29.1
}
"
echo
"Begin Pulsar checks"
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
)
"
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
)
"
PROJECT_DIR
=
"
$SCRIPT_DIR
/.."
.
"
$SCRIPT_DIR
/common_functions.bash"
init_temp_dir
TEMP_DIR
=
`
mktemp
-d
`
init_pulsar
echo
"Setting up test directory
$TEMP_DIR
"
cd
"
$TEMP_DIR
"
mkdir
pulsar
cd
pulsar
cd
pulsar
echo
"Setting up virtualenv for Pulsar"
virtualenv venv
.
venv/bin/activate
# .venv\Scripts\activate if Windows
echo
"Installing Pulsar using 'pip install
$PULSAR_INSTALL_TARGET
'"
pip
install
$PULSAR_INSTALL_TARGET
echo
"Running pulsar-config with default arguments"
echo
"Running pulsar-config with default arguments"
pulsar-config
pulsar-config
echo
"Starting Pulsar in daemon mode."
cd
..
pulsar
--daemon
echo
"Waiting for Pulsar to start."
sleep
2
echo
"Running a standalone Pulsar job."
pulsar-check
# runs a test job
echo
"Stopping Pulsar daemon."
pulsar
--stop-daemon
echo
"End Pulsar Checks"
echo
"Testing Pulsar-Galaxy Interaction"
check_pulsar
echo
"Starting Pulsar in daemon mode."
pulsar
--daemon
echo
"Waiting for Pulsar to start."
sleep
2
cd
..
init_planemo
"demo"
echo
"Creating a virtual environment for Planemo to drive a test job."
run_planemo
--job_config_file
"
$SCRIPT_DIR
/galaxy_job_conf.xml"
test_tools/cat.xml
virtualenv planemo-venv
.
planemo-venv/bin/activate
echo
"Installing Pulsar using 'pip install
$PLANEMO_INSTALL_TARGET
'"
pip
install
"
$PLANEMO_INSTALL_TARGET
"
echo
"Setting up Planemo test tools."
planemo project_init
--template
=
demo test_tools
echo
"Running tool tests with Planemo through Pulsar"
:
${
GALAXY_ROOT
:
=
""
}
galaxy_root_args
=
""
if
[
-d
"
$GALAXY_ROOT
"
]
;
then
galaxy_root_args
=
"--galaxy_root
$GALAXY_ROOT
"
fi
planemo
--verbose
test
$galaxy_root_args
--job_config_file
"
$SCRIPT_DIR
/galaxy_job_conf.xml"
test_tools/cat.xml
echo
"Tests complete."
cd
pulsar
stop_pulsar
.
venv/bin/activate
echo
"Stopping Pulsar daemon."
pulsar
--stop-daemon
echo
"Ending tests."
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment