From 77d132e1e30804f8b936ffbfe8a1114d79ac01db Mon Sep 17 00:00:00 2001 From: Joe Da Silva Date: Sun, 21 Jul 2024 17:12:52 -0700 Subject: [PATCH] issue found with file-tga/file-tga - reported upstream --- .github/workflows/main.yml | 76 ++++++-------------------------------- tests/Makefile.am | 21 ++++++++--- tests/test2.md5 | 1 + 3 files changed, 28 insertions(+), 70 deletions(-) create mode 100644 tests/test2.md5 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 19ecac5..7dcba35 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -16,66 +13,17 @@ 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 + make update-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 .. diff --git a/tests/Makefile.am b/tests/Makefile.am index 3828f2f..8bfaaab 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 @@ -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 - -TESTS = ${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}/test2.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 ${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 diff --git a/tests/test2.md5 b/tests/test2.md5 new file mode 100644 index 0000000..7db9a5c --- /dev/null +++ b/tests/test2.md5 @@ -0,0 +1 @@ +7e59db2f8eeafbc0a37d5fddde45c14c test2.tga