【发布时间】:2021-04-25 06:11:43
【问题描述】:
我有一个由多个子项目构成的项目。作为该项目的一部分,我有一些在快照 UI 测试失败时生成的失败差异。
当前已添加到原始快照旁边的文件夹中。
我希望能够运行测试套件并将任何故障快照复制到一个位置 - 这将在 CI 期间发生,并使我能够将它们存储为工件。
结构有点像;
Project/
Framework A/
snapshots/
failures/
failure_a_img_1.png
failure_a_img_2.png
Framework B/
snapshots/
failures/
failure_b_img_1.png
failure_b_img_2.png
failure_b_img_3.png
.........
Framework Z/
snapshots/
failures/
failure_z_img_1.png
failure_z_img_2.png
我基本上希望能够搜索整个 Project 文件夹并复制与 snapshots/failures 匹配的文件夹组内的任何文件
如果我在终端中运行echo **/*snapshots/failures/*,我会看到所有文件/位置。
我尝试使用
find . -iname "**/*snapshots/failures/*.png" -type f -exec cp {} ~/desktop \;
但没有输出/没有复制任何内容。
如有任何帮助,我将不胜感激。
【问题讨论】: