Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed the overdeletion of source images for failing tests#30284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ayshih wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromayshih:image_cleanup_fixed
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 22 additions & 27 deletions.github/workflows/tests.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -344,34 +344,29 @@ jobs:
- name: Cleanup non-failed image files
if: failure()
run: |
function remove_files() {
local extension=$1
find ./result_images -name "*-expected*.$extension" | while read file; do
if [[ $file == *"-expected_pdf"* ]]; then
base=${file%-expected_pdf.$extension}_pdf
elif [[ $file == *"-expected_eps"* ]]; then
base=${file%-expected_eps.$extension}_eps
elif [[ $file == *"-expected_svg"* ]]; then
base=${file%-expected_svg.$extension}_svg
elif [[ $file == *"-expected_gif"* ]]; then
base=${file%-expected_gif.$extension}_gif
else
base=${file%-expected.$extension}
fi
if [[ ! -e "${base}-failed-diff.$extension" ]]; then
if [[ -e "$file" ]]; then
rm "$file"
echo "Removed $file"
fi
if [[ -e "${base}.$extension" ]]; then
rm "${base}.$extension"
echo " Removed ${base}.$extension"
fi
fi
find ./result_images -name "*-expected*.png" | while read file; do
if [[ $file == *-expected_???.png ]]; then
extension=${file: -7:3}
base=${file%*-expected_$extension.png}_$extension
else
extension="png"
base=${file%-expected.png}
fi
if [[ ! -e ${base}-failed-diff.png ]]; then
indent=""
list=($file $base.png)
if [[ $extension != "png" ]]; then
list+=(${base%_$extension}-expected.$extension ${base%_$extension}.$extension)
fi
for to_remove in "${list[@]}"; do
if [[ -e $to_remove ]]; then
rm $to_remove
echo "${indent}Removed $to_remove"
fi
indent+=" "
done
}

remove_files "png"; remove_files "svg"; remove_files "pdf"; remove_files "eps"; remove_files "gif";
fi
done

if [ "$(find ./result_images -mindepth 1 -type d)" ]; then
find ./result_images/* -type d -empty -delete
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp