wsalmonct opened a new issue, #2151:
URL: https://github.com/apache/buildstream/issues/2151

   I'm trying to work out good ways to add some tests to a bst project
   
   I thought about using some of the software inside a shell, this works for 
basic `command --help` tests.
   
   ```
   toolchain-2026-06-03 src # bst shell components/python3-mkdocs.bst -- mkdocs 
--help
   [--:--:--][        ][    main:core activity                 ] START   
Loading elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS 
Loading elements
   [--:--:--][        ][    main:core activity                 ] START   
Resolving elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS 
Resolving elements
   [--:--:--][        ][    main:core activity                 ] START   
Initializing remote caches
   [00:00:02][        ][    main:core activity                 ] SUCCESS 
Initializing remote caches
   [--:--:--][        ][    main:core activity                 ] START   Query 
cache
   [00:00:00][        ][    main:core activity                 ] SUCCESS Query 
cache
   [--:--:--][d37eff3b][    main:components/python3-mkdocs.bst ] START   
Staging dependencies
   [00:00:00][d37eff3b][    main:components/python3-mkdocs.bst ] SUCCESS 
Staging dependencies
   [--:--:--][d37eff3b][    main:components/python3-mkdocs.bst ] START   
Integrating sandbox
   [00:00:00][d37eff3b][    main:components/python3-mkdocs.bst ] SUCCESS 
Integrating sandbox
   [--:--:--][d37eff3b][    main:components/python3-mkdocs.bst ] STATUS  
Running command
   
       mkdocs --help
   
   Usage: mkdocs [OPTIONS] COMMAND [ARGS]...
   
     MkDocs - Project documentation with Markdown.
   
   Options:
     -V, --version         Show the version and exit.
     -q, --quiet           Silence warnings
     -v, --verbose         Enable verbose output
     --color / --no-color  Force enable or disable color and wrapping for the 
output. Default is auto-detect.
     -h, --help            Show this message and exit.
   
   Commands:
     build      Build the MkDocs documentation.
     get-deps   Show required PyPI packages inferred from plugins in mkdocs.yml.
     gh-deploy  Deploy your documentation to GitHub Pages.
     new        Create a new MkDocs project.
     serve      Run the builtin development server.
   dcs-toolchain-2026-06-03 src # 
   ```
   
   but when i try to add a example project to use i need to use `--mount` which 
triggers a bug for me
   
   ```
   toolchain-2026-06-03 src # ls /src/tests/
   config.yml  index.md
   
   toolchain-2026-06-03 src # bst shell components/python3-mkdocs.bst --mount 
/src/tests/ -- mkdocs build
   [--:--:--][        ][    main:core activity                 ] START   
Loading elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS 
Loading elements
   [--:--:--][        ][    main:core activity                 ] START   
Resolving elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS 
Resolving elements
   [--:--:--][        ][    main:core activity                 ] START   
Initializing remote caches
   [00:00:02][        ][    main:core activity                 ] SUCCESS 
Initializing remote caches
   [--:--:--][        ][    main:core activity                 ] START   Query 
cache
   [00:00:00][        ][    main:core activity                 ] SUCCESS Query 
cache
   [--:--:--][d37eff3b][    main:components/python3-mkdocs.bst ] START   
Staging dependencies
   [00:00:00][d37eff3b][    main:components/python3-mkdocs.bst ] SUCCESS 
Staging dependencies
   [--:--:--][d37eff3b][    main:components/python3-mkdocs.bst ] START   
Integrating sandbox
   [00:00:00][d37eff3b][    main:components/python3-mkdocs.bst ] SUCCESS 
Integrating sandbox
   [--:--:--][        ][    main:core activity                 ] BUG     The 
directories marked in the sandbox must be absolute paths
   
       Traceback (most recent call last):
         File "/usr/sbin/bst", line 8, in <module>
           sys.exit(cli())
                    ~~~^^
         File "/usr/lib/python3.13/site-packages/click/core.py", line 1442, in 
__call__
           return self.main(*args, **kwargs)
                  ~~~~~~~~~^^^^^^^^^^^^^^^^^
         File "/usr/lib/python3.13/site-packages/buildstream/_frontend/cli.py", 
line 282, in override_main
           original_main(self, args=args, prog_name=prog_name, 
complete_var=None, standalone_mode=standalone_mode, **extra)
           
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         File "/usr/lib/python3.13/site-packages/click/core.py", line 1363, in 
main
           rv = self.invoke(ctx)
         File "/usr/lib/python3.13/site-packages/click/core.py", line 1830, in 
invoke
           return _process_result(sub_ctx.command.invoke(sub_ctx))
                                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
         File "/usr/lib/python3.13/site-packages/click/core.py", line 1226, in 
invoke
           return ctx.invoke(self.callback, **ctx.params)
                  ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         File "/usr/lib/python3.13/site-packages/click/core.py", line 794, in 
invoke
           return callback(*args, **kwargs)
         File "/usr/lib/python3.13/site-packages/click/decorators.py", line 46, 
in new_func
           return f(get_current_context().obj, *args, **kwargs)
         File "/usr/lib/python3.13/site-packages/buildstream/_frontend/cli.py", 
line 774, in shell
           exitcode = app.stream.shell(
               target,
           ...<9 lines>...
               ignore_project_source_remotes=ignore_project_source_remotes,
           )
         File "/usr/lib/python3.13/site-packages/buildstream/_stream.py", line 
360, in shell
           return element._shell(
                  ~~~~~~~~~~~~~~^
               scope, mounts=mounts, isolate=isolate, prompt=prompt(element), 
command=command, usebuildtree=usebuildtree
               
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           )
           ^
         File "/usr/lib/python3.13/site-packages/buildstream/element.py", line 
2099, in _shell
           sandbox.mark_directory(mount.path)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
         File 
"/usr/lib/python3.13/site-packages/buildstream/sandbox/sandbox.py", line 168, 
in mark_directory
           assert directory.startswith("/"), "The directories marked in the 
sandbox must be absolute paths"
                  ~~~~~~~~~~~~~~~~~~~~^^^^^
       AssertionError: The directories marked in the sandbox must be absolute 
paths
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to