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

Fix broken automated tests by syncing with exif-samples #202

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Test

on:
- push
- pull_request

jobs:
Expand Down Expand Up @@ -46,9 +47,8 @@ jobs:

- name: Run in debug and color mode
run: |
find exif-samples-master -name *.tiff -o -name *.jpg -o -name *.heif | xargs EXIF.py -dc
make run

- name: Compare image processing output
run: |
find exif-samples-master -name *.tiff -o -name *.jpg -o -name *.heif | sort -f | xargs EXIF.py > exif-samples-master/dump_test
diff -Z --side-by-side --suppress-common-lines exif-samples-master/dump exif-samples-master/dump_test
make compare
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ else
PIP_INSTALL := $(PIP_BIN) install --progress-bar=off
endif

# Find images, support multiple case insensitive extensions and file names with spaces, consistently sort files
FIND_IMAGES := find exif-samples-master -regextype posix-egrep -iregex ".*\.(bmp|gif|heic|heif|jpg|jpeg|png|tiff|webp)" -print0 | LC_COLLATE=C sort -fz | xargs -0

.PHONY: help
all: help

Expand All @@ -41,6 +44,13 @@ samples-download: ## Install sample files used for testing.
wget https://github.com/ianare/exif-samples/archive/master.tar.gz
tar -xzf master.tar.gz

run: ## Run EXIF.py on sample images
$(FIND_IMAGES) EXIF.py -dc

compare: ## Run and compare exif dump
$(FIND_IMAGES) EXIF.py > exif-samples-master/dump_test
diff -Zu --color --suppress-common-lines exif-samples-master/dump exif-samples-master/dump_test

build: ## build distribution
rm -fr ./dist
$(PYTHON_BIN) setup.py sdist bdist_wheel
Expand All @@ -53,4 +63,4 @@ help: Makefile
@echo "Choose a command to run:"
@echo
@grep --no-filename -E '^[a-zA-Z_%-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}'
@echo
@echo
Loading