Unexpected behavior of file patterns in package spec

I’ve noticed that file name patterns in package.xml work a bit unexpected.

If I do something like this:

<Files>
    <File Path="Packages/My Plugin Name/my_folder/" SourcePath="my_folder/*.TapPlan" />
</Files>

… it will successfully pick up all test plans from my_folder but place them to %TAP_PATH%\my_folder and not %TAP_PATH%\Packages\My Plugin Name\my_folder.

This doesn’t happen if I use specific names instead of name patterns, e.g.:

<Files>
    <File Path="Packages/My Plugin Name/my_folder/My.TapPlan" SourcePath="my_folder/My.TapPlan" />
</Files>

Am I missing something?

2 Likes

Hi @tatiana.boye

I looked into the source code and it looks like OpenTAP isn’t even trying to support this use case. When adding files with glob expressions, the destination path is always set to the source path, and the destination path is ignored.

I think what you are trying to do makes sense though, so I would encourage you to make a feature request by submitting an issue on GitHub!

2 Likes

@alexander.larsen Thanks, issue submitted!

2 Likes