Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • willsalmon/buildstream
  • CumHoleZH/buildstream
  • tchaik/buildstream
  • DCotyPortfolio/buildstream
  • jesusoctavioas/buildstream
  • patrickmmartin/buildstream
  • franred/buildstream
  • tintou/buildstream
  • alatiera/buildstream
  • martinblanchard/buildstream
  • neverdie22042524/buildstream
  • Mattlk13/buildstream
  • PServers/buildstream
  • phamnghia610909/buildstream
  • chiaratolentino/buildstream
  • eysz7-x-x/buildstream
  • kerrick1/buildstream
  • matthew-yates/buildstream
  • twofeathers/buildstream
  • mhadjimichael/buildstream
  • pointswaves/buildstream
  • Mr.JackWilson/buildstream
  • Tw3akG33k/buildstream
  • AlexFazakas/buildstream
  • eruidfkiy/buildstream
  • clamotion2/buildstream
  • nanonyme/buildstream
  • wickyjaaa/buildstream
  • nmanchev/buildstream
  • bojorquez.ja/buildstream
  • mostynb/buildstream
  • highpit74/buildstream
  • Demo112/buildstream
  • ba2014sheer/buildstream
  • tonimadrino/buildstream
  • usuario2o/buildstream
  • Angelika123456/buildstream
  • neo355/buildstream
  • corentin-ferlay/buildstream
  • coldtom/buildstream
  • wifitvbox81/buildstream
  • 358253885/buildstream
  • seanborg/buildstream
  • SotK/buildstream
  • DouglasWinship/buildstream
  • karansthr97/buildstream
  • louib/buildstream
  • bwh-ct/buildstream
  • robjh/buildstream
  • we88c0de/buildstream
  • zhengxian5555/buildstream
51 results
Show changes
Commits on Source (2)
......@@ -166,6 +166,19 @@ original_main = click.BaseCommand.main
click.BaseCommand.main = override_main
def get_files(directory):
output = tuple()
directory = os.path.abspath(directory)
for root, _, files in os.walk(directory):
for file in files:
if file.endswith(".bst"):
relDir = os.path.relpath(root, directory)
relFile = os.path.join(relDir, file).strip("./")
relFile = relFile.replace('elements/', '')
output = output + (relFile,)
return output
##################################################################
# Main Options #
##################################################################
......@@ -489,6 +502,8 @@ def push(app, elements, deps, remote):
@click.option('--deps', '-d', default='all',
type=click.Choice(['none', 'plan', 'run', 'build', 'all']),
help='The dependencies to show (default: all)')
@click.option('--all', 'all_', default=False, is_flag=True,
help="Validate all files in project")
@click.option('--order', default="stage",
type=click.Choice(['stage', 'alpha']),
help='Staging or alphabetic ordering of dependencies')
......@@ -498,7 +513,7 @@ def push(app, elements, deps, remote):
@click.argument('elements', nargs=-1,
type=click.Path(readable=False))
@click.pass_obj
def show(app, elements, deps, except_, order, format_):
def show(app, elements, deps, except_, order, format_, all_):
"""Show elements in the pipeline
By default this will show all of the dependencies of the
......@@ -545,6 +560,13 @@ def show(app, elements, deps, except_, order, format_):
bst show target.bst --format \\
$'---------- %{name} ----------\\n%{vars}'
"""
if all_ and elements:
click.echo("ERROR: You can not use --all if you have defined an element", err=True)
sys.exit(-1)
if all_:
elements = get_files(app._main_options.get("directory"))
with app.initialized():
dependencies = app.stream.load_selection(elements,
selection=deps,
......
kind: compose
depends:
- fileNAME: import-dev.bst
type: build
config:
# Dont try running the sandbox, we dont have a
# runtime to run anything in this context.
integrate: False
kind: import
sources:
- kind: local
path: files/dev-files
kind: stack
description: |
Main stack target for the bst build test
depends:
- compose-all.bst
#ifndef __PONY_H__
#define __PONY_H__
#define PONY_BEGIN "Once upon a time, there was a pony."
#define PONY_END "And they lived happily ever after, the end."
#define MAKE_PONY(story) \
PONY_BEGIN \
story \
PONY_END
#endif /* __PONY_H__ */
# Project config for frontend build test
name: test
element-path: elements
......@@ -46,6 +46,17 @@ def test_show_invalid_element_path(cli, datafiles):
'show',
"foo.bst"])
@pytest.mark.datafiles(DATA_DIR + "_fail")
def test_show_fail(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
prev_dir = os.getcwd()
os.chdir(project)
result = cli.run(project=project, silent=True, args=[
'show',
'--all'])
os.chdir(prev_dir)
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
......