Chandan Singh pushed to branch master at BuildStream / buildstream
Commits:
-
629a6e52
by Chandan Singh at 2018-12-14T19:34:20Z
-
f894c0a8
by Chandan Singh at 2018-12-14T19:34:20Z
-
b23bec55
by Chandan Singh at 2018-12-14T20:07:13Z
28 changed files:
- NEWS
- buildstream/_frontend/cli.py
- buildstream/_frontend/complete.py
- setup.py
- tests/completions/completions.py
- tests/frontend/cross_junction_workspace.py
- tests/frontend/fetch.py
- tests/frontend/help.py
- tests/frontend/logging.py
- tests/frontend/mirror.py
- tests/frontend/show.py
- tests/frontend/source_checkout.py
- tests/frontend/track.py
- tests/frontend/track_cross_junction.py
- tests/frontend/workspace.py
- tests/frontend/yamlcache.py
- tests/integration/compose.py
- tests/integration/pip_source.py
- tests/loader/junctions.py
- tests/pipeline/preflight.py
- tests/plugins/filter.py
- tests/sources/bzr.py
- tests/sources/deb.py
- tests/sources/git.py
- tests/sources/previous_source_access.py
- tests/sources/remote.py
- tests/sources/tar.py
- tests/sources/zip.py
Changes:
| ... | ... | @@ -10,6 +10,12 @@ buildstream 1.3.1 |
| 10 | 10 |
an element's sources and generated build scripts you can do the command
|
| 11 | 11 |
`bst source-checkout --include-build-scripts --tar foo.bst some-file.tar`
|
| 12 | 12 |
|
| 13 |
+ o BREAKING CHANGE: `bst track` and `bst fetch` commands are now osbolete.
|
|
| 14 |
+ Their functionality is provided by `bst source track` and
|
|
| 15 |
+ `bst source fetch` respectively.
|
|
| 16 |
+ |
|
| 17 |
+ o Added new `bst source checkout` command to checkout sources of an element.
|
|
| 18 |
+ |
|
| 13 | 19 |
o BREAKING CHANGE: Default strip-commands have been removed as they are too
|
| 14 | 20 |
specific. Recommendation if you are building in Linux is to use the
|
| 15 | 21 |
ones being used in freedesktop-sdk project, for example
|
| ... | ... | @@ -77,8 +83,6 @@ buildstream 1.3.1 |
| 77 | 83 |
with cached artifacts, only 'complete' elements can be pushed. If the element
|
| 78 | 84 |
is expected to have a populated build tree then it must be cached before pushing.
|
| 79 | 85 |
|
| 80 |
- o Added new `bst source-checkout` command to checkout sources of an element.
|
|
| 81 |
- |
|
| 82 | 86 |
o `bst workspace open` now supports the creation of multiple elements and
|
| 83 | 87 |
allows the user to set a default location for their creation. This has meant
|
| 84 | 88 |
that the new CLI is no longer backwards compatible with buildstream 1.2.
|
| ... | ... | @@ -49,7 +49,8 @@ def search_command(args, *, context=None): |
| 49 | 49 |
def complete_commands(cmd, args, incomplete):
|
| 50 | 50 |
command_ctx = search_command(args[1:])
|
| 51 | 51 |
if command_ctx and command_ctx.command and isinstance(command_ctx.command, click.MultiCommand):
|
| 52 |
- return [subcommand + " " for subcommand in command_ctx.command.list_commands(command_ctx)]
|
|
| 52 |
+ return [subcommand + " " for subcommand in command_ctx.command.list_commands(command_ctx)
|
|
| 53 |
+ if not command_ctx.command.get_command(command_ctx, subcommand).hidden]
|
|
| 53 | 54 |
|
| 54 | 55 |
return []
|
| 55 | 56 |
|
| ... | ... | @@ -354,106 +355,6 @@ def build(app, elements, all_, track_, track_save, track_all, track_except, trac |
| 354 | 355 |
build_all=all_)
|
| 355 | 356 |
|
| 356 | 357 |
|
| 357 |
-##################################################################
|
|
| 358 |
-# Fetch Command #
|
|
| 359 |
-##################################################################
|
|
| 360 |
-@cli.command(short_help="Fetch sources in a pipeline")
|
|
| 361 |
-@click.option('--except', 'except_', multiple=True,
|
|
| 362 |
- type=click.Path(readable=False),
|
|
| 363 |
- help="Except certain dependencies from fetching")
|
|
| 364 |
-@click.option('--deps', '-d', default='plan',
|
|
| 365 |
- type=click.Choice(['none', 'plan', 'all']),
|
|
| 366 |
- help='The dependencies to fetch (default: plan)')
|
|
| 367 |
-@click.option('--track', 'track_', default=False, is_flag=True,
|
|
| 368 |
- help="Track new source references before fetching")
|
|
| 369 |
-@click.option('--track-cross-junctions', '-J', default=False, is_flag=True,
|
|
| 370 |
- help="Allow tracking to cross junction boundaries")
|
|
| 371 |
-@click.argument('elements', nargs=-1,
|
|
| 372 |
- type=click.Path(readable=False))
|
|
| 373 |
-@click.pass_obj
|
|
| 374 |
-def fetch(app, elements, deps, track_, except_, track_cross_junctions):
|
|
| 375 |
- """Fetch sources required to build the pipeline
|
|
| 376 |
- |
|
| 377 |
- By default this will only try to fetch sources which are
|
|
| 378 |
- required for the build plan of the specified target element,
|
|
| 379 |
- omitting sources for any elements which are already built
|
|
| 380 |
- and available in the artifact cache.
|
|
| 381 |
- |
|
| 382 |
- Specify `--deps` to control which sources to fetch:
|
|
| 383 |
- |
|
| 384 |
- \b
|
|
| 385 |
- none: No dependencies, just the element itself
|
|
| 386 |
- plan: Only dependencies required for the build plan
|
|
| 387 |
- all: All dependencies
|
|
| 388 |
- """
|
|
| 389 |
- from .._pipeline import PipelineSelection
|
|
| 390 |
- |
|
| 391 |
- if track_cross_junctions and not track_:
|
|
| 392 |
- click.echo("ERROR: The --track-cross-junctions option can only be used with --track", err=True)
|
|
| 393 |
- sys.exit(-1)
|
|
| 394 |
- |
|
| 395 |
- if track_ and deps == PipelineSelection.PLAN:
|
|
| 396 |
- click.echo("WARNING: --track specified for tracking of a build plan\n\n"
|
|
| 397 |
- "Since tracking modifies the build plan, all elements will be tracked.", err=True)
|
|
| 398 |
- deps = PipelineSelection.ALL
|
|
| 399 |
- |
|
| 400 |
- with app.initialized(session_name="Fetch"):
|
|
| 401 |
- if not elements:
|
|
| 402 |
- guessed_target = app.context.guess_element()
|
|
| 403 |
- if guessed_target:
|
|
| 404 |
- elements = (guessed_target,)
|
|
| 405 |
- |
|
| 406 |
- app.stream.fetch(elements,
|
|
| 407 |
- selection=deps,
|
|
| 408 |
- except_targets=except_,
|
|
| 409 |
- track_targets=track_,
|
|
| 410 |
- track_cross_junctions=track_cross_junctions)
|
|
| 411 |
- |
|
| 412 |
- |
|
| 413 |
-##################################################################
|
|
| 414 |
-# Track Command #
|
|
| 415 |
-##################################################################
|
|
| 416 |
-@cli.command(short_help="Track new source references")
|
|
| 417 |
-@click.option('--except', 'except_', multiple=True,
|
|
| 418 |
- type=click.Path(readable=False),
|
|
| 419 |
- help="Except certain dependencies from tracking")
|
|
| 420 |
-@click.option('--deps', '-d', default='none',
|
|
| 421 |
- type=click.Choice(['none', 'all']),
|
|
| 422 |
- help='The dependencies to track (default: none)')
|
|
| 423 |
-@click.option('--cross-junctions', '-J', default=False, is_flag=True,
|
|
| 424 |
- help="Allow crossing junction boundaries")
|
|
| 425 |
-@click.argument('elements', nargs=-1,
|
|
| 426 |
- type=click.Path(readable=False))
|
|
| 427 |
-@click.pass_obj
|
|
| 428 |
-def track(app, elements, deps, except_, cross_junctions):
|
|
| 429 |
- """Consults the specified tracking branches for new versions available
|
|
| 430 |
- to build and updates the project with any newly available references.
|
|
| 431 |
- |
|
| 432 |
- By default this will track just the specified element, but you can also
|
|
| 433 |
- update a whole tree of dependencies in one go.
|
|
| 434 |
- |
|
| 435 |
- Specify `--deps` to control which sources to track:
|
|
| 436 |
- |
|
| 437 |
- \b
|
|
| 438 |
- none: No dependencies, just the specified elements
|
|
| 439 |
- all: All dependencies of all specified elements
|
|
| 440 |
- """
|
|
| 441 |
- with app.initialized(session_name="Track"):
|
|
| 442 |
- if not elements:
|
|
| 443 |
- guessed_target = app.context.guess_element()
|
|
| 444 |
- if guessed_target:
|
|
| 445 |
- elements = (guessed_target,)
|
|
| 446 |
- |
|
| 447 |
- # Substitute 'none' for 'redirect' so that element redirections
|
|
| 448 |
- # will be done
|
|
| 449 |
- if deps == 'none':
|
|
| 450 |
- deps = 'redirect'
|
|
| 451 |
- app.stream.track(elements,
|
|
| 452 |
- selection=deps,
|
|
| 453 |
- except_targets=except_,
|
|
| 454 |
- cross_junctions=cross_junctions)
|
|
| 455 |
- |
|
| 456 |
- |
|
| 457 | 358 |
##################################################################
|
| 458 | 359 |
# Pull Command #
|
| 459 | 360 |
##################################################################
|
| ... | ... | @@ -743,10 +644,109 @@ def checkout(app, element, location, force, deps, integrate, hardlinks, tar): |
| 743 | 644 |
tar=tar)
|
| 744 | 645 |
|
| 745 | 646 |
|
| 647 |
+##################################################################
|
|
| 648 |
+# Source Command #
|
|
| 649 |
+##################################################################
|
|
| 650 |
+@cli.group(short_help="Manipulate sources for an element")
|
|
| 651 |
+def source():
|
|
| 652 |
+ """Manipulate sources for an element"""
|
|
| 653 |
+ pass
|
|
| 654 |
+ |
|
| 655 |
+ |
|
| 656 |
+##################################################################
|
|
| 657 |
+# Source Fetch Command #
|
|
| 658 |
+##################################################################
|
|
| 659 |
+@source.command(name="fetch", short_help="Fetch sources in a pipeline")
|
|
| 660 |
+@click.option('--except', 'except_', multiple=True,
|
|
| 661 |
+ type=click.Path(readable=False),
|
|
| 662 |
+ help="Except certain dependencies from fetching")
|
|
| 663 |
+@click.option('--deps', '-d', default='plan',
|
|
| 664 |
+ type=click.Choice(['none', 'plan', 'all']),
|
|
| 665 |
+ help='The dependencies to fetch (default: plan)')
|
|
| 666 |
+@click.option('--track', 'track_', default=False, is_flag=True,
|
|
| 667 |
+ help="Track new source references before fetching")
|
|
| 668 |
+@click.option('--track-cross-junctions', '-J', default=False, is_flag=True,
|
|
| 669 |
+ help="Allow tracking to cross junction boundaries")
|
|
| 670 |
+@click.argument('elements', nargs=-1,
|
|
| 671 |
+ type=click.Path(readable=False))
|
|
| 672 |
+@click.pass_obj
|
|
| 673 |
+def source_fetch(app, elements, deps, track_, except_, track_cross_junctions):
|
|
| 674 |
+ """Fetch sources required to build the pipeline
|
|
| 675 |
+ |
|
| 676 |
+ By default this will only try to fetch sources which are
|
|
| 677 |
+ required for the build plan of the specified target element,
|
|
| 678 |
+ omitting sources for any elements which are already built
|
|
| 679 |
+ and available in the artifact cache.
|
|
| 680 |
+ |
|
| 681 |
+ Specify `--deps` to control which sources to fetch:
|
|
| 682 |
+ |
|
| 683 |
+ \b
|
|
| 684 |
+ none: No dependencies, just the element itself
|
|
| 685 |
+ plan: Only dependencies required for the build plan
|
|
| 686 |
+ all: All dependencies
|
|
| 687 |
+ """
|
|
| 688 |
+ from .._pipeline import PipelineSelection
|
|
| 689 |
+ |
|
| 690 |
+ if track_cross_junctions and not track_:
|
|
| 691 |
+ click.echo("ERROR: The --track-cross-junctions option can only be used with --track", err=True)
|
|
| 692 |
+ sys.exit(-1)
|
|
| 693 |
+ |
|
| 694 |
+ if track_ and deps == PipelineSelection.PLAN:
|
|
| 695 |
+ click.echo("WARNING: --track specified for tracking of a build plan\n\n"
|
|
| 696 |
+ "Since tracking modifies the build plan, all elements will be tracked.", err=True)
|
|
| 697 |
+ deps = PipelineSelection.ALL
|
|
| 698 |
+ |
|
| 699 |
+ with app.initialized(session_name="Fetch"):
|
|
| 700 |
+ app.stream.fetch(elements,
|
|
| 701 |
+ selection=deps,
|
|
| 702 |
+ except_targets=except_,
|
|
| 703 |
+ track_targets=track_,
|
|
| 704 |
+ track_cross_junctions=track_cross_junctions)
|
|
| 705 |
+ |
|
| 706 |
+ |
|
| 707 |
+##################################################################
|
|
| 708 |
+# Source Track Command #
|
|
| 709 |
+##################################################################
|
|
| 710 |
+@source.command(name="track", short_help="Track new source references")
|
|
| 711 |
+@click.option('--except', 'except_', multiple=True,
|
|
| 712 |
+ type=click.Path(readable=False),
|
|
| 713 |
+ help="Except certain dependencies from tracking")
|
|
| 714 |
+@click.option('--deps', '-d', default='none',
|
|
| 715 |
+ type=click.Choice(['none', 'all']),
|
|
| 716 |
+ help='The dependencies to track (default: none)')
|
|
| 717 |
+@click.option('--cross-junctions', '-J', default=False, is_flag=True,
|
|
| 718 |
+ help="Allow crossing junction boundaries")
|
|
| 719 |
+@click.argument('elements', nargs=-1,
|
|
| 720 |
+ type=click.Path(readable=False))
|
|
| 721 |
+@click.pass_obj
|
|
| 722 |
+def source_track(app, elements, deps, except_, cross_junctions):
|
|
| 723 |
+ """Consults the specified tracking branches for new versions available
|
|
| 724 |
+ to build and updates the project with any newly available references.
|
|
| 725 |
+ |
|
| 726 |
+ By default this will track just the specified element, but you can also
|
|
| 727 |
+ update a whole tree of dependencies in one go.
|
|
| 728 |
+ |
|
| 729 |
+ Specify `--deps` to control which sources to track:
|
|
| 730 |
+ |
|
| 731 |
+ \b
|
|
| 732 |
+ none: No dependencies, just the specified elements
|
|
| 733 |
+ all: All dependencies of all specified elements
|
|
| 734 |
+ """
|
|
| 735 |
+ with app.initialized(session_name="Track"):
|
|
| 736 |
+ # Substitute 'none' for 'redirect' so that element redirections
|
|
| 737 |
+ # will be done
|
|
| 738 |
+ if deps == 'none':
|
|
| 739 |
+ deps = 'redirect'
|
|
| 740 |
+ app.stream.track(elements,
|
|
| 741 |
+ selection=deps,
|
|
| 742 |
+ except_targets=except_,
|
|
| 743 |
+ cross_junctions=cross_junctions)
|
|
| 744 |
+ |
|
| 745 |
+ |
|
| 746 | 746 |
##################################################################
|
| 747 | 747 |
# Source Checkout Command #
|
| 748 | 748 |
##################################################################
|
| 749 |
-@cli.command(name='source-checkout', short_help='Checkout sources for an element')
|
|
| 749 |
+@source.command(name='checkout', short_help='Checkout sources for an element')
|
|
| 750 | 750 |
@click.option('--force', '-f', default=False, is_flag=True,
|
| 751 | 751 |
help="Allow files to be overwritten")
|
| 752 | 752 |
@click.option('--except', 'except_', multiple=True,
|
| ... | ... | @@ -1035,3 +1035,54 @@ def artifact_log(app, artifacts): |
| 1035 | 1035 |
with open(log) as f:
|
| 1036 | 1036 |
data = f.read()
|
| 1037 | 1037 |
click.echo_via_pager(data)
|
| 1038 |
+ |
|
| 1039 |
+ |
|
| 1040 |
+##################################################################
|
|
| 1041 |
+# DEPRECATED Commands #
|
|
| 1042 |
+##################################################################
|
|
| 1043 |
+ |
|
| 1044 |
+# XXX: The following commands are now obsolete, but they are kept
|
|
| 1045 |
+# here along with all the options so that we can provide nice error
|
|
| 1046 |
+# messages when they are called.
|
|
| 1047 |
+# Also, note that these commands are hidden from the top-level help.
|
|
| 1048 |
+ |
|
| 1049 |
+##################################################################
|
|
| 1050 |
+# Fetch Command #
|
|
| 1051 |
+##################################################################
|
|
| 1052 |
+@cli.command(short_help="Fetch sources in a pipeline", hidden=True)
|
|
| 1053 |
+@click.option('--except', 'except_', multiple=True,
|
|
| 1054 |
+ type=click.Path(readable=False),
|
|
| 1055 |
+ help="Except certain dependencies from fetching")
|
|
| 1056 |
+@click.option('--deps', '-d', default='plan',
|
|
| 1057 |
+ type=click.Choice(['none', 'plan', 'all']),
|
|
| 1058 |
+ help='The dependencies to fetch (default: plan)')
|
|
| 1059 |
+@click.option('--track', 'track_', default=False, is_flag=True,
|
|
| 1060 |
+ help="Track new source references before fetching")
|
|
| 1061 |
+@click.option('--track-cross-junctions', '-J', default=False, is_flag=True,
|
|
| 1062 |
+ help="Allow tracking to cross junction boundaries")
|
|
| 1063 |
+@click.argument('elements', nargs=-1,
|
|
| 1064 |
+ type=click.Path(readable=False))
|
|
| 1065 |
+@click.pass_obj
|
|
| 1066 |
+def fetch(app, elements, deps, track_, except_, track_cross_junctions):
|
|
| 1067 |
+ click.echo("This command is now obsolete. Use `bst source fetch` instead.", err=True)
|
|
| 1068 |
+ sys.exit(1)
|
|
| 1069 |
+ |
|
| 1070 |
+ |
|
| 1071 |
+##################################################################
|
|
| 1072 |
+# Track Command #
|
|
| 1073 |
+##################################################################
|
|
| 1074 |
+@cli.command(short_help="Track new source references", hidden=True)
|
|
| 1075 |
+@click.option('--except', 'except_', multiple=True,
|
|
| 1076 |
+ type=click.Path(readable=False),
|
|
| 1077 |
+ help="Except certain dependencies from tracking")
|
|
| 1078 |
+@click.option('--deps', '-d', default='none',
|
|
| 1079 |
+ type=click.Choice(['none', 'all']),
|
|
| 1080 |
+ help='The dependencies to track (default: none)')
|
|
| 1081 |
+@click.option('--cross-junctions', '-J', default=False, is_flag=True,
|
|
| 1082 |
+ help="Allow crossing junction boundaries")
|
|
| 1083 |
+@click.argument('elements', nargs=-1,
|
|
| 1084 |
+ type=click.Path(readable=False))
|
|
| 1085 |
+@click.pass_obj
|
|
| 1086 |
+def track(app, elements, deps, except_, cross_junctions):
|
|
| 1087 |
+ click.echo("This command is now obsolete. Use `bst source track` instead.", err=True)
|
|
| 1088 |
+ sys.exit(1)
|
| ... | ... | @@ -297,12 +297,15 @@ def get_choices(cli, prog_name, args, incomplete, override): |
| 297 | 297 |
|
| 298 | 298 |
if not found_param and isinstance(ctx.command, MultiCommand):
|
| 299 | 299 |
# completion for any subcommands
|
| 300 |
- choices.extend([cmd + " " for cmd in ctx.command.list_commands(ctx)])
|
|
| 300 |
+ choices.extend([cmd + " " for cmd in ctx.command.list_commands(ctx)
|
|
| 301 |
+ if not ctx.command.get_command(ctx, cmd).hidden])
|
|
| 301 | 302 |
|
| 302 | 303 |
if not start_of_option(incomplete) and ctx.parent is not None \
|
| 303 | 304 |
and isinstance(ctx.parent.command, MultiCommand) and ctx.parent.command.chain:
|
| 304 | 305 |
# completion for chained commands
|
| 305 |
- remaining_comands = set(ctx.parent.command.list_commands(ctx.parent)) - set(ctx.parent.protected_args)
|
|
| 306 |
+ visible_commands = [cmd for cmd in ctx.parent.command.list_commands(ctx.parent)
|
|
| 307 |
+ if not ctx.parent.command.get_command(ctx.parent, cmd).hidden]
|
|
| 308 |
+ remaining_comands = set(visible_commands) - set(ctx.parent.protected_args)
|
|
| 306 | 309 |
choices.extend([cmd + " " for cmd in remaining_comands])
|
| 307 | 310 |
|
| 308 | 311 |
for item in choices:
|
| ... | ... | @@ -346,7 +346,7 @@ setup(name='BuildStream', |
| 346 | 346 |
# See issues #571 and #790.
|
| 347 | 347 |
'ruamel.yaml >= 0.15.41, < 0.15.52',
|
| 348 | 348 |
'pluginbase',
|
| 349 |
- 'Click',
|
|
| 349 |
+ 'Click >= 7.0',
|
|
| 350 | 350 |
'jinja2 >= 2.10',
|
| 351 | 351 |
'protobuf >= 3.5',
|
| 352 | 352 |
'grpcio >= 1.10',
|
| ... | ... | @@ -9,15 +9,13 @@ MAIN_COMMANDS = [ |
| 9 | 9 |
'artifact ',
|
| 10 | 10 |
'build ',
|
| 11 | 11 |
'checkout ',
|
| 12 |
- 'fetch ',
|
|
| 13 | 12 |
'help ',
|
| 14 | 13 |
'init ',
|
| 15 | 14 |
'pull ',
|
| 16 | 15 |
'push ',
|
| 17 | 16 |
'shell ',
|
| 18 | 17 |
'show ',
|
| 19 |
- 'source-checkout ',
|
|
| 20 |
- 'track ',
|
|
| 18 |
+ 'source ',
|
|
| 21 | 19 |
'workspace '
|
| 22 | 20 |
]
|
| 23 | 21 |
|
| ... | ... | @@ -50,6 +48,12 @@ MAIN_OPTIONS = [ |
| 50 | 48 |
"--version ",
|
| 51 | 49 |
]
|
| 52 | 50 |
|
| 51 |
+SOURCE_COMMANDS = [
|
|
| 52 |
+ 'checkout ',
|
|
| 53 |
+ 'fetch ',
|
|
| 54 |
+ 'track ',
|
|
| 55 |
+]
|
|
| 56 |
+ |
|
| 53 | 57 |
WORKSPACE_COMMANDS = [
|
| 54 | 58 |
'close ',
|
| 55 | 59 |
'list ',
|
| ... | ... | @@ -115,6 +119,7 @@ def assert_completion_failed(cli, cmd, word_idx, expected, cwd=None): |
| 115 | 119 |
('bst ', 1, MAIN_COMMANDS),
|
| 116 | 120 |
('bst pu', 1, ['pull ', 'push ']),
|
| 117 | 121 |
('bst pul', 1, ['pull ']),
|
| 122 |
+ ('bst source ', 2, SOURCE_COMMANDS),
|
|
| 118 | 123 |
('bst w ', 1, ['workspace ']),
|
| 119 | 124 |
('bst workspace ', 2, WORKSPACE_COMMANDS),
|
| 120 | 125 |
])
|
| ... | ... | @@ -267,9 +272,10 @@ def test_argument_element_invalid(datafiles, cli, project, cmd, word_idx, expect |
| 267 | 272 |
@pytest.mark.parametrize("cmd,word_idx,expected", [
|
| 268 | 273 |
('bst he', 1, ['help ']),
|
| 269 | 274 |
('bst help ', 2, MAIN_COMMANDS),
|
| 270 |
- ('bst help fe', 2, ['fetch ']),
|
|
| 275 |
+ ('bst help in', 2, ['init ']),
|
|
| 271 | 276 |
('bst help p', 2, ['pull ', 'push ']),
|
| 272 | 277 |
('bst help p', 2, ['pull ', 'push ']),
|
| 278 |
+ ('bst help source ', 3, SOURCE_COMMANDS),
|
|
| 273 | 279 |
('bst help w', 2, ['workspace ']),
|
| 274 | 280 |
('bst help workspace ', 3, WORKSPACE_COMMANDS),
|
| 275 | 281 |
])
|
| ... | ... | @@ -35,7 +35,7 @@ def prepare_junction_project(cli, tmpdir): |
| 35 | 35 |
'sources': [sub_repo.source_config(ref=sub_ref)]},
|
| 36 | 36 |
str(main_project.join("sub.bst")))
|
| 37 | 37 |
|
| 38 |
- args = ['fetch', 'sub.bst']
|
|
| 38 |
+ args = ['source', 'fetch', 'sub.bst']
|
|
| 39 | 39 |
result = cli.run(project=str(main_project), args=args)
|
| 40 | 40 |
result.assert_success()
|
| 41 | 41 |
|
| ... | ... | @@ -41,7 +41,7 @@ def test_fetch(cli, tmpdir, datafiles, kind): |
| 41 | 41 |
assert cli.get_element_state(project, element_name) == 'fetch needed'
|
| 42 | 42 |
|
| 43 | 43 |
# Now try to fetch it
|
| 44 |
- result = cli.run(project=project, args=['fetch', element_name])
|
|
| 44 |
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
|
|
| 45 | 45 |
result.assert_success()
|
| 46 | 46 |
|
| 47 | 47 |
# Assert that we are now buildable because the source is
|
| ... | ... | @@ -55,7 +55,7 @@ def test_fetch_consistency_error(cli, tmpdir, datafiles): |
| 55 | 55 |
|
| 56 | 56 |
# When the error occurs outside of the scheduler at load time,
|
| 57 | 57 |
# then the SourceError is reported directly as the main error.
|
| 58 |
- result = cli.run(project=project, args=['fetch', 'error.bst'])
|
|
| 58 |
+ result = cli.run(project=project, args=['source', 'fetch', 'error.bst'])
|
|
| 59 | 59 |
result.assert_main_error(ErrorDomain.SOURCE, 'the-consistency-error')
|
| 60 | 60 |
|
| 61 | 61 |
|
| ... | ... | @@ -70,7 +70,7 @@ def test_fetch_consistency_bug(cli, tmpdir, datafiles): |
| 70 | 70 |
# for a fetch command, we could report this to the user
|
| 71 | 71 |
# more gracefully as a BUG message.
|
| 72 | 72 |
#
|
| 73 |
- result = cli.run(project=project, args=['fetch', 'bug.bst'])
|
|
| 73 |
+ result = cli.run(project=project, args=['source', 'fetch', 'bug.bst'])
|
|
| 74 | 74 |
assert result.exc is not None
|
| 75 | 75 |
assert str(result.exc) == "Something went terribly wrong"
|
| 76 | 76 |
|
| ... | ... | @@ -121,7 +121,7 @@ def test_unfetched_junction(cli, tmpdir, datafiles, ref_storage): |
| 121 | 121 |
|
| 122 | 122 |
# Now try to fetch it, this should automatically result in fetching
|
| 123 | 123 |
# the junction itself.
|
| 124 |
- result = cli.run(project=project, args=['fetch', 'junction-dep.bst'])
|
|
| 124 |
+ result = cli.run(project=project, args=['source', 'fetch', 'junction-dep.bst'])
|
|
| 125 | 125 |
result.assert_success()
|
| 126 | 126 |
|
| 127 | 127 |
|
| ... | ... | @@ -155,7 +155,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage): |
| 155 | 155 |
|
| 156 | 156 |
# Now try to fetch it, this will bail with the appropriate error
|
| 157 | 157 |
# informing the user to track the junction first
|
| 158 |
- result = cli.run(project=project, args=['fetch', 'junction-dep.bst'])
|
|
| 158 |
+ result = cli.run(project=project, args=['source', 'fetch', 'junction-dep.bst'])
|
|
| 159 | 159 |
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT)
|
| 160 | 160 |
|
| 161 | 161 |
|
| ... | ... | @@ -188,10 +188,10 @@ def test_fetch_cross_junction(cli, tmpdir, datafiles, ref_storage, kind): |
| 188 | 188 |
generate_junction(tmpdir, subproject_path, junction_path, store_ref=(ref_storage == 'inline'))
|
| 189 | 189 |
|
| 190 | 190 |
if ref_storage == 'project.refs':
|
| 191 |
- result = cli.run(project=project, args=['track', 'junction.bst'])
|
|
| 191 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
|
|
| 192 | 192 |
result.assert_success()
|
| 193 |
- result = cli.run(project=project, args=['track', 'junction.bst:import-etc.bst'])
|
|
| 193 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst:import-etc.bst'])
|
|
| 194 | 194 |
result.assert_success()
|
| 195 | 195 |
|
| 196 |
- result = cli.run(project=project, args=['fetch', 'junction.bst:import-etc.bst'])
|
|
| 196 |
+ result = cli.run(project=project, args=['source', 'fetch', 'junction.bst:import-etc.bst'])
|
|
| 197 | 197 |
result.assert_success()
|
| ... | ... | @@ -20,12 +20,11 @@ def test_help_main(cli): |
| 20 | 20 |
@pytest.mark.parametrize("command", [
|
| 21 | 21 |
('build'),
|
| 22 | 22 |
('checkout'),
|
| 23 |
- ('fetch'),
|
|
| 24 | 23 |
('pull'),
|
| 25 | 24 |
('push'),
|
| 26 | 25 |
('shell'),
|
| 27 | 26 |
('show'),
|
| 28 |
- ('track'),
|
|
| 27 |
+ ('source'),
|
|
| 29 | 28 |
('workspace')
|
| 30 | 29 |
])
|
| 31 | 30 |
def test_help(cli, command):
|
| ... | ... | @@ -38,7 +38,7 @@ def test_default_logging(cli, tmpdir, datafiles): |
| 38 | 38 |
element_name))
|
| 39 | 39 |
|
| 40 | 40 |
# Now try to fetch it
|
| 41 |
- result = cli.run(project=project, args=['fetch', element_name])
|
|
| 41 |
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
|
|
| 42 | 42 |
result.assert_success()
|
| 43 | 43 |
|
| 44 | 44 |
m = re.search("\[\d\d:\d\d:\d\d\]\[\]\[\] SUCCESS Checking sources", result.stderr)
|
| ... | ... | @@ -74,7 +74,7 @@ def test_custom_logging(cli, tmpdir, datafiles): |
| 74 | 74 |
element_name))
|
| 75 | 75 |
|
| 76 | 76 |
# Now try to fetch it
|
| 77 |
- result = cli.run(project=project, args=['fetch', element_name])
|
|
| 77 |
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
|
|
| 78 | 78 |
result.assert_success()
|
| 79 | 79 |
|
| 80 | 80 |
m = re.search("\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,,,SUCCESS,Checking sources", result.stderr)
|
| ... | ... | @@ -135,7 +135,7 @@ def test_mirror_fetch(cli, tmpdir, datafiles, kind): |
| 135 | 135 |
|
| 136 | 136 |
# No obvious ways of checking that the mirror has been fetched
|
| 137 | 137 |
# But at least we can be sure it succeeds
|
| 138 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 138 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 139 | 139 |
result.assert_success()
|
| 140 | 140 |
|
| 141 | 141 |
|
| ... | ... | @@ -211,7 +211,7 @@ def test_mirror_fetch_ref_storage(cli, tmpdir, datafiles, ref_storage, mirror): |
| 211 | 211 |
project_file = os.path.join(project_dir, 'project.conf')
|
| 212 | 212 |
_yaml.dump(project, project_file)
|
| 213 | 213 |
|
| 214 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 214 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 215 | 215 |
result.assert_success()
|
| 216 | 216 |
|
| 217 | 217 |
|
| ... | ... | @@ -268,7 +268,7 @@ def test_mirror_fetch_upstream_absent(cli, tmpdir, datafiles, kind): |
| 268 | 268 |
project_file = os.path.join(project_dir, 'project.conf')
|
| 269 | 269 |
_yaml.dump(project, project_file)
|
| 270 | 270 |
|
| 271 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 271 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 272 | 272 |
result.assert_success()
|
| 273 | 273 |
|
| 274 | 274 |
|
| ... | ... | @@ -287,7 +287,7 @@ def test_mirror_fetch_multi(cli, tmpdir, datafiles): |
| 287 | 287 |
project = generate_project()
|
| 288 | 288 |
_yaml.dump(project, project_file)
|
| 289 | 289 |
|
| 290 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 290 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 291 | 291 |
result.assert_success()
|
| 292 | 292 |
with open(output_file) as f:
|
| 293 | 293 |
contents = f.read()
|
| ... | ... | @@ -310,7 +310,7 @@ def test_mirror_fetch_default_cmdline(cli, tmpdir, datafiles): |
| 310 | 310 |
project = generate_project()
|
| 311 | 311 |
_yaml.dump(project, project_file)
|
| 312 | 312 |
|
| 313 |
- result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'fetch', element_name])
|
|
| 313 |
+ result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'source', 'fetch', element_name])
|
|
| 314 | 314 |
result.assert_success()
|
| 315 | 315 |
with open(output_file) as f:
|
| 316 | 316 |
contents = f.read()
|
| ... | ... | @@ -349,7 +349,7 @@ def test_mirror_fetch_default_userconfig(cli, tmpdir, datafiles): |
| 349 | 349 |
}
|
| 350 | 350 |
cli.configure(userconfig)
|
| 351 | 351 |
|
| 352 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 352 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 353 | 353 |
result.assert_success()
|
| 354 | 354 |
with open(output_file) as f:
|
| 355 | 355 |
contents = f.read()
|
| ... | ... | @@ -388,7 +388,7 @@ def test_mirror_fetch_default_cmdline_overrides_config(cli, tmpdir, datafiles): |
| 388 | 388 |
}
|
| 389 | 389 |
cli.configure(userconfig)
|
| 390 | 390 |
|
| 391 |
- result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'fetch', element_name])
|
|
| 391 |
+ result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'source', 'fetch', element_name])
|
|
| 392 | 392 |
result.assert_success()
|
| 393 | 393 |
with open(output_file) as f:
|
| 394 | 394 |
contents = f.read()
|
| ... | ... | @@ -459,7 +459,7 @@ def test_mirror_track_upstream_present(cli, tmpdir, datafiles, kind): |
| 459 | 459 |
project_file = os.path.join(project_dir, 'project.conf')
|
| 460 | 460 |
_yaml.dump(project, project_file)
|
| 461 | 461 |
|
| 462 |
- result = cli.run(project=project_dir, args=['track', element_name])
|
|
| 462 |
+ result = cli.run(project=project_dir, args=['source', 'track', element_name])
|
|
| 463 | 463 |
result.assert_success()
|
| 464 | 464 |
|
| 465 | 465 |
# Tracking tries upstream first. Check the ref is from upstream.
|
| ... | ... | @@ -525,7 +525,7 @@ def test_mirror_track_upstream_absent(cli, tmpdir, datafiles, kind): |
| 525 | 525 |
project_file = os.path.join(project_dir, 'project.conf')
|
| 526 | 526 |
_yaml.dump(project, project_file)
|
| 527 | 527 |
|
| 528 |
- result = cli.run(project=project_dir, args=['track', element_name])
|
|
| 528 |
+ result = cli.run(project=project_dir, args=['source', 'track', element_name])
|
|
| 529 | 529 |
result.assert_success()
|
| 530 | 530 |
|
| 531 | 531 |
# Check that tracking fell back to the mirror
|
| ... | ... | @@ -604,7 +604,7 @@ def test_mirror_from_includes(cli, tmpdir, datafiles, kind): |
| 604 | 604 |
|
| 605 | 605 |
# Now make the upstream unavailable.
|
| 606 | 606 |
os.rename(upstream_repo.repo, '{}.bak'.format(upstream_repo.repo))
|
| 607 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 607 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 608 | 608 |
result.assert_success()
|
| 609 | 609 |
|
| 610 | 610 |
|
| ... | ... | @@ -678,11 +678,11 @@ def test_mirror_junction_from_includes(cli, tmpdir, datafiles, kind): |
| 678 | 678 |
|
| 679 | 679 |
# Now make the upstream unavailable.
|
| 680 | 680 |
os.rename(upstream_repo.repo, '{}.bak'.format(upstream_repo.repo))
|
| 681 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 681 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 682 | 682 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 683 | 683 |
# Now make the upstream available again.
|
| 684 | 684 |
os.rename('{}.bak'.format(upstream_repo.repo), upstream_repo.repo)
|
| 685 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 685 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 686 | 686 |
result.assert_success()
|
| 687 | 687 |
|
| 688 | 688 |
|
| ... | ... | @@ -762,7 +762,7 @@ def test_mirror_git_submodule_fetch(cli, tmpdir, datafiles): |
| 762 | 762 |
project_file = os.path.join(project_dir, 'project.conf')
|
| 763 | 763 |
_yaml.dump(project, project_file)
|
| 764 | 764 |
|
| 765 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 765 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 766 | 766 |
result.assert_success()
|
| 767 | 767 |
|
| 768 | 768 |
|
| ... | ... | @@ -849,7 +849,7 @@ def test_mirror_fallback_git_only_submodules(cli, tmpdir, datafiles): |
| 849 | 849 |
|
| 850 | 850 |
# Now make the upstream unavailable.
|
| 851 | 851 |
os.rename(upstream_bin_repo.repo, '{}.bak'.format(upstream_bin_repo.repo))
|
| 852 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 852 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 853 | 853 |
result.assert_success()
|
| 854 | 854 |
|
| 855 | 855 |
result = cli.run(project=project_dir, args=['build', element_name])
|
| ... | ... | @@ -945,7 +945,7 @@ def test_mirror_fallback_git_with_submodules(cli, tmpdir, datafiles): |
| 945 | 945 |
|
| 946 | 946 |
# Now make the upstream unavailable.
|
| 947 | 947 |
os.rename(upstream_main_repo.repo, '{}.bak'.format(upstream_main_repo.repo))
|
| 948 |
- result = cli.run(project=project_dir, args=['fetch', element_name])
|
|
| 948 |
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
|
|
| 949 | 949 |
result.assert_success()
|
| 950 | 950 |
|
| 951 | 951 |
result = cli.run(project=project_dir, args=['build', element_name])
|
| ... | ... | @@ -236,7 +236,7 @@ def test_fetched_junction(cli, tmpdir, datafiles, element_name): |
| 236 | 236 |
_yaml.dump(element, element_path)
|
| 237 | 237 |
|
| 238 | 238 |
result = cli.run(project=project, silent=True, args=[
|
| 239 |
- 'fetch', 'junction.bst'])
|
|
| 239 |
+ 'source', 'fetch', 'junction.bst'])
|
|
| 240 | 240 |
|
| 241 | 241 |
result.assert_success()
|
| 242 | 242 |
|
| ... | ... | @@ -50,7 +50,7 @@ def test_source_checkout(datafiles, cli, tmpdir_factory, with_workspace, guess_e |
| 50 | 50 |
else:
|
| 51 | 51 |
ws_cmd = []
|
| 52 | 52 |
|
| 53 |
- args = ws_cmd + ['source-checkout', '--deps', 'none'] + elm_cmd + [checkout]
|
|
| 53 |
+ args = ws_cmd + ['source', 'checkout', '--deps', 'none'] + elm_cmd + [checkout]
|
|
| 54 | 54 |
result = cli.run(project=project, args=args)
|
| 55 | 55 |
result.assert_success()
|
| 56 | 56 |
|
| ... | ... | @@ -67,7 +67,7 @@ def test_source_checkout_force(datafiles, cli, force_flag): |
| 67 | 67 |
os.makedirs(os.path.join(checkout, 'some-thing'))
|
| 68 | 68 |
# Path(os.path.join(checkout, 'some-file')).touch()
|
| 69 | 69 |
|
| 70 |
- result = cli.run(project=project, args=['source-checkout', force_flag, target, '--deps', 'none', checkout])
|
|
| 70 |
+ result = cli.run(project=project, args=['source', 'checkout', force_flag, target, '--deps', 'none', checkout])
|
|
| 71 | 71 |
result.assert_success()
|
| 72 | 72 |
|
| 73 | 73 |
assert os.path.exists(os.path.join(checkout, 'checkout-deps', 'etc', 'buildstream', 'config'))
|
| ... | ... | @@ -79,7 +79,7 @@ def test_source_checkout_tar(datafiles, cli): |
| 79 | 79 |
checkout = os.path.join(cli.directory, 'source-checkout.tar')
|
| 80 | 80 |
target = 'checkout-deps.bst'
|
| 81 | 81 |
|
| 82 |
- result = cli.run(project=project, args=['source-checkout', '--tar', target, '--deps', 'none', checkout])
|
|
| 82 |
+ result = cli.run(project=project, args=['source', 'checkout', '--tar', target, '--deps', 'none', checkout])
|
|
| 83 | 83 |
result.assert_success()
|
| 84 | 84 |
|
| 85 | 85 |
assert os.path.exists(checkout)
|
| ... | ... | @@ -97,7 +97,7 @@ def test_source_checkout_deps(datafiles, cli, deps): |
| 97 | 97 |
checkout = os.path.join(cli.directory, 'source-checkout')
|
| 98 | 98 |
target = 'checkout-deps.bst'
|
| 99 | 99 |
|
| 100 |
- result = cli.run(project=project, args=['source-checkout', target, '--deps', deps, checkout])
|
|
| 100 |
+ result = cli.run(project=project, args=['source', 'checkout', target, '--deps', deps, checkout])
|
|
| 101 | 101 |
result.assert_success()
|
| 102 | 102 |
|
| 103 | 103 |
# Sources of the target
|
| ... | ... | @@ -125,7 +125,7 @@ def test_source_checkout_except(datafiles, cli): |
| 125 | 125 |
checkout = os.path.join(cli.directory, 'source-checkout')
|
| 126 | 126 |
target = 'checkout-deps.bst'
|
| 127 | 127 |
|
| 128 |
- result = cli.run(project=project, args=['source-checkout', target,
|
|
| 128 |
+ result = cli.run(project=project, args=['source', 'checkout', target,
|
|
| 129 | 129 |
'--deps', 'all',
|
| 130 | 130 |
'--except', 'import-bin.bst',
|
| 131 | 131 |
checkout])
|
| ... | ... | @@ -159,7 +159,7 @@ def test_source_checkout_fetch(datafiles, cli, fetch): |
| 159 | 159 |
# cached already
|
| 160 | 160 |
assert cli.get_element_state(project, target) == 'fetch needed'
|
| 161 | 161 |
|
| 162 |
- args = ['source-checkout']
|
|
| 162 |
+ args = ['source', 'checkout']
|
|
| 163 | 163 |
if fetch:
|
| 164 | 164 |
args += ['--fetch']
|
| 165 | 165 |
args += [target, checkout]
|
| ... | ... | @@ -179,7 +179,7 @@ def test_source_checkout_build_scripts(cli, tmpdir, datafiles): |
| 179 | 179 |
normal_name = 'source-bundle-source-bundle-hello'
|
| 180 | 180 |
checkout = os.path.join(str(tmpdir), 'source-checkout')
|
| 181 | 181 |
|
| 182 |
- args = ['source-checkout', '--include-build-scripts', element_name, checkout]
|
|
| 182 |
+ args = ['source', 'checkout', '--include-build-scripts', element_name, checkout]
|
|
| 183 | 183 |
result = cli.run(project=project_path, args=args)
|
| 184 | 184 |
result.assert_success()
|
| 185 | 185 |
|
| ... | ... | @@ -196,7 +196,7 @@ def test_source_checkout_tar_buildscripts(cli, tmpdir, datafiles): |
| 196 | 196 |
normal_name = 'source-bundle-source-bundle-hello'
|
| 197 | 197 |
tar_file = os.path.join(str(tmpdir), 'source-checkout.tar')
|
| 198 | 198 |
|
| 199 |
- args = ['source-checkout', '--include-build-scripts', '--tar', element_name, tar_file]
|
|
| 199 |
+ args = ['source', 'checkout', '--include-build-scripts', '--tar', element_name, tar_file]
|
|
| 200 | 200 |
result = cli.run(project=project_path, args=args)
|
| 201 | 201 |
result.assert_success()
|
| 202 | 202 |
|
| ... | ... | @@ -52,14 +52,14 @@ def test_track(cli, tmpdir, datafiles, ref_storage, kind): |
| 52 | 52 |
assert cli.get_element_state(project, element_name) == 'no reference'
|
| 53 | 53 |
|
| 54 | 54 |
# Now first try to track it
|
| 55 |
- result = cli.run(project=project, args=['track', element_name])
|
|
| 55 |
+ result = cli.run(project=project, args=['source', 'track', element_name])
|
|
| 56 | 56 |
result.assert_success()
|
| 57 | 57 |
|
| 58 | 58 |
# And now fetch it: The Source has probably already cached the
|
| 59 | 59 |
# latest ref locally, but it is not required to have cached
|
| 60 | 60 |
# the associated content of the latest ref at track time, that
|
| 61 | 61 |
# is the job of fetch.
|
| 62 |
- result = cli.run(project=project, args=['fetch', element_name])
|
|
| 62 |
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
|
|
| 63 | 63 |
result.assert_success()
|
| 64 | 64 |
|
| 65 | 65 |
# Assert that we are now buildable because the source is
|
| ... | ... | @@ -99,7 +99,7 @@ def test_track_recurse(cli, tmpdir, datafiles, kind): |
| 99 | 99 |
|
| 100 | 100 |
# Now first try to track it
|
| 101 | 101 |
result = cli.run(project=project, args=[
|
| 102 |
- 'track', '--deps', 'all',
|
|
| 102 |
+ 'source', 'track', '--deps', 'all',
|
|
| 103 | 103 |
element_target_name])
|
| 104 | 104 |
result.assert_success()
|
| 105 | 105 |
|
| ... | ... | @@ -108,7 +108,7 @@ def test_track_recurse(cli, tmpdir, datafiles, kind): |
| 108 | 108 |
# the associated content of the latest ref at track time, that
|
| 109 | 109 |
# is the job of fetch.
|
| 110 | 110 |
result = cli.run(project=project, args=[
|
| 111 |
- 'fetch', '--deps', 'all',
|
|
| 111 |
+ 'source', 'fetch', '--deps', 'all',
|
|
| 112 | 112 |
element_target_name])
|
| 113 | 113 |
result.assert_success()
|
| 114 | 114 |
|
| ... | ... | @@ -142,13 +142,13 @@ def test_track_single(cli, tmpdir, datafiles): |
| 142 | 142 |
|
| 143 | 143 |
# Now first try to track only one element
|
| 144 | 144 |
result = cli.run(project=project, args=[
|
| 145 |
- 'track', '--deps', 'none',
|
|
| 145 |
+ 'source', 'track', '--deps', 'none',
|
|
| 146 | 146 |
element_target_name])
|
| 147 | 147 |
result.assert_success()
|
| 148 | 148 |
|
| 149 | 149 |
# And now fetch it
|
| 150 | 150 |
result = cli.run(project=project, args=[
|
| 151 |
- 'fetch', '--deps', 'none',
|
|
| 151 |
+ 'source', 'fetch', '--deps', 'none',
|
|
| 152 | 152 |
element_target_name])
|
| 153 | 153 |
result.assert_success()
|
| 154 | 154 |
|
| ... | ... | @@ -183,7 +183,7 @@ def test_track_recurse_except(cli, tmpdir, datafiles, kind): |
| 183 | 183 |
|
| 184 | 184 |
# Now first try to track it
|
| 185 | 185 |
result = cli.run(project=project, args=[
|
| 186 |
- 'track', '--deps', 'all', '--except', element_dep_name,
|
|
| 186 |
+ 'source', 'track', '--deps', 'all', '--except', element_dep_name,
|
|
| 187 | 187 |
element_target_name])
|
| 188 | 188 |
result.assert_success()
|
| 189 | 189 |
|
| ... | ... | @@ -192,7 +192,7 @@ def test_track_recurse_except(cli, tmpdir, datafiles, kind): |
| 192 | 192 |
# the associated content of the latest ref at track time, that
|
| 193 | 193 |
# is the job of fetch.
|
| 194 | 194 |
result = cli.run(project=project, args=[
|
| 195 |
- 'fetch', '--deps', 'none',
|
|
| 195 |
+ 'source', 'fetch', '--deps', 'none',
|
|
| 196 | 196 |
element_target_name])
|
| 197 | 197 |
result.assert_success()
|
| 198 | 198 |
|
| ... | ... | @@ -231,9 +231,9 @@ def test_track_optional(cli, tmpdir, datafiles, ref_storage): |
| 231 | 231 |
#
|
| 232 | 232 |
# We want to track and persist the ref separately in this test
|
| 233 | 233 |
#
|
| 234 |
- result = cli.run(project=project, args=['--option', 'test', 'False', 'track', 'target.bst'])
|
|
| 234 |
+ result = cli.run(project=project, args=['--option', 'test', 'False', 'source', 'track', 'target.bst'])
|
|
| 235 | 235 |
result.assert_success()
|
| 236 |
- result = cli.run(project=project, args=['--option', 'test', 'True', 'track', 'target.bst'])
|
|
| 236 |
+ result = cli.run(project=project, args=['--option', 'test', 'True', 'source', 'track', 'target.bst'])
|
|
| 237 | 237 |
result.assert_success()
|
| 238 | 238 |
|
| 239 | 239 |
# Now fetch the key for both options
|
| ... | ... | @@ -309,7 +309,7 @@ def test_track_cross_junction(cli, tmpdir, datafiles, cross_junction, ref_storag |
| 309 | 309 |
assert get_subproject_element_state() == 'no reference'
|
| 310 | 310 |
|
| 311 | 311 |
# Track recursively across the junction
|
| 312 |
- args = ['track', '--deps', 'all']
|
|
| 312 |
+ args = ['source', 'track', '--deps', 'all']
|
|
| 313 | 313 |
if cross_junction == 'cross':
|
| 314 | 314 |
args += ['--cross-junctions']
|
| 315 | 315 |
args += ['target.bst']
|
| ... | ... | @@ -350,7 +350,7 @@ def test_track_consistency_error(cli, tmpdir, datafiles): |
| 350 | 350 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
| 351 | 351 |
|
| 352 | 352 |
# Track the element causing a consistency error
|
| 353 |
- result = cli.run(project=project, args=['track', 'error.bst'])
|
|
| 353 |
+ result = cli.run(project=project, args=['source', 'track', 'error.bst'])
|
|
| 354 | 354 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 355 | 355 |
result.assert_task_error(ErrorDomain.SOURCE, 'the-consistency-error')
|
| 356 | 356 |
|
| ... | ... | @@ -360,7 +360,7 @@ def test_track_consistency_bug(cli, tmpdir, datafiles): |
| 360 | 360 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
| 361 | 361 |
|
| 362 | 362 |
# Track the element causing an unhandled exception
|
| 363 |
- result = cli.run(project=project, args=['track', 'bug.bst'])
|
|
| 363 |
+ result = cli.run(project=project, args=['source', 'track', 'bug.bst'])
|
|
| 364 | 364 |
|
| 365 | 365 |
# We expect BuildStream to fail gracefully, with no recorded exception.
|
| 366 | 366 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| ... | ... | @@ -396,7 +396,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage): |
| 396 | 396 |
|
| 397 | 397 |
# Now try to track it, this will bail with the appropriate error
|
| 398 | 398 |
# informing the user to track the junction first
|
| 399 |
- result = cli.run(project=project, args=['track', 'junction-dep.bst'])
|
|
| 399 |
+ result = cli.run(project=project, args=['source', 'track', 'junction-dep.bst'])
|
|
| 400 | 400 |
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT)
|
| 401 | 401 |
|
| 402 | 402 |
|
| ... | ... | @@ -433,7 +433,7 @@ def test_junction_element(cli, tmpdir, datafiles, ref_storage): |
| 433 | 433 |
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT)
|
| 434 | 434 |
|
| 435 | 435 |
# Now track the junction itself
|
| 436 |
- result = cli.run(project=project, args=['track', 'junction.bst'])
|
|
| 436 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
|
|
| 437 | 437 |
result.assert_success()
|
| 438 | 438 |
|
| 439 | 439 |
# Now assert element state (via bst show under the hood) of the dep again
|
| ... | ... | @@ -464,13 +464,13 @@ def test_cross_junction(cli, tmpdir, datafiles, ref_storage, kind): |
| 464 | 464 |
subproject_path, junction_path, store_ref=False)
|
| 465 | 465 |
|
| 466 | 466 |
# Track the junction itself first.
|
| 467 |
- result = cli.run(project=project, args=['track', 'junction.bst'])
|
|
| 467 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
|
|
| 468 | 468 |
result.assert_success()
|
| 469 | 469 |
|
| 470 | 470 |
assert cli.get_element_state(project, 'junction.bst:import-etc-repo.bst') == 'no reference'
|
| 471 | 471 |
|
| 472 | 472 |
# Track the cross junction element. -J is not given, it is implied.
|
| 473 |
- result = cli.run(project=project, args=['track', 'junction.bst:import-etc-repo.bst'])
|
|
| 473 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst:import-etc-repo.bst'])
|
|
| 474 | 474 |
|
| 475 | 475 |
if ref_storage == 'inline':
|
| 476 | 476 |
# This is not allowed to track cross junction without project.refs.
|
| ... | ... | @@ -520,14 +520,14 @@ def test_track_include(cli, tmpdir, datafiles, ref_storage, kind): |
| 520 | 520 |
assert cli.get_element_state(project, element_name) == 'no reference'
|
| 521 | 521 |
|
| 522 | 522 |
# Now first try to track it
|
| 523 |
- result = cli.run(project=project, args=['track', element_name])
|
|
| 523 |
+ result = cli.run(project=project, args=['source', 'track', element_name])
|
|
| 524 | 524 |
result.assert_success()
|
| 525 | 525 |
|
| 526 | 526 |
# And now fetch it: The Source has probably already cached the
|
| 527 | 527 |
# latest ref locally, but it is not required to have cached
|
| 528 | 528 |
# the associated content of the latest ref at track time, that
|
| 529 | 529 |
# is the job of fetch.
|
| 530 |
- result = cli.run(project=project, args=['fetch', element_name])
|
|
| 530 |
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
|
|
| 531 | 531 |
result.assert_success()
|
| 532 | 532 |
|
| 533 | 533 |
# Assert that we are now buildable because the source is
|
| ... | ... | @@ -585,14 +585,14 @@ def test_track_include_junction(cli, tmpdir, datafiles, ref_storage, kind): |
| 585 | 585 |
generate_junction(str(tmpdir.join('junction_repo')),
|
| 586 | 586 |
subproject_path, junction_path, store_ref=True)
|
| 587 | 587 |
|
| 588 |
- result = cli.run(project=project, args=['track', 'junction.bst'])
|
|
| 588 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
|
|
| 589 | 589 |
result.assert_success()
|
| 590 | 590 |
|
| 591 | 591 |
# Assert that a fetch is needed
|
| 592 | 592 |
assert cli.get_element_state(project, element_name) == 'no reference'
|
| 593 | 593 |
|
| 594 | 594 |
# Now first try to track it
|
| 595 |
- result = cli.run(project=project, args=['track', element_name])
|
|
| 595 |
+ result = cli.run(project=project, args=['source', 'track', element_name])
|
|
| 596 | 596 |
|
| 597 | 597 |
# Assert there was a project.refs created, depending on the configuration
|
| 598 | 598 |
if ref_storage == 'inline':
|
| ... | ... | @@ -607,7 +607,7 @@ def test_track_include_junction(cli, tmpdir, datafiles, ref_storage, kind): |
| 607 | 607 |
# latest ref locally, but it is not required to have cached
|
| 608 | 608 |
# the associated content of the latest ref at track time, that
|
| 609 | 609 |
# is the job of fetch.
|
| 610 |
- result = cli.run(project=project, args=['fetch', element_name])
|
|
| 610 |
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
|
|
| 611 | 611 |
result.assert_success()
|
| 612 | 612 |
|
| 613 | 613 |
# Assert that we are now buildable because the source is
|
| ... | ... | @@ -633,7 +633,7 @@ def test_track_junction_included(cli, tmpdir, datafiles, ref_storage, kind): |
| 633 | 633 |
generate_junction(str(tmpdir.join('junction_repo')),
|
| 634 | 634 |
subproject_path, junction_path, store_ref=False)
|
| 635 | 635 |
|
| 636 |
- result = cli.run(project=project, args=['track', 'junction.bst'])
|
|
| 636 |
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
|
|
| 637 | 637 |
result.assert_success()
|
| 638 | 638 |
|
| 639 | 639 |
|
| ... | ... | @@ -663,7 +663,7 @@ def test_track_error_cannot_write_file(cli, tmpdir, datafiles, kind): |
| 663 | 663 |
read_mask = stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH
|
| 664 | 664 |
os.chmod(element_path, stat.S_IMODE(st.st_mode) & ~read_mask)
|
| 665 | 665 |
|
| 666 |
- result = cli.run(project=project, args=['track', element_name])
|
|
| 666 |
+ result = cli.run(project=project, args=['source', 'track', element_name])
|
|
| 667 | 667 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 668 | 668 |
result.assert_task_error(ErrorDomain.SOURCE, 'save-ref-error')
|
| 669 | 669 |
finally:
|
| ... | ... | @@ -100,7 +100,7 @@ def test_cross_junction_multiple_projects(cli, tmpdir, datafiles, kind): |
| 100 | 100 |
generate_junction(tmpdir.join('repo_b'), project_b_path, junction_b_path, store_ref=False)
|
| 101 | 101 |
|
| 102 | 102 |
# Track the junctions.
|
| 103 |
- result = cli.run(project=project, args=['track', junction_a, junction_b])
|
|
| 103 |
+ result = cli.run(project=project, args=['source', 'track', junction_a, junction_b])
|
|
| 104 | 104 |
result.assert_success()
|
| 105 | 105 |
|
| 106 | 106 |
# Import elements from a and b in to main.
|
| ... | ... | @@ -111,7 +111,10 @@ def test_cross_junction_multiple_projects(cli, tmpdir, datafiles, kind): |
| 111 | 111 |
all_bst = generate_simple_stack(project, 'all', [imported_a, imported_b, element_c])
|
| 112 | 112 |
|
| 113 | 113 |
# Track without following junctions. But explicitly also track the elements in project a.
|
| 114 |
- result = cli.run(project=project, args=['track', '--deps', 'all', all_bst, '{}:{}'.format(junction_a, stack_a)])
|
|
| 114 |
+ result = cli.run(project=project, args=['source', 'track',
|
|
| 115 |
+ '--deps', 'all',
|
|
| 116 |
+ all_bst,
|
|
| 117 |
+ '{}:{}'.format(junction_a, stack_a)])
|
|
| 115 | 118 |
result.assert_success()
|
| 116 | 119 |
|
| 117 | 120 |
# Elements in project b should not be tracked. But elements in project a and main should.
|
| ... | ... | @@ -137,14 +140,14 @@ def test_track_exceptions(cli, tmpdir, datafiles, kind): |
| 137 | 140 |
junction_a_path = os.path.join(project, 'elements', junction_a)
|
| 138 | 141 |
generate_junction(tmpdir.join('repo_a'), project_a_path, junction_a_path, store_ref=False)
|
| 139 | 142 |
|
| 140 |
- result = cli.run(project=project, args=['track', junction_a])
|
|
| 143 |
+ result = cli.run(project=project, args=['source', 'track', junction_a])
|
|
| 141 | 144 |
result.assert_success()
|
| 142 | 145 |
|
| 143 | 146 |
imported_b = generate_cross_element(project, project_a, element_b)
|
| 144 | 147 |
indirection = generate_simple_stack(project, 'indirection', [imported_b])
|
| 145 | 148 |
|
| 146 | 149 |
result = cli.run(project=project,
|
| 147 |
- args=['track', '--deps', 'all',
|
|
| 150 |
+ args=['source', 'track', '--deps', 'all',
|
|
| 148 | 151 |
'--except', indirection,
|
| 149 | 152 |
'{}:{}'.format(junction_a, all_bst), imported_b])
|
| 150 | 153 |
result.assert_success()
|
| ... | ... | @@ -1078,7 +1078,7 @@ def test_external_fetch(cli, datafiles, tmpdir_factory, subdir, guess_element): |
| 1078 | 1078 |
else:
|
| 1079 | 1079 |
call_dir = workspace
|
| 1080 | 1080 |
|
| 1081 |
- result = cli.run(project=project, args=['-C', call_dir, 'fetch'] + arg_elm)
|
|
| 1081 |
+ result = cli.run(project=project, args=['-C', call_dir, 'source', 'fetch'] + arg_elm)
|
|
| 1082 | 1082 |
result.assert_success()
|
| 1083 | 1083 |
|
| 1084 | 1084 |
# We already fetched it by opening the workspace, but we're also checking
|
| ... | ... | @@ -1122,7 +1122,7 @@ def test_external_track(cli, datafiles, tmpdir_factory, guess_element): |
| 1122 | 1122 |
|
| 1123 | 1123 |
# The workspace is necessarily already tracked, so we only care that
|
| 1124 | 1124 |
# there's no weird errors.
|
| 1125 |
- result = cli.run(project=project, args=['-C', workspace, 'track'] + arg_elm)
|
|
| 1125 |
+ result = cli.run(project=project, args=['-C', workspace, 'source', 'track'] + arg_elm)
|
|
| 1126 | 1126 |
result.assert_success()
|
| 1127 | 1127 |
|
| 1128 | 1128 |
|
| ... | ... | @@ -82,7 +82,7 @@ def test_yamlcache_used(cli, tmpdir, ref_storage, with_junction, move_project): |
| 82 | 82 |
# Generate the project
|
| 83 | 83 |
project = generate_project(str(tmpdir), ref_storage, with_junction)
|
| 84 | 84 |
if with_junction == 'junction':
|
| 85 |
- result = cli.run(project=project, args=['fetch', '--track', 'junction.bst'])
|
|
| 85 |
+ result = cli.run(project=project, args=['source', 'fetch', '--track', 'junction.bst'])
|
|
| 86 | 86 |
result.assert_success()
|
| 87 | 87 |
|
| 88 | 88 |
# bst show to put it in the cache
|
| ... | ... | @@ -118,7 +118,7 @@ def test_yamlcache_changed_file(cli, tmpdir, ref_storage, with_junction): |
| 118 | 118 |
# Generate the project
|
| 119 | 119 |
project = generate_project(str(tmpdir), ref_storage, with_junction)
|
| 120 | 120 |
if with_junction == 'junction':
|
| 121 |
- result = cli.run(project=project, args=['fetch', '--track', 'junction.bst'])
|
|
| 121 |
+ result = cli.run(project=project, args=['source', 'fetch', '--track', 'junction.bst'])
|
|
| 122 | 122 |
result.assert_success()
|
| 123 | 123 |
|
| 124 | 124 |
# bst show to put it in the cache
|
| ... | ... | @@ -91,7 +91,7 @@ def test_compose_include(cli, tmpdir, datafiles, include_domains, |
| 91 | 91 |
}
|
| 92 | 92 |
create_compose_element(element_name, element_path, config=config)
|
| 93 | 93 |
|
| 94 |
- result = cli.run(project=project, args=['track', 'compose/amhello.bst'])
|
|
| 94 |
+ result = cli.run(project=project, args=['source', 'track', 'compose/amhello.bst'])
|
|
| 95 | 95 |
assert result.exit_code == 0
|
| 96 | 96 |
|
| 97 | 97 |
result = cli.run(project=project, args=['build', element_name])
|
| ... | ... | @@ -52,7 +52,7 @@ def test_pip_source_import(cli, tmpdir, datafiles, setup_pypi_repo): |
| 52 | 52 |
os.makedirs(os.path.dirname(os.path.join(element_path, element_name)), exist_ok=True)
|
| 53 | 53 |
_yaml.dump(element, os.path.join(element_path, element_name))
|
| 54 | 54 |
|
| 55 |
- result = cli.run(project=project, args=['track', element_name])
|
|
| 55 |
+ result = cli.run(project=project, args=['source', 'track', element_name])
|
|
| 56 | 56 |
assert result.exit_code == 0
|
| 57 | 57 |
|
| 58 | 58 |
result = cli.run(project=project, args=['build', element_name])
|
| ... | ... | @@ -113,7 +113,7 @@ def test_pip_source_build(cli, tmpdir, datafiles, setup_pypi_repo): |
| 113 | 113 |
os.makedirs(os.path.dirname(os.path.join(element_path, element_name)), exist_ok=True)
|
| 114 | 114 |
_yaml.dump(element, os.path.join(element_path, element_name))
|
| 115 | 115 |
|
| 116 |
- result = cli.run(project=project, args=['track', element_name])
|
|
| 116 |
+ result = cli.run(project=project, args=['source', 'track', element_name])
|
|
| 117 | 117 |
assert result.exit_code == 0
|
| 118 | 118 |
|
| 119 | 119 |
result = cli.run(project=project, args=['build', element_name])
|
| ... | ... | @@ -234,7 +234,7 @@ def test_git_show(cli, tmpdir, datafiles): |
| 234 | 234 |
assert result.exception.reason == LoadErrorReason.SUBPROJECT_FETCH_NEEDED
|
| 235 | 235 |
|
| 236 | 236 |
# Explicitly fetch subproject
|
| 237 |
- result = cli.run(project=project, args=['fetch', 'base.bst'])
|
|
| 237 |
+ result = cli.run(project=project, args=['source', 'fetch', 'base.bst'])
|
|
| 238 | 238 |
assert result.exit_code == 0
|
| 239 | 239 |
|
| 240 | 240 |
# Check that bst show succeeds now and the pipeline includes the subproject element
|
| ... | ... | @@ -15,5 +15,5 @@ def test_load_simple(cli, datafiles, tmpdir): |
| 15 | 15 |
basedir = os.path.join(datafiles.dirname, datafiles.basename)
|
| 16 | 16 |
|
| 17 | 17 |
# Lets try to fetch it...
|
| 18 |
- result = cli.run(project=basedir, args=['fetch', 'error.bst'])
|
|
| 18 |
+ result = cli.run(project=basedir, args=['source', 'fetch', 'error.bst'])
|
|
| 19 | 19 |
result.assert_main_error(ErrorDomain.SOURCE, "the-preflight-error")
|
| ... | ... | @@ -227,7 +227,7 @@ def test_filter_track(datafiles, cli, tmpdir): |
| 227 | 227 |
assert cli.get_element_state(project, input_name) == 'no reference'
|
| 228 | 228 |
|
| 229 | 229 |
# Now try to track it
|
| 230 |
- result = cli.run(project=project, args=["track", "filter2.bst"])
|
|
| 230 |
+ result = cli.run(project=project, args=["source", "track", "filter2.bst"])
|
|
| 231 | 231 |
result.assert_success()
|
| 232 | 232 |
|
| 233 | 233 |
# Now check that a ref field exists
|
| ... | ... | @@ -280,7 +280,7 @@ def test_filter_track_excepted(datafiles, cli, tmpdir): |
| 280 | 280 |
assert cli.get_element_state(project, input_name) == 'no reference'
|
| 281 | 281 |
|
| 282 | 282 |
# Now try to track it
|
| 283 |
- result = cli.run(project=project, args=["track", "filter2.bst", "--except", "input.bst"])
|
|
| 283 |
+ result = cli.run(project=project, args=["source", "track", "filter2.bst", "--except", "input.bst"])
|
|
| 284 | 284 |
result.assert_success()
|
| 285 | 285 |
|
| 286 | 286 |
# Now check that a ref field exists
|
| ... | ... | @@ -333,7 +333,7 @@ def test_filter_track_multi_to_one(datafiles, cli, tmpdir): |
| 333 | 333 |
assert cli.get_element_state(project, input_name) == 'no reference'
|
| 334 | 334 |
|
| 335 | 335 |
# Now try to track it
|
| 336 |
- result = cli.run(project=project, args=["track", "filter1.bst", "filter2.bst"])
|
|
| 336 |
+ result = cli.run(project=project, args=["source", "track", "filter1.bst", "filter2.bst"])
|
|
| 337 | 337 |
result.assert_success()
|
| 338 | 338 |
|
| 339 | 339 |
# Now check that a ref field exists
|
| ... | ... | @@ -392,7 +392,7 @@ def test_filter_track_multi(datafiles, cli, tmpdir): |
| 392 | 392 |
assert cli.get_element_state(project, input2_name) == 'no reference'
|
| 393 | 393 |
|
| 394 | 394 |
# Now try to track it
|
| 395 |
- result = cli.run(project=project, args=["track", "filter1.bst", "filter2.bst"])
|
|
| 395 |
+ result = cli.run(project=project, args=["source", "track", "filter1.bst", "filter2.bst"])
|
|
| 396 | 396 |
result.assert_success()
|
| 397 | 397 |
|
| 398 | 398 |
# Now check that a ref field exists
|
| ... | ... | @@ -453,7 +453,7 @@ def test_filter_track_multi_exclude(datafiles, cli, tmpdir): |
| 453 | 453 |
assert cli.get_element_state(project, input2_name) == 'no reference'
|
| 454 | 454 |
|
| 455 | 455 |
# Now try to track it
|
| 456 |
- result = cli.run(project=project, args=["track", "filter1.bst", "filter2.bst", "--except", input_name])
|
|
| 456 |
+ result = cli.run(project=project, args=["source", "track", "filter1.bst", "filter2.bst", "--except", input_name])
|
|
| 457 | 457 |
result.assert_success()
|
| 458 | 458 |
|
| 459 | 459 |
# Now check that a ref field exists
|
| ... | ... | @@ -32,7 +32,7 @@ def test_fetch_checkout(cli, tmpdir, datafiles): |
| 32 | 32 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 33 | 33 |
|
| 34 | 34 |
# Fetch, build, checkout
|
| 35 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 35 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 36 | 36 |
assert result.exit_code == 0
|
| 37 | 37 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 38 | 38 |
assert result.exit_code == 0
|
| ... | ... | @@ -54,7 +54,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles): |
| 54 | 54 |
|
| 55 | 55 |
# Try to fetch it
|
| 56 | 56 |
result = cli.run(project=project, args=[
|
| 57 |
- 'fetch', 'target.bst'
|
|
| 57 |
+ 'source', 'fetch', 'target.bst'
|
|
| 58 | 58 |
])
|
| 59 | 59 |
assert "FAILURE Try #" in result.stderr
|
| 60 | 60 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| ... | ... | @@ -72,7 +72,7 @@ def test_fetch_bad_ref(cli, tmpdir, datafiles): |
| 72 | 72 |
|
| 73 | 73 |
# Try to fetch it
|
| 74 | 74 |
result = cli.run(project=project, args=[
|
| 75 |
- 'fetch', 'target.bst'
|
|
| 75 |
+ 'source', 'fetch', 'target.bst'
|
|
| 76 | 76 |
])
|
| 77 | 77 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 78 | 78 |
result.assert_task_error(ErrorDomain.SOURCE, None)
|
| ... | ... | @@ -90,7 +90,7 @@ def test_track_warning(cli, tmpdir, datafiles): |
| 90 | 90 |
|
| 91 | 91 |
# Track it
|
| 92 | 92 |
result = cli.run(project=project, args=[
|
| 93 |
- 'track', 'target.bst'
|
|
| 93 |
+ 'source', 'track', 'target.bst'
|
|
| 94 | 94 |
])
|
| 95 | 95 |
result.assert_success()
|
| 96 | 96 |
assert "Potential man-in-the-middle attack!" in result.stderr
|
| ... | ... | @@ -108,9 +108,9 @@ def test_stage_default_basedir(cli, tmpdir, datafiles): |
| 108 | 108 |
_copy_deb(DATA_DIR, tmpdir)
|
| 109 | 109 |
|
| 110 | 110 |
# Track, fetch, build, checkout
|
| 111 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 111 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 112 | 112 |
result.assert_success()
|
| 113 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 113 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 114 | 114 |
result.assert_success()
|
| 115 | 115 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 116 | 116 |
result.assert_success()
|
| ... | ... | @@ -136,9 +136,9 @@ def test_stage_no_basedir(cli, tmpdir, datafiles): |
| 136 | 136 |
_copy_deb(DATA_DIR, tmpdir)
|
| 137 | 137 |
|
| 138 | 138 |
# Track, fetch, build, checkout
|
| 139 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 139 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 140 | 140 |
result.assert_success()
|
| 141 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 141 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 142 | 142 |
result.assert_success()
|
| 143 | 143 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 144 | 144 |
result.assert_success()
|
| ... | ... | @@ -164,9 +164,9 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles): |
| 164 | 164 |
_copy_deb(DATA_DIR, tmpdir)
|
| 165 | 165 |
|
| 166 | 166 |
# Track, fetch, build, checkout
|
| 167 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 167 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 168 | 168 |
result.assert_success()
|
| 169 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 169 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 170 | 170 |
result.assert_success()
|
| 171 | 171 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 172 | 172 |
result.assert_success()
|
| ... | ... | @@ -58,7 +58,7 @@ def test_fetch_bad_ref(cli, tmpdir, datafiles): |
| 58 | 58 |
|
| 59 | 59 |
# Assert that fetch raises an error here
|
| 60 | 60 |
result = cli.run(project=project, args=[
|
| 61 |
- 'fetch', 'target.bst'
|
|
| 61 |
+ 'source', 'fetch', 'target.bst'
|
|
| 62 | 62 |
])
|
| 63 | 63 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 64 | 64 |
result.assert_task_error(ErrorDomain.SOURCE, None)
|
| ... | ... | @@ -91,7 +91,7 @@ def test_submodule_fetch_checkout(cli, tmpdir, datafiles): |
| 91 | 91 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 92 | 92 |
|
| 93 | 93 |
# Fetch, build, checkout
|
| 94 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 94 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 95 | 95 |
result.assert_success()
|
| 96 | 96 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 97 | 97 |
result.assert_success()
|
| ... | ... | @@ -130,7 +130,7 @@ def test_submodule_fetch_source_enable_explicit(cli, tmpdir, datafiles): |
| 130 | 130 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 131 | 131 |
|
| 132 | 132 |
# Fetch, build, checkout
|
| 133 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 133 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 134 | 134 |
result.assert_success()
|
| 135 | 135 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 136 | 136 |
result.assert_success()
|
| ... | ... | @@ -169,7 +169,7 @@ def test_submodule_fetch_source_disable(cli, tmpdir, datafiles): |
| 169 | 169 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 170 | 170 |
|
| 171 | 171 |
# Fetch, build, checkout
|
| 172 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 172 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 173 | 173 |
result.assert_success()
|
| 174 | 174 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 175 | 175 |
result.assert_success()
|
| ... | ... | @@ -208,7 +208,7 @@ def test_submodule_fetch_submodule_does_override(cli, tmpdir, datafiles): |
| 208 | 208 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 209 | 209 |
|
| 210 | 210 |
# Fetch, build, checkout
|
| 211 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 211 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 212 | 212 |
result.assert_success()
|
| 213 | 213 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 214 | 214 |
result.assert_success()
|
| ... | ... | @@ -252,7 +252,7 @@ def test_submodule_fetch_submodule_individual_checkout(cli, tmpdir, datafiles): |
| 252 | 252 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 253 | 253 |
|
| 254 | 254 |
# Fetch, build, checkout
|
| 255 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 255 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 256 | 256 |
result.assert_success()
|
| 257 | 257 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 258 | 258 |
result.assert_success()
|
| ... | ... | @@ -297,7 +297,7 @@ def test_submodule_fetch_submodule_individual_checkout_explicit(cli, tmpdir, dat |
| 297 | 297 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 298 | 298 |
|
| 299 | 299 |
# Fetch, build, checkout
|
| 300 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 300 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 301 | 301 |
result.assert_success()
|
| 302 | 302 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 303 | 303 |
result.assert_success()
|
| ... | ... | @@ -337,7 +337,7 @@ def test_submodule_fetch_project_override(cli, tmpdir, datafiles): |
| 337 | 337 |
_yaml.dump(element, os.path.join(project, 'target.bst'))
|
| 338 | 338 |
|
| 339 | 339 |
# Fetch, build, checkout
|
| 340 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 340 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 341 | 341 |
result.assert_success()
|
| 342 | 342 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 343 | 343 |
result.assert_success()
|
| ... | ... | @@ -375,11 +375,11 @@ def test_submodule_track_ignore_inconsistent(cli, tmpdir, datafiles): |
| 375 | 375 |
repo.add_file(os.path.join(project, 'inconsistent-submodule', '.gitmodules'))
|
| 376 | 376 |
|
| 377 | 377 |
# Fetch should work, we're not yet at the offending ref
|
| 378 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 378 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 379 | 379 |
result.assert_success()
|
| 380 | 380 |
|
| 381 | 381 |
# Track will encounter an inconsistent submodule without any ref
|
| 382 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 382 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 383 | 383 |
result.assert_success()
|
| 384 | 384 |
|
| 385 | 385 |
# Assert that we are just fine without it, and emit a warning to the user.
|
| ... | ... | @@ -508,7 +508,7 @@ def test_unlisted_submodule(cli, tmpdir, datafiles, fail): |
| 508 | 508 |
|
| 509 | 509 |
# We will notice this directly in fetch, as it will try to fetch
|
| 510 | 510 |
# the submodules it discovers as a result of fetching the primary repo.
|
| 511 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 511 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 512 | 512 |
|
| 513 | 513 |
# Assert a warning or an error depending on what we're checking
|
| 514 | 514 |
if fail == 'error':
|
| ... | ... | @@ -571,19 +571,19 @@ def test_track_unlisted_submodule(cli, tmpdir, datafiles, fail): |
| 571 | 571 |
|
| 572 | 572 |
# Fetch the repo, we will not see the warning because we
|
| 573 | 573 |
# are still pointing to a ref which predates the submodules
|
| 574 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 574 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 575 | 575 |
result.assert_success()
|
| 576 | 576 |
assert "git:unlisted-submodule" not in result.stderr
|
| 577 | 577 |
|
| 578 | 578 |
# We won't get a warning/error when tracking either, the source
|
| 579 | 579 |
# has not become Consistency.CACHED so the opportunity to check
|
| 580 | 580 |
# for the warning has not yet arisen.
|
| 581 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 581 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 582 | 582 |
result.assert_success()
|
| 583 | 583 |
assert "git:unlisted-submodule" not in result.stderr
|
| 584 | 584 |
|
| 585 | 585 |
# Fetching the repo at the new ref will finally reveal the warning
|
| 586 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 586 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 587 | 587 |
if fail == 'error':
|
| 588 | 588 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 589 | 589 |
result.assert_task_error(ErrorDomain.PLUGIN, 'git:unlisted-submodule')
|
| ... | ... | @@ -642,7 +642,7 @@ def test_invalid_submodule(cli, tmpdir, datafiles, fail): |
| 642 | 642 |
|
| 643 | 643 |
# We will notice this directly in fetch, as it will try to fetch
|
| 644 | 644 |
# the submodules it discovers as a result of fetching the primary repo.
|
| 645 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 645 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 646 | 646 |
|
| 647 | 647 |
# Assert a warning or an error depending on what we're checking
|
| 648 | 648 |
if fail == 'error':
|
| ... | ... | @@ -706,7 +706,7 @@ def test_track_invalid_submodule(cli, tmpdir, datafiles, fail): |
| 706 | 706 |
|
| 707 | 707 |
# Fetch the repo, we will not see the warning because we
|
| 708 | 708 |
# are still pointing to a ref which predates the submodules
|
| 709 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 709 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 710 | 710 |
result.assert_success()
|
| 711 | 711 |
assert "git:invalid-submodule" not in result.stderr
|
| 712 | 712 |
|
| ... | ... | @@ -715,7 +715,7 @@ def test_track_invalid_submodule(cli, tmpdir, datafiles, fail): |
| 715 | 715 |
# not locally cached, the Source will be CACHED directly after
|
| 716 | 716 |
# tracking and the validations will occur as a result.
|
| 717 | 717 |
#
|
| 718 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 718 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 719 | 719 |
if fail == 'error':
|
| 720 | 720 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 721 | 721 |
result.assert_task_error(ErrorDomain.PLUGIN, 'git:invalid-submodule')
|
| ... | ... | @@ -751,7 +751,7 @@ def test_track_fetch(cli, tmpdir, datafiles, ref_format, tag, extra_commit): |
| 751 | 751 |
_yaml.dump(element, element_path)
|
| 752 | 752 |
|
| 753 | 753 |
# Track it
|
| 754 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 754 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 755 | 755 |
result.assert_success()
|
| 756 | 756 |
|
| 757 | 757 |
element = _yaml.load(element_path)
|
| ... | ... | @@ -767,7 +767,7 @@ def test_track_fetch(cli, tmpdir, datafiles, ref_format, tag, extra_commit): |
| 767 | 767 |
assert len(new_ref) == 40
|
| 768 | 768 |
|
| 769 | 769 |
# Fetch it
|
| 770 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 770 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 771 | 771 |
result.assert_success()
|
| 772 | 772 |
|
| 773 | 773 |
|
| ... | ... | @@ -835,10 +835,10 @@ def test_git_describe(cli, tmpdir, datafiles, ref_storage, tag_type): |
| 835 | 835 |
_yaml.dump(element, element_path)
|
| 836 | 836 |
|
| 837 | 837 |
if ref_storage == 'inline':
|
| 838 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 838 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 839 | 839 |
result.assert_success()
|
| 840 | 840 |
else:
|
| 841 |
- result = cli.run(project=project, args=['track', 'target.bst', '--deps', 'all'])
|
|
| 841 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst', '--deps', 'all'])
|
|
| 842 | 842 |
result.assert_success()
|
| 843 | 843 |
|
| 844 | 844 |
if ref_storage == 'inline':
|
| ... | ... | @@ -916,7 +916,7 @@ def test_default_do_not_track_tags(cli, tmpdir, datafiles): |
| 916 | 916 |
element_path = os.path.join(project, 'target.bst')
|
| 917 | 917 |
_yaml.dump(element, element_path)
|
| 918 | 918 |
|
| 919 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 919 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 920 | 920 |
result.assert_success()
|
| 921 | 921 |
|
| 922 | 922 |
element = _yaml.load(element_path)
|
| ... | ... | @@ -19,13 +19,13 @@ def test_custom_transform_source(cli, tmpdir, datafiles): |
| 19 | 19 |
|
| 20 | 20 |
# Ensure we can track
|
| 21 | 21 |
result = cli.run(project=project, args=[
|
| 22 |
- 'track', 'target.bst'
|
|
| 22 |
+ 'source', 'track', 'target.bst'
|
|
| 23 | 23 |
])
|
| 24 | 24 |
result.assert_success()
|
| 25 | 25 |
|
| 26 | 26 |
# Ensure we can fetch
|
| 27 | 27 |
result = cli.run(project=project, args=[
|
| 28 |
- 'fetch', 'target.bst'
|
|
| 28 |
+ 'source', 'fetch', 'target.bst'
|
|
| 29 | 29 |
])
|
| 30 | 30 |
result.assert_success()
|
| 31 | 31 |
|
| ... | ... | @@ -50,7 +50,7 @@ def test_missing_file(cli, tmpdir, datafiles): |
| 50 | 50 |
|
| 51 | 51 |
# Try to fetch it
|
| 52 | 52 |
result = cli.run(project=project, args=[
|
| 53 |
- 'fetch', 'target.bst'
|
|
| 53 |
+ 'source', 'fetch', 'target.bst'
|
|
| 54 | 54 |
])
|
| 55 | 55 |
|
| 56 | 56 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| ... | ... | @@ -64,7 +64,7 @@ def test_path_in_filename(cli, tmpdir, datafiles): |
| 64 | 64 |
|
| 65 | 65 |
# Try to fetch it
|
| 66 | 66 |
result = cli.run(project=project, args=[
|
| 67 |
- 'fetch', 'target.bst'
|
|
| 67 |
+ 'source', 'fetch', 'target.bst'
|
|
| 68 | 68 |
])
|
| 69 | 69 |
|
| 70 | 70 |
# The bst file has a / in the filename param
|
| ... | ... | @@ -79,7 +79,7 @@ def test_simple_file_build(cli, tmpdir, datafiles): |
| 79 | 79 |
|
| 80 | 80 |
# Try to fetch it
|
| 81 | 81 |
result = cli.run(project=project, args=[
|
| 82 |
- 'fetch', 'target.bst'
|
|
| 82 |
+ 'source', 'fetch', 'target.bst'
|
|
| 83 | 83 |
])
|
| 84 | 84 |
result.assert_success()
|
| 85 | 85 |
|
| ... | ... | @@ -112,7 +112,7 @@ def test_simple_file_custom_name_build(cli, tmpdir, datafiles): |
| 112 | 112 |
|
| 113 | 113 |
# Try to fetch it
|
| 114 | 114 |
result = cli.run(project=project, args=[
|
| 115 |
- 'fetch', 'target.bst'
|
|
| 115 |
+ 'source', 'fetch', 'target.bst'
|
|
| 116 | 116 |
])
|
| 117 | 117 |
result.assert_success()
|
| 118 | 118 |
|
| ... | ... | @@ -141,7 +141,7 @@ def test_unique_key(cli, tmpdir, datafiles): |
| 141 | 141 |
assert cli.get_element_state(project, 'target-custom-executable.bst') == "fetch needed"
|
| 142 | 142 |
# Try to fetch it
|
| 143 | 143 |
result = cli.run(project=project, args=[
|
| 144 |
- 'fetch', 'target.bst'
|
|
| 144 |
+ 'source', 'fetch', 'target.bst'
|
|
| 145 | 145 |
])
|
| 146 | 146 |
|
| 147 | 147 |
# We should download the file only once
|
| ... | ... | @@ -198,7 +198,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir): |
| 198 | 198 |
|
| 199 | 199 |
server.start()
|
| 200 | 200 |
|
| 201 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 201 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 202 | 202 |
result.assert_success()
|
| 203 | 203 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 204 | 204 |
result.assert_success()
|
| ... | ... | @@ -77,7 +77,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles): |
| 77 | 77 |
|
| 78 | 78 |
# Try to fetch it
|
| 79 | 79 |
result = cli.run(project=project, args=[
|
| 80 |
- 'fetch', 'target.bst'
|
|
| 80 |
+ 'source', 'fetch', 'target.bst'
|
|
| 81 | 81 |
])
|
| 82 | 82 |
assert "FAILURE Try #" in result.stderr
|
| 83 | 83 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| ... | ... | @@ -96,7 +96,7 @@ def test_fetch_bad_ref(cli, tmpdir, datafiles): |
| 96 | 96 |
|
| 97 | 97 |
# Try to fetch it
|
| 98 | 98 |
result = cli.run(project=project, args=[
|
| 99 |
- 'fetch', 'target.bst'
|
|
| 99 |
+ 'source', 'fetch', 'target.bst'
|
|
| 100 | 100 |
])
|
| 101 | 101 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 102 | 102 |
result.assert_task_error(ErrorDomain.SOURCE, None)
|
| ... | ... | @@ -114,7 +114,7 @@ def test_track_warning(cli, tmpdir, datafiles): |
| 114 | 114 |
|
| 115 | 115 |
# Track it
|
| 116 | 116 |
result = cli.run(project=project, args=[
|
| 117 |
- 'track', 'target.bst'
|
|
| 117 |
+ 'source', 'track', 'target.bst'
|
|
| 118 | 118 |
])
|
| 119 | 119 |
result.assert_success()
|
| 120 | 120 |
assert "Potential man-in-the-middle attack!" in result.stderr
|
| ... | ... | @@ -133,9 +133,9 @@ def test_stage_default_basedir(cli, tmpdir, datafiles, srcdir): |
| 133 | 133 |
_assemble_tar(os.path.join(str(datafiles), "content"), srcdir, src_tar)
|
| 134 | 134 |
|
| 135 | 135 |
# Track, fetch, build, checkout
|
| 136 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 136 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 137 | 137 |
result.assert_success()
|
| 138 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 138 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 139 | 139 |
result.assert_success()
|
| 140 | 140 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 141 | 141 |
result.assert_success()
|
| ... | ... | @@ -162,9 +162,9 @@ def test_stage_no_basedir(cli, tmpdir, datafiles, srcdir): |
| 162 | 162 |
_assemble_tar(os.path.join(str(datafiles), "content"), srcdir, src_tar)
|
| 163 | 163 |
|
| 164 | 164 |
# Track, fetch, build, checkout
|
| 165 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 165 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 166 | 166 |
result.assert_success()
|
| 167 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 167 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 168 | 168 |
result.assert_success()
|
| 169 | 169 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 170 | 170 |
result.assert_success()
|
| ... | ... | @@ -191,9 +191,9 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles, srcdir): |
| 191 | 191 |
_assemble_tar(os.path.join(str(datafiles), "content"), srcdir, src_tar)
|
| 192 | 192 |
|
| 193 | 193 |
# Track, fetch, build, checkout
|
| 194 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 194 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 195 | 195 |
result.assert_success()
|
| 196 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 196 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 197 | 197 |
result.assert_success()
|
| 198 | 198 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 199 | 199 |
result.assert_success()
|
| ... | ... | @@ -227,9 +227,9 @@ def test_stage_contains_links(cli, tmpdir, datafiles): |
| 227 | 227 |
_assemble_tar(os.path.join(str(datafiles), "content"), "base-directory", src_tar)
|
| 228 | 228 |
|
| 229 | 229 |
# Track, fetch, build, checkout
|
| 230 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 230 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 231 | 231 |
result.assert_success()
|
| 232 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 232 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 233 | 233 |
result.assert_success()
|
| 234 | 234 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 235 | 235 |
result.assert_success()
|
| ... | ... | @@ -256,9 +256,9 @@ def test_stage_default_basedir_lzip(cli, tmpdir, datafiles, srcdir): |
| 256 | 256 |
_assemble_tar_lz(os.path.join(str(datafiles), "content"), srcdir, src_tar)
|
| 257 | 257 |
|
| 258 | 258 |
# Track, fetch, build, checkout
|
| 259 |
- result = cli.run(project=project, args=['track', 'target-lz.bst'])
|
|
| 259 |
+ result = cli.run(project=project, args=['source', 'track', 'target-lz.bst'])
|
|
| 260 | 260 |
result.assert_success()
|
| 261 |
- result = cli.run(project=project, args=['fetch', 'target-lz.bst'])
|
|
| 261 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target-lz.bst'])
|
|
| 262 | 262 |
result.assert_success()
|
| 263 | 263 |
result = cli.run(project=project, args=['build', 'target-lz.bst'])
|
| 264 | 264 |
result.assert_success()
|
| ... | ... | @@ -297,9 +297,9 @@ def test_read_only_dir(cli, tmpdir, datafiles): |
| 297 | 297 |
env = {"TMP": tmpdir_str}
|
| 298 | 298 |
|
| 299 | 299 |
# Track, fetch, build, checkout
|
| 300 |
- result = cli.run(project=project, args=['track', 'target.bst'], env=env)
|
|
| 300 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'], env=env)
|
|
| 301 | 301 |
result.assert_success()
|
| 302 |
- result = cli.run(project=project, args=['fetch', 'target.bst'], env=env)
|
|
| 302 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'], env=env)
|
|
| 303 | 303 |
result.assert_success()
|
| 304 | 304 |
result = cli.run(project=project, args=['build', 'target.bst'], env=env)
|
| 305 | 305 |
result.assert_success()
|
| ... | ... | @@ -342,9 +342,9 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir): |
| 342 | 342 |
|
| 343 | 343 |
server.start()
|
| 344 | 344 |
|
| 345 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 345 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 346 | 346 |
result.assert_success()
|
| 347 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 347 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 348 | 348 |
result.assert_success()
|
| 349 | 349 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 350 | 350 |
result.assert_success()
|
| ... | ... | @@ -385,6 +385,6 @@ def test_netrc_already_specified_user(cli, datafiles, server_type, tmpdir): |
| 385 | 385 |
|
| 386 | 386 |
server.start()
|
| 387 | 387 |
|
| 388 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 388 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 389 | 389 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 390 | 390 |
result.assert_task_error(ErrorDomain.SOURCE, None)
|
| ... | ... | @@ -62,7 +62,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles): |
| 62 | 62 |
|
| 63 | 63 |
# Try to fetch it
|
| 64 | 64 |
result = cli.run(project=project, args=[
|
| 65 |
- 'fetch', 'target.bst'
|
|
| 65 |
+ 'source', 'fetch', 'target.bst'
|
|
| 66 | 66 |
])
|
| 67 | 67 |
assert "FAILURE Try #" in result.stderr
|
| 68 | 68 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| ... | ... | @@ -81,7 +81,7 @@ def test_fetch_bad_ref(cli, tmpdir, datafiles): |
| 81 | 81 |
|
| 82 | 82 |
# Try to fetch it
|
| 83 | 83 |
result = cli.run(project=project, args=[
|
| 84 |
- 'fetch', 'target.bst'
|
|
| 84 |
+ 'source', 'fetch', 'target.bst'
|
|
| 85 | 85 |
])
|
| 86 | 86 |
result.assert_main_error(ErrorDomain.STREAM, None)
|
| 87 | 87 |
result.assert_task_error(ErrorDomain.SOURCE, None)
|
| ... | ... | @@ -99,7 +99,7 @@ def test_track_warning(cli, tmpdir, datafiles): |
| 99 | 99 |
|
| 100 | 100 |
# Track it
|
| 101 | 101 |
result = cli.run(project=project, args=[
|
| 102 |
- 'track', 'target.bst'
|
|
| 102 |
+ 'source', 'track', 'target.bst'
|
|
| 103 | 103 |
])
|
| 104 | 104 |
result.assert_success()
|
| 105 | 105 |
assert "Potential man-in-the-middle attack!" in result.stderr
|
| ... | ... | @@ -117,9 +117,9 @@ def test_stage_default_basedir(cli, tmpdir, datafiles): |
| 117 | 117 |
_assemble_zip(os.path.join(str(datafiles), "content"), src_zip)
|
| 118 | 118 |
|
| 119 | 119 |
# Track, fetch, build, checkout
|
| 120 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 120 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 121 | 121 |
result.assert_success()
|
| 122 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 122 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 123 | 123 |
result.assert_success()
|
| 124 | 124 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 125 | 125 |
result.assert_success()
|
| ... | ... | @@ -145,9 +145,9 @@ def test_stage_no_basedir(cli, tmpdir, datafiles): |
| 145 | 145 |
_assemble_zip(os.path.join(str(datafiles), "content"), src_zip)
|
| 146 | 146 |
|
| 147 | 147 |
# Track, fetch, build, checkout
|
| 148 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 148 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 149 | 149 |
result.assert_success()
|
| 150 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 150 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 151 | 151 |
result.assert_success()
|
| 152 | 152 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 153 | 153 |
result.assert_success()
|
| ... | ... | @@ -173,9 +173,9 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles): |
| 173 | 173 |
_assemble_zip(os.path.join(str(datafiles), "content"), src_zip)
|
| 174 | 174 |
|
| 175 | 175 |
# Track, fetch, build, checkout
|
| 176 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 176 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 177 | 177 |
result.assert_success()
|
| 178 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 178 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 179 | 179 |
result.assert_success()
|
| 180 | 180 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 181 | 181 |
result.assert_success()
|
| ... | ... | @@ -215,9 +215,9 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir): |
| 215 | 215 |
|
| 216 | 216 |
server.start()
|
| 217 | 217 |
|
| 218 |
- result = cli.run(project=project, args=['track', 'target.bst'])
|
|
| 218 |
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
|
|
| 219 | 219 |
result.assert_success()
|
| 220 |
- result = cli.run(project=project, args=['fetch', 'target.bst'])
|
|
| 220 |
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
|
|
| 221 | 221 |
result.assert_success()
|
| 222 | 222 |
result = cli.run(project=project, args=['build', 'target.bst'])
|
| 223 | 223 |
result.assert_success()
|
