Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
float
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
ai3
float
Commits
f73e933a
Commit
f73e933a
authored
2 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Split the test-driver "run" command into "provision" and "test"
parent
7c2a85c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test-driver
+31
-12
31 additions, 12 deletions
test-driver
with
31 additions
and
12 deletions
test-driver
+
31
−
12
View file @
f73e933a
...
@@ -92,9 +92,12 @@ Commands:
...
@@ -92,9 +92,12 @@ Commands:
cleanup Cleanup the test environment (turn down VMs, etc)
cleanup Cleanup the test environment (turn down VMs, etc)
run Run the main float playbook, and the test suite, using
provision Run the main float playbook
the playbooks specified by the remaining command-line
arguments
test Run the test suite, using the playbooks specified by
the remaining command-line arguments
run (deprecated) Run 'provision' and 'test'
If DIR is specified, chdir there before running anything.
If DIR is specified, chdir there before running anything.
...
@@ -119,6 +122,20 @@ if [ $# -gt 0 ]; then
...
@@ -119,6 +122,20 @@ if [ $# -gt 0 ]; then
shift
shift
fi
fi
do_provision
()
{
log Running main playbook
${
float_dir
}
/float run site.yml
\
||
die
"failed to run the main playbook"
}
do_test
()
{
for
playbook
in
"
${
float_dir
}
/test/integration-test.yml"
"
$@
"
;
do
log Running
test
playbook
${
playbook
}
${
float_dir
}
/float run
${
playbook
}
\
||
die
"test playbook failed"
done
}
case
"
$cmd
"
in
case
"
$cmd
"
in
init
)
init
)
run_init
run_init
...
@@ -134,16 +151,18 @@ case "$cmd" in
...
@@ -134,16 +151,18 @@ case "$cmd" in
run_cleanup
run_cleanup
;;
;;
run
)
provision
)
log Running main playbook
do_provision
${
float_dir
}
/float run site.yml
\
;;
||
die
"failed to run the main playbook"
for
playbook
in
"
${
float_dir
}
/test/integration-test.yml"
"
$@
"
;
do
test
)
log Running
test
playbook
${
playbook
}
do_test
${
float_dir
}
/float run
${
playbook
}
\
;;
||
die
"test playbook failed"
done
# Legacy command to run both 'provision' and 'test' at once.
run
)
do_provision
do_test
;;
;;
*
)
*
)
...
...
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