Browse Source

Applied updates and worked on tests

master
Joachim Metz 9 months ago
parent
commit
acd56fde00
No known key found for this signature in database GPG Key ID: D9625E5D7AD0177E
12 changed files with 55 additions and 67 deletions
  1. +3
    -0
      .travis.yml
  2. +5
    -0
      .travis/before_install.sh
  3. +2
    -0
      .travis/script.sh
  4. +10
    -10
      appveyor.yml
  5. +1
    -1
      configure.ac
  6. +0
    -1
      libpff/libpff_libfdata.h
  7. +2
    -44
      m4/libcdata.m4
  8. +9
    -2
      m4/libfwnt.m4
  9. +16
    -0
      msvscpp/libfwnt/libfwnt.vcproj
  10. +0
    -1
      pfftools/pfftools_libfdata.h
  11. +0
    -1
      tests/pff_test_libfdata.h
  12. +7
    -7
      tests/test_pffexport.sh

+ 3
- 0
.travis.yml View File

@@ -228,3 +228,6 @@ after_success:
- if test ${TARGET} = "linux-gcc-no-optimization"; then
curl -o codecov.sh -s https://codecov.io/bash && sed 's/ -execdir / -exec /' -i ./codecov.sh && /bin/bash ./codecov.sh -n ${TARGET} -y .codecov.yml;
fi
- if test ${TARGET} = "macos-gcc-python-setup-py37" && test -n "${TRAVIS_TAG}"; then
python3 -m twine upload dist/*.whl --username __token__ --password ${PYPI_TOKEN} --skip-existing;
fi

+ 5
- 0
.travis/before_install.sh View File

@@ -30,6 +30,11 @@ then

brew install gettext gnu-sed;
brew link --force gettext;

if test ${TARGET} = "macos-gcc-python-setup-py37";
then
python3 -m pip install -U pip twine;
fi
fi

if test ${TARGET} = "coverity";


+ 2
- 0
.travis/script.sh View File

@@ -25,6 +25,8 @@ elif test ${TARGET} = "macos-gcc-python-setup-py37";
then
./configure ${CONFIGURE_OPTIONS};
make > /dev/null;
python3 ./setup.py build;

python3 ./setup.py bdist_wheel;

elif test ${TARGET} != "coverity";


+ 10
- 10
appveyor.yml View File

@@ -199,33 +199,33 @@ build_script:
msbuild /verbosity:quiet vs2017\libpff.sln /property:Platform=x64 /property:PlatformToolset=v141 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
"%PYTHON%" setup.py bdist_msi bdist_wheel )
- sh: if test ${BUILD_ENVIRONMENT} = "python"; then ./synclibs.sh && ./autogen.sh; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python"; then ./synclibs.sh && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python"; then ${PYTHON} setup.py bdist_wheel; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] (
xcopy /i /q /s C:\projects\libpff C:\cygwin\home\appveyor\libpff &&
C:\cygwin\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh" )
C:\cygwin\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
xcopy /i /q /s C:\projects\libpff C:\cygwin64\home\appveyor\libpff &&
C:\cygwin64\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh" )
C:\cygwin64\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw] (
xcopy /i /q /s C:\projects\libpff C:\MinGW\msys\1.0\home\appveyor\libpff &&
C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && sed 's/@VERSION@/0.29/g' m4/pkg.m4.in > m4/pkg.m4 && ./synclibs.sh --use-head && ./autogen.sh" )
C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && sed 's/@VERSION@/0.29/g' m4/pkg.m4.in > m4/pkg.m4 && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
xcopy /i /q /s C:\projects\libpff C:\msys64\home\appveyor\libpff &&
C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh" )
C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )

test_script:
- cmd: rem Run tests
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
.\runtests.ps1 }
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] (
C:\cygwin\bin\bash -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
C:\cygwin\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
C:\cygwin64\bin\bash -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
C:\cygwin64\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw] (
C:\MinGW\msys\1.0\bin\bash -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
C:\MinGW\msys\1.0\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
C:\msys64\usr\bin\bash -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
C:\msys64\usr\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )

after_test:
- cmd: if [%TARGET%]==[mingw-gcc-no-optimization] (
@@ -236,6 +236,6 @@ artifacts:
- path: dist\*.whl

deploy_script:
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true") {
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows) {
Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" }


+ 1
- 1
configure.ac View File

@@ -2,7 +2,7 @@ AC_PREREQ( 2.59 )

AC_INIT(
[libpff],
[20191212],
[20191220],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(


+ 0
- 1
libpff/libpff_libfdata.h View File

@@ -29,7 +29,6 @@
#if defined( HAVE_LOCAL_LIBFDATA )

#include <libfdata_area.h>
#include <libfdata_btree.h>
#include <libfdata_definitions.h>
#include <libfdata_list.h>
#include <libfdata_list_element.h>


+ 2
- 44
m4/libcdata.m4 View File

@@ -1,6 +1,6 @@
dnl Checks for libcdata required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20191220

dnl Function to detect if libcdata is available
dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
@@ -26,7 +26,7 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB],
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcdata],
[libcdata >= 20190112],
[libcdata >= 20191220],
[ac_cv_libcdata=yes],
[ac_cv_libcdata=check])
])
@@ -125,48 +125,6 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB],
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])

dnl Balanced tree functions
AC_CHECK_LIB(
cdata,
libfdata_btree_initialize,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_free,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_get_number_of_values,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_get_value_by_index,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_get_value_by_value,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_insert_value,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_replace_value,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])
AC_CHECK_LIB(
cdata,
libcdata_btree_remove_value,
[ac_cv_libcdata_dummy=yes],
[ac_cv_libcdata=no])

dnl List functions
AC_CHECK_LIB(
cdata,


+ 9
- 2
m4/libfwnt.m4 View File

@@ -1,6 +1,6 @@
dnl Checks for libfwnt required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20191217

dnl Function to detect if libfwnt is available
dnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
@@ -26,7 +26,7 @@ AC_DEFUN([AX_LIBFWNT_CHECK_LIB],
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libfwnt],
[libfwnt >= 20161103],
[libfwnt >= 20191217],
[ac_cv_libfwnt=yes],
[ac_cv_libfwnt=check])
])
@@ -197,6 +197,13 @@ AC_DEFUN([AX_LIBFWNT_CHECK_LIB],
[ac_cv_libfwnt_dummy=yes],
[ac_cv_libfwnt=no])

dnl LZXPRESS functions
AC_CHECK_LIB(
fwnt,
libfwnt_lzx_decompress,
[ac_cv_libfwnt_dummy=yes],
[ac_cv_libfwnt=no])

dnl LZXPRESS functions
AC_CHECK_LIB(
fwnt,


+ 16
- 0
msvscpp/libfwnt/libfwnt.vcproj View File

@@ -170,6 +170,10 @@
RelativePath="..\..\libfwnt\libfwnt_error.c"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_huffman_tree.c"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_locale_identifier.c"
>
@@ -178,6 +182,10 @@
RelativePath="..\..\libfwnt\libfwnt_lznt1.c"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_lzx.c"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_lzxpress.c"
>
@@ -228,6 +236,10 @@
RelativePath="..\..\libfwnt\libfwnt_extern.h"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_huffman_tree.h"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_libcdata.h"
>
@@ -248,6 +260,10 @@
RelativePath="..\..\libfwnt\libfwnt_lznt1.h"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_lzx.h"
>
</File>
<File
RelativePath="..\..\libfwnt\libfwnt_lzxpress.h"
>


+ 0
- 1
pfftools/pfftools_libfdata.h View File

@@ -29,7 +29,6 @@
#if defined( HAVE_LOCAL_LIBFDATA )

#include <libfdata_area.h>
#include <libfdata_btree.h>
#include <libfdata_definitions.h>
#include <libfdata_list.h>
#include <libfdata_list_element.h>


+ 0
- 1
tests/pff_test_libfdata.h View File

@@ -29,7 +29,6 @@
#if defined( HAVE_LOCAL_LIBFDATA )

#include <libfdata_area.h>
#include <libfdata_btree.h>
#include <libfdata_definitions.h>
#include <libfdata_list.h>
#include <libfdata_list_element.h>


+ 7
- 7
tests/test_pffexport.sh View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Export tool testing script
#
# Version: 20190223
# Version: 20191220

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
@@ -32,24 +32,24 @@ test_callback()

if test "${PLATFORM}" = "Darwin";
then
(cd ${TMPDIR} && find "'${INPUT_NAME}.export'" -type f -exec md5 {} \; | sort -k 2 > "'${TEST_LOG}'");
(cd ${TMPDIR} && find "${INPUT_NAME}.export" -type f -exec md5 {} \; | sort -k 2 > "${TEST_LOG}");
else
(cd ${TMPDIR} && find "'${INPUT_NAME}.export'" -type f -exec md5sum {} \; | sort -k 2 > "'${TEST_LOG}'");
(cd ${TMPDIR} && find "${INPUT_NAME}.export" -type f -exec md5sum {} \; | sort -k 2 > "${TEST_LOG}");
fi

local TEST_RESULTS="${TMPDIR}/${TEST_LOG}";
local STORED_TEST_RESULTS="${TEST_SET_DIRECTORY}/${TEST_LOG}.gz";

if test -f "'${STORED_TEST_RESULTS}'";
if test -f "${STORED_TEST_RESULTS}";
then
# Using zcat here since zdiff has issues on Mac OS X.
# Note that zcat on Mac OS X requires the input from stdin.
zcat < "'${STORED_TEST_RESULTS}'" | diff "'${TEST_RESULTS}'" -;
zcat < "${STORED_TEST_RESULTS}" | diff "${TEST_RESULTS}" -;
RESULT=$?;
else
gzip "'${TEST_RESULTS}'";
gzip "${TEST_RESULTS}";

mv "'${TEST_RESULTS}.gz'" ${TEST_SET_DIRECTORY};
mv "${TEST_RESULTS}.gz" ${TEST_SET_DIRECTORY};
fi
return ${RESULT};
}


Loading…
Cancel
Save