Skip to content

Commit

Permalink
issue found with file-tga/file-tga - reported upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
JoesCat committed Jul 22, 2024
1 parent 2e21946 commit 6dfc4b8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 69 deletions.
75 changes: 11 additions & 64 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: CI
on: [push,pull_request]

jobs:
linux:
test-bmp-tga:
runs-on: ubuntu-latest
strategy:
matrix:
choiceL: [--disable-silent-rules, --enable-silent-rules, --enable-debugtime]
steps:
- uses: actions/checkout@v3
- name: Create configure
Expand All @@ -16,66 +13,16 @@ jobs:
autoreconf -i
automake
- name: Choose configure
run: ./configure ${{ matrix.choiceL }}
- name: Make gimp-plugin-fix-ca
run: ./configure --enable-debugtime
- name: Do a make
run: make
- name: Test make strip
if: matrix.choiceL == '--disable-silent-rules'
run: make strip
- name: Do a make check
if: matrix.choiceL == '--enable-silent-rules'
run: make check
- name: Test user-level install/uninstall
if: matrix.choiceL == '--disable-silent-rules'
- name: Run bmp test1
run: |
make install-user
make uninstall-user
- name: Test make install GIMP shared plugin
if: matrix.choiceL == '--disable-silent-rules'
cd tests
./test1.sh
cd ..
- name: Run tga test2
run: |
sudo make install
sudo make uninstall
- name: Test make distcheck
if: matrix.choiceL == '--disable-silent-rules'
run: make distcheck
win:
runs-on: windows-latest
strategy:
matrix:
include: [
{msystem: MINGW32, toolchain: mingw-w64-i686, version: x32 },
{msystem: MINGW64, toolchain: mingw-w64-x86_64, version: x64 },
{msystem: UCRT64, toolchain: mingw-w64-ucrt-x86_64, version: x64 },
{msystem: CLANG64, toolchain: mingw-w64-clang-x86_64, version: x64 },
]
name: ${{ matrix.msystem }}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: autotools base-devel git ${{ matrix.toolchain }}-toolchain ${{ matrix.toolchain }}-gimp
- name: Create configure
run: |
autoreconf -i
automake
- name: run ./configure
run: ./configure
- name: Make gimp-plugin-fix-ca
run: make
local:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create configure
run: |
sudo apt-get update -y
sudo apt-get install autoconf automake libtool gcc libgimp2.0-dev
- name: Make local gimp-fix-ca install
run: gimptool-2.0 --install fix-ca.c
- name: Uninstall local gimp-fix-ca
run: gimptool-2.0 --uninstall-bin fix-ca
cd tests
./test2.sh
cd ..
19 changes: 14 additions & 5 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AM_CFLAGS = ${CFLAGS} ${CPPFLAGS} ${GIMP_CFLAGS} ${GTK_CFLAGS} ${WCFLAGS} ${FCA_

AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} ${GIMP_CFLAGS} -I${includedir}

EXTRA_DIST = test-fix-ca.c test-fix-ca.scm test1.md5
EXTRA_DIST = test-fix-ca.c test-fix-ca.scm test1.md5 test2.md5

noinst_PROGRAMS = test-fix-ca
test_fix_ca_name = test-fix-ca
Expand All @@ -12,21 +12,30 @@ test_fix_ca_LDADD = ${LIBS} ${GIMP_LIBS} ${GTK_LIBS} ${WSLIB} ${FCA_LIB}

update-tests:
echo "#!/bin/sh" > ${builddir}/test1.sh; \
echo "rm -f ${builddir}/test1.tga" >> ${builddir}/test1.sh; \
echo "rm -f ${builddir}/test1.bmp" >> ${builddir}/test1.sh; \
echo "${GIMPTOOL} --install-script ${srcdir}/test-fix-ca.scm" >> ${builddir}/test1.sh; \
echo "${GIMPTOOL} --install-bin ${builddir}/test-fix-ca" >> ${builddir}/test1.sh; \
echo "gimp --verbose --console-messages -i -b '(test \"${top_srcdir}/img-fix-ca/full-branches.jpg\" \"${builddir}/test1.bmp\" 6.0 -2.4 658 1280 1 0.0 0.0 0.0 0.0)' -b '(gimp-quit 0)'" >> ${builddir}/test1.sh; \
echo "${GIMPTOOL} --uninstall-bin test-fix-ca" >> ${builddir}/test1.sh; \
echo "${GIMPTOOL} --uninstall-script test-fix-ca.scm" >> ${builddir}/test1.sh; \
echo "${MD5SUM} -c ${top_srcdir}/tests/test1.md5" >> ${builddir}/test1.sh; \
${CHMOD} +x ${builddir}/test1.sh
${CHMOD} +x ${builddir}/test1.sh; \
echo "#!/bin/sh" > ${builddir}/test2.sh; \
echo "rm -f ${builddir}/test2.tga" >> ${builddir}/test2.sh; \
echo "${GIMPTOOL} --install-script ${srcdir}/test-fix-ca.scm" >> ${builddir}/test2.sh; \
echo "${GIMPTOOL} --install-bin ${builddir}/test-fix-ca" >> ${builddir}/test1.sh; \
echo "gimp --verbose --console-messages -i -b '(test \"${top_srcdir}/img-fix-ca/full-branches.jpg\" \"${builddir}/test2.tga\" 6.0 -2.4 658 1280 1 0.0 0.0 0.0 0.0)' -b '(gimp-quit 0)'" >> ${builddir}/test2.sh; \
echo "${GIMPTOOL} --uninstall-bin test-fix-ca" >> ${builddir}/test2.sh; \
echo "${GIMPTOOL} --uninstall-script test-fix-ca.scm" >> ${builddir}/test2.sh; \
echo "${MD5SUM} -c ${top_srcdir}/tests/test2.md5" >> ${builddir}/test2.sh; \
${CHMOD} +x ${builddir}/test2.sh

TESTS = ${builddir}/test1.sh
TESTS = ${builddir}/test1.sh ${builddir}/test2.sh

test1.sh:
make update-tests

clean-local:
rm -f ${builddir}/test?.sh ${builddir}/test?.bmp
rm -f ${builddir}/test?.sh ${builddir}/test?.bmp ${builddir}/test?.tga

.PHONY: update-tests
1 change: 1 addition & 0 deletions tests/test2.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7e59db2f8eeafbc0a37d5fddde45c14c test2.tga

0 comments on commit 6dfc4b8

Please sign in to comment.