Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace SVN with Git for installing extra test images #6918

Merged
merged 13 commits into from
Feb 10, 2023
4 changes: 3 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ environment:
install:
- '%PYTHON%\%EXECUTABLE% --version'
- curl -fsSL -o pillow-depends.zip https://github.com/python-pillow/pillow-depends/archive/main.zip
- curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip
- 7z x pillow-depends.zip -oc:\
- 7z x pillow-test-images.zip -oc:\
- mv c:\pillow-depends-main c:\pillow-depends
- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images
- xcopy /S /Y c:\test-images-main\* c:\pillow\tests\images
- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\
- ..\pillow-depends\gs1000w32.exe /S
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs10.0.0\bin;%PATH%
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
python3${{ matrix.python-minor-version }}-sip
python3${{ matrix.python-minor-version }}-tkinter
qt5-devel-tools
subversion
wget
xorg-server-extra
zlib-devel
hugovk marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ jobs:
${{ matrix.package }}-python3-numpy \
${{ matrix.package }}-python3-olefile \
${{ matrix.package }}-python3-pip \
${{ matrix.package }}-python3-setuptools \
subversion
${{ matrix.package }}-python3-setuptools

if [ ${{ matrix.package }} == "mingw-w64-x86_64" ]; then
pacman -S --noconfirm \
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
repository: python-pillow/pillow-depends
path: winbuild\depends

- name: Checkout extra test images
uses: actions/checkout@v3
with:
repository: python-pillow/test-images
path: Tests\test-images

# sets env: pythonLocation
- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -62,7 +68,8 @@ jobs:
winbuild\depends\gs1000w32.exe /S
echo "C:\Program Files (x86)\gs\gs10.0.0\bin" >> $env:GITHUB_PATH

xcopy /S /Y winbuild\depends\test_images\* Tests\images\
# Install extra test images
xcopy /S /Y Tests\test-images\* Tests\images

# make cache key depend on VS version
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" `
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ docs/_build/
# JetBrains
.idea

# Extra test images installed from pillow-depends/test_images
# Extra test images installed from python-pillow/test-images
Tests/images/README.md
Tests/images/crash_1.tif
Tests/images/crash_2.tif
Expand Down
2 changes: 1 addition & 1 deletion depends/download-and-extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ if [ ! -f $archive.tar.gz ]; then
wget -O $archive.tar.gz $url
fi

rm -r $archive
rmdir $archive
tar -xvzf $archive.tar.gz
23 changes: 10 additions & 13 deletions depends/install_extra_test_images.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash
hugovk marked this conversation as resolved.
Show resolved Hide resolved
# install extra test images

# Use SVN to just fetch a single Git subdirectory
svn_export()
{
if [ ! -z $1 ]; then
echo ""
echo "Retrying svn export..."
echo ""
fi

svn export --force https://github.com/python-pillow/pillow-depends/trunk/test_images ../Tests/images
}
svn_export || svn_export retry || svn_export retry || svn_export retry
archive=test-images-main

./download-and-extract.sh $archive https://github.com/python-pillow/test-images/archive/main.tar.gz

mv $archive/* ../Tests/images/

# Cleanup old tarball and empty directory
rm $archive.tar.gz
rmdir $archive