Browse Source

Worked on tests

tags/20180714
Joachim Metz 3 years ago
parent
commit
ac6b506cb4
31 changed files with 282 additions and 234 deletions
  1. +0
    -1
      .gitignore
  2. +6
    -6
      .travis.yml
  3. +5
    -6
      Makefile.am
  4. +59
    -56
      appveyor.yml
  5. +39
    -9
      autogen.sh
  6. +1
    -2
      configure.ac
  7. +1
    -1
      dpkg/compat
  8. +14
    -6
      dpkg/control
  9. +25
    -0
      dpkg/copyright
  10. +0
    -40
      dpkg/copyright.in
  11. +0
    -4
      dpkg/libpff-dev.docs
  12. +5
    -0
      dpkg/libpff-dev.install
  13. +0
    -4
      dpkg/libpff-python.docs
  14. +1
    -0
      dpkg/libpff-python.install
  15. +0
    -4
      dpkg/libpff-python3.docs
  16. +1
    -0
      dpkg/libpff-python3.install
  17. +0
    -4
      dpkg/libpff-tools.docs
  18. +2
    -0
      dpkg/libpff-tools.install
  19. +0
    -4
      dpkg/libpff.docs
  20. +1
    -0
      dpkg/libpff.install
  21. +7
    -79
      dpkg/rules
  22. +1
    -1
      dpkg/source/format
  23. +1
    -0
      libpff.ini
  24. +2
    -0
      libpff/libpff_libuna.h
  25. +2
    -0
      pfftools/pfftools_libuna.h
  26. +3
    -3
      synczlib.ps1
  27. +2
    -0
      tests/pff_test_libuna.h
  28. +63
    -0
      tests/pff_test_macros.h
  29. +5
    -3
      tests/pff_test_memory.h
  30. +12
    -0
      tests/test_library.ps1
  31. +24
    -1
      tests/test_pffinfo.ps1

+ 0
- 1
.gitignore View File

@@ -113,7 +113,6 @@ stamp-h[1-9]
/common/config.h.in
/common/types.h
/dpkg/changelog
/dpkg/copyright
/include/libpff.h
/include/libpff/definitions.h
/include/libpff/features.h


+ 6
- 6
.travis.yml View File

@@ -8,14 +8,14 @@ compiler:
- clang
- gcc
before_install:
- if test `uname -s` = 'Darwin'; then brew update && brew install gettext gnu-sed && brew link --force gettext; fi
- if test `uname -s` = 'Linux'; then sudo apt-get update && sudo apt-mark hold postgresql-9.2 postgresql-9.3 postgresql-9.4 postgresql-9.5 postgresql-9.6 postgresql-client postgresql-client-common postgresql-common postgresql-contrib-9.2 postgresql-contrib-9.3 postgresql-contrib-9.4 postgresql-contrib-9.5 postgresql-contrib-9.6 postgresql-doc && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y && sudo apt-get install -y autopoint; fi
- if test ${TRAVIS_OS_NAME} = "osx"; then brew update && brew install gettext gnu-sed && brew link --force gettext; fi
- if test ${TRAVIS_OS_NAME} = "linux"; then sudo apt-get update && sudo apt-mark hold oracle-java9-installer postgresql-9.2 postgresql-9.3 postgresql-9.4 postgresql-9.5 postgresql-9.6 postgresql-client postgresql-client-common postgresql-common postgresql-contrib-9.2 postgresql-contrib-9.3 postgresql-contrib-9.4 postgresql-contrib-9.5 postgresql-contrib-9.6 postgresql-doc && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y && sudo apt-get install -y autopoint; fi
install:
- if test `uname -s` = 'Darwin'; then export SED="/usr/local/bin/gsed"; fi
- if test ${TRAVIS_OS_NAME} = "osx"; then export SED="/usr/local/bin/gsed"; fi
- ./synclibs.sh && ./autogen.sh
- if test -x 'synctestdata.sh'; then ./synctestdata.sh; fi
- if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
script:
- if test `uname -s` = 'Linux'; then export PATH=$(echo $PATH | tr ":" "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s/::/:/g"); fi
- if test ${TRAVIS_OS_NAME} = "linux"; then export PATH=$(echo $PATH | tr ":" "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s/::/:/g"); fi
- ./runtests.sh
after_success:
- if test `uname -s` = 'Linux' && test "$CC" = "gcc"; then curl -o codecov.sh -s https://codecov.io/bash && /bin/bash ./codecov.sh; fi
- if test ${TRAVIS_OS_NAME} = "linux" && test ${CC} = "gcc"; then curl -o codecov.sh -s https://codecov.io/bash && /bin/bash ./codecov.sh; fi

+ 5
- 6
Makefile.am View File

@@ -37,13 +37,12 @@ DPKG_FILES = \
dpkg/compat \
dpkg/control \
dpkg/copyright \
dpkg/copyright.in \
dpkg/rules \
dpkg/libpff.docs \
dpkg/libpff-dev.docs \
dpkg/libpff-python.docs \
dpkg/libpff-python3.docs \
dpkg/libpff-tools.docs \
dpkg/libpff.install \
dpkg/libpff-dev.install \
dpkg/libpff-python.install \
dpkg/libpff-python3.install \
dpkg/libpff-tools.install \
dpkg/source/format

GETTEXT_FILES = \


+ 59
- 56
appveyor.yml View File

@@ -1,5 +1,23 @@
environment:
VisualStudioVersion: 11.0
matrix:
- TARGET: vs2008
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VisualStudioVersion: 9.0
- TARGET: vs2010
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VisualStudioVersion: 10.0
- TARGET: vs2012
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VisualStudioVersion: 11.0
- TARGET: vs2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
VisualStudioVersion: 12.0
- TARGET: vs2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VisualStudioVersion: 14.0
- TARGET: cygwin
- TARGET: mingw32
- TARGET: mingw64

# TODO: add x64, fix issue: LNK1158: cannot run 'cvtres.exe'
platform:
@@ -13,64 +31,49 @@ install:
- cmd: git clone https://github.com/libyal/libyal.git && move libyal ..\
- ps: .\synczlib.ps1

before_build:
- cmd: xcopy /q /s C:\projects\libpff C:\cygwin\home\appveyor\
- cmd: xcopy /q /s C:\projects\libpff C:\msys64\home\appveyor\

build_script:
- ps: .\synclibs.ps1
- ps: .\autogen.ps1
- cmd: >-
rem Prepare Visual Studio 2010 build

C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2010 msvscpp\libpff.sln

rem Build with Visual Studio 2010

msbuild vs2010\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

rem Prepare Visual Studio 2012 build

C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2012 msvscpp\libpff.sln

rem Build with Visual Studio 2012

msbuild vs2012\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

rem Prepare Visual Studio 2013 build

C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2013 msvscpp\libpff.sln

rem Build with Visual Studio 2013

msbuild vs2013\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

rem Prepare Cygwin build

C:\cygwin\bin\bash -e -l -c "cd libpff"

C:\cygwin\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh"

rem Build with Cygwin

C:\cygwin\bin\bash -e -l -c "./configure && make -j4"

rem Prepare MinGW build

C:\msys64\usr\bin\bash -e -l -c "cd libpff"

C:\msys64\usr\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh"

rem Build with MinGW 32-bit

C:\msys64\usr\bin\bash -e -l -c "./configure --host=i686-w64-mingw32 && make -j4"

rem Build with MinGW 64-bit

C:\msys64\usr\bin\bash -e -l -c "./configure --host=x86_64-w64-mingw32 && make -j4"

rem Run tests
- cmd: if [%TARGET%]==[vs2008] (
msbuild msvscpp\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2010] (
C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2010 msvscpp\libpff.sln &&
msbuild vs2010\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2012] (
C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2012 msvscpp\libpff.sln &&
msbuild vs2012\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2013] (
C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2013 msvscpp\libpff.sln &&
msbuild vs2013\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2015] (
C:\Python27\python.exe ..\libyal\scripts\msvscpp-convert.py --to 2015 msvscpp\libpff.sln &&
msbuild vs2015\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[cygwin] (
xcopy /q /s C:\projects\libpff C:\cygwin\home\appveyor\ &&
C:\cygwin\bin\bash -e -l -c "cd libpff" &&
C:\cygwin\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" &&
C:\cygwin\bin\bash -e -l -c "./configure && make -j4" )
- cmd: if [%TARGET%]==[mingw32] (
xcopy /q /s C:\projects\libpff C:\msys64\home\appveyor\ &&
C:\msys64\usr\bin\bash -e -l -c "cd libpff" &&
C:\msys64\usr\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" &&
C:\msys64\usr\bin\bash -e -l -c "./configure --host=i686-w64-mingw32 && make -j4" )
- cmd: if [%TARGET%]==[mingw64] (
xcopy /q /s C:\projects\libpff C:\msys64\home\appveyor\ &&
C:\msys64\usr\bin\bash -e -l -c "cd libpff" &&
C:\msys64\usr\bin\bash -e -l -c "./synclibs.sh && ./autogen.sh" &&
C:\msys64\usr\bin\bash -e -l -c "./configure --host=x86_64-w64-mingw32 && make -j4" )

test_script:
- ps: .\runtests.ps1
- cmd: rem Run tests
- ps: if ($env:TARGET -eq "vs2008") {
.\runtests.ps1 }
- ps: if ($env:TARGET -eq "vs2010") {
.\runtests.ps1 }
- ps: if ($env:TARGET -eq "vs2012") {
.\runtests.ps1 }
- ps: if ($env:TARGET -eq "vs2013") {
.\runtests.ps1 }
- ps: if ($env:TARGET -eq "vs2015") {
.\runtests.ps1 }


+ 39
- 9
autogen.sh View File

@@ -1,37 +1,45 @@
#!/bin/sh
# Script to generate ./configure using the autotools
#
# Version: 20160106
# Version: 20170723

EXIT_SUCCESS=0;
EXIT_FAILURE=1;

BINDIR="/usr/bin";

if ! test -x "${BINDIR}/pkg-config";
if ! test -x "${BINDIR}/aclocal";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
if ! test -x "${BINDIR}/aclocal";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
if ! test -x "${BINDIR}/aclocal";
then
# Default location of MacPorts installed binaries.
BINDIR="/opt/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
if ! test -x "${BINDIR}/aclocal";
then
# Default location of MSYS-MinGW installed binaries.
BINDIR="/mingw/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
# Default location of 32-bit MSYS2-MinGW installed binaries.
BINDIR="/mingw32/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
# Default location of 64-bit MSYS2-MinGW installed binaries.
BINDIR="/mingw64/bin";
fi

PKGCONFIG="${BINDIR}/pkg-config";

if ! test -x "${PKGCONFIG}";
if ! test -x "${BINDIR}/aclocal";
then
echo "Unable to find: pkg-config";
echo "Unable to find autotools";

exit ${EXIT_FAILURE};
fi
@@ -43,6 +51,28 @@ AUTOMAKE="${BINDIR}/automake";
AUTOPOINT="${BINDIR}/autopoint";
AUTORECONF="${BINDIR}/autoreconf";
LIBTOOLIZE="${BINDIR}/libtoolize";
PKGCONFIG="${BINDIR}/pkg-config";

if test "${OSTYPE}" != "msys" && ! test -x "${PKGCONFIG}";
then
echo "Unable to find: pkg-config";

exit ${EXIT_FAILURE};
fi

if test "${OSTYPE}" = "msys";
then
# Work-around autopoint failing to detect gettext version
# using func_trace which is not available on MSYS by writing
# the gettext version to intl/VERSION.
if ! test -d intl;
then
mkdir intl;
fi
GETTEXT_VERSION=`gettext --version | head -n1 | sed 's/^.* //'`;

echo "gettext-${GETTEXT_VERSION}" > intl/VERSION;
fi

if test -x "${AUTORECONF}";
then


+ 1
- 2
configure.ac View File

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

AC_INIT(
[libpff],
[20170115],
[20170724],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
@@ -234,7 +234,6 @@ AC_CONFIG_FILES([libpff/libpff_definitions.h])
dnl Have configure make distribution specific files
AC_CONFIG_FILES([common/types.h])
AC_CONFIG_FILES([dpkg/changelog])
AC_CONFIG_FILES([dpkg/copyright])
AC_CONFIG_FILES([libpff/libpff.rc])
AC_CONFIG_FILES([libpff.pc])
AC_CONFIG_FILES([libpff.spec])


+ 1
- 1
dpkg/compat View File

@@ -1 +1 @@
7
9

+ 14
- 6
dpkg/control View File

@@ -1,23 +1,24 @@
Source: libpff
Section: libs
Priority: extra
Maintainer: Joachim Metz <joachim.metz@gmail.com>
Build-Depends: debhelper (>= 7), autotools-dev, zlib1g-dev, python-all-dev, python3-all-dev
Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, zlib1g-dev, python-dev, python3-dev
Standards-Version: 3.9.5
Homepage: https://github.com/libyal/libpff/
Section: libs
Homepage: https://github.com/libyal/libpff

Package: libpff
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Suggests: libpff-dbg
Description: Library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files.
libpff is a library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files.
Description: Library to access the Personal Folder File (OST, PAB and PST) format
libpff is a library to access the Personal Folder File (OST, PAB and PST) format.

Package: libpff-dbg
Architecture: any
Section: debug
Depends: libpff (= ${binary:Version}), ${misc:Depends}
Description: Debugging symbols for libpff
Debugging symbols for libpff.

Package: libpff-dev
Section: libdevel
@@ -31,7 +32,14 @@ Section: utils
Architecture: any
Depends: libpff (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: Several tools for reading Personal Folder Files (OST, PAB and PST)
Several tools for reading Personal Folder Files (OST, PAB and PST)
Several tools for reading Personal Folder Files (OST, PAB and PST).

Package: libpff-tools-dbg
Section: debug
Architecture: any
Depends: libpff-tools (= ${binary:Version}), ${misc:Depends}
Description: Debugging symbols for libpff-tools
Debugging symbols for libpff-tools.

Package: libpff-python
Section: python


+ 25
- 0
dpkg/copyright View File

@@ -0,0 +1,25 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libpff
Source: https://github.com/libyal/libpff

Files: *
Copyright: 2008-2017, Joachim Metz <joachim.metz@gmail.com>
License: LGPL-3.0+

License: LGPL-3.0+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".


+ 0
- 40
dpkg/copyright.in View File

@@ -1,40 +0,0 @@
This work was packaged for Debian by:

Joachim Metz <joachim.metz@gmail.com> on @DPKG_DATE@

It was downloaded from https://github.com/libyal/libpff/

Upstream Author(s):

Joachim Metz <joachim.metz@gmail.com>

Copyright:

Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>

License:

This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.

This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL-3'.

The Debian packaging is:

Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>

and is licensed under the GNU Lesser General Public License,
see `/usr/share/common-licenses/LGPL-3'.


+ 0
- 4
dpkg/libpff-dev.docs View File

@@ -1,4 +0,0 @@
AUTHORS
COPYING
NEWS
README

+ 5
- 0
dpkg/libpff-dev.install View File

@@ -0,0 +1,5 @@
usr/include/*
usr/lib/*-*/lib*.a
usr/lib/*-*/lib*.so
usr/lib/*-*/pkgconfig/*
usr/share/man/man3

+ 0
- 4
dpkg/libpff-python.docs View File

@@ -1,4 +0,0 @@
AUTHORS
COPYING
NEWS
README

+ 1
- 0
dpkg/libpff-python.install View File

@@ -0,0 +1 @@
/usr/lib/python2*

+ 0
- 4
dpkg/libpff-python3.docs View File

@@ -1,4 +0,0 @@
AUTHORS
COPYING
NEWS
README

+ 1
- 0
dpkg/libpff-python3.install View File

@@ -0,0 +1 @@
/usr/lib/python3*

+ 0
- 4
dpkg/libpff-tools.docs View File

@@ -1,4 +0,0 @@
AUTHORS
COPYING
NEWS
README

+ 2
- 0
dpkg/libpff-tools.install View File

@@ -0,0 +1,2 @@
usr/bin
usr/share/man/man1

+ 0
- 4
dpkg/libpff.docs View File

@@ -1,4 +0,0 @@
AUTHORS
COPYING
NEWS
README

+ 1
- 0
dpkg/libpff.install View File

@@ -0,0 +1 @@
usr/lib/*-*/lib*.so.*

+ 7
- 79
dpkg/rules View File

@@ -1,100 +1,28 @@
#!/usr/bin/make -f
# debian/rules that uses debhelper >= 7.
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Uncomment for debhelper verbose output.
# export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS
export SKIP_PYTHON_TESTS=1

%:
dh $@
dh $@ --with autoreconf

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
dh_auto_configure -- --enable-python2 --enable-python3 CFLAGS="-g"

.PHONY: override_dh_auto_test
override_dh_auto_test:

.PHONY: override_dh_install
override_dh_install:
# Create the libpff package.
dh_install "debian/tmp/usr/lib/lib*.so.*.*.*" -p libpff
# Create the libpff-dev package.
dh_install "debian/tmp/usr/include/*.h" -p libpff-dev
dh_install "debian/tmp/usr/include/lib*/*.h" -p libpff-dev
dh_install "debian/tmp/usr/lib/*.a" -p libpff-dev
dh_install "debian/tmp/usr/lib/*.la" -p libpff-dev
dh_install "debian/tmp/usr/lib/*.so" -p libpff-dev
dh_install "debian/tmp/usr/lib/pkgconfig/*" -p libpff-dev
dh_install "debian/tmp/usr/share/man/man3/*" -p libpff-dev
# Create the libpff-tools package.
dh_install "debian/tmp/usr/bin/*" -p libpff-tools
dh_install "debian/tmp/usr/share/man/man1/*" -p libpff-tools
# Create the libpff-python package.
dh_install -X"*_d.so" "debian/tmp/usr/lib/python2*/*" -p libpff-python
# Create the libpff-python3 package.
dh_install -X"*_d.so" "debian/tmp/usr/lib/python3*/*" -p libpff-python3
# The libpff-dbg, libpff-python-dbg and libpff-python3-dbg packages
# are created by dh_strip.
dh_install

.PHONY: override_dh_installmenu
override_dh_installmenu:

.PHONY: override_dh_installmime
override_dh_installmime:

.PHONY: override_dh_installmodules
override_dh_installmodules:

.PHONY: override_dh_installlogcheck
override_dh_installlogcheck:

.PHONY: override_dh_installlogrotate
override_dh_installlogrotate:

.PHONY: override_dh_installpam
override_dh_installpam:

.PHONY: override_dh_installppp
override_dh_installppp:

.PHONY: override_dh_installudev
override_dh_installudev:

.PHONY: override_dh_installwm
override_dh_installwm:

.PHONY: override_dh_installxfonts
override_dh_installxfonts:

.PHONY: override_dh_gconf
override_dh_gconf:

.PHONY: override_dh_icons
override_dh_icons:

.PHONY: override_dh_perl
override_dh_perl:

.PHONY: override_dh_pysupport
override_dh_pysupport:
dh_install --fail-missing -X.la -X/pypff.a

.PHONY: override_dh_strip
override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip -plibpff --dbg-package=libpff-dbg
dh_strip -plibpff-tools --dbg-package=libpff-tools-dbg
dh_strip -plibpff-python --dbg-package=libpff-python-dbg
dh_strip -plibpff-python3 --dbg-package=libpff-python3-dbg
endif

.PHONY: override_dh_shlibdeps
override_dh_shlibdeps:
dh_shlibdeps -Llibpff -l${CURDIR}/debian/tmp/usr/lib

.PHONY: override_dh_makeshlibs
override_dh_makeshlibs:
dh_makeshlibs -Xlibpff-dev


+ 1
- 1
dpkg/source/format View File

@@ -1 +1 @@
1.0
3.0 (quilt)

+ 1
- 0
libpff.ini View File

@@ -24,6 +24,7 @@ example_filename1: "Archive.pst"
example_filename2: "outlook.ost"

[tools]
description: "Several tools for reading Personal Folder Files (OST, PAB and PST)"
directory: "pfftools"
names: ["pffexport", "pffinfo"]



+ 2
- 0
libpff/libpff_libuna.h View File

@@ -3,6 +3,8 @@
*
* Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or


+ 2
- 0
pfftools/pfftools_libuna.h View File

@@ -3,6 +3,8 @@
*
* Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or


+ 3
- 3
synczlib.ps1 View File

@@ -33,9 +33,9 @@ Function ExtractZip($Filename)
}
}

$Filename = "${pwd}\zlib1210.zip"
$Url = "http://zlib.net/zlib1210.zip"
$ExtractedPath = "zlib-1.2.10"
$Filename = "${pwd}\zlib1211.zip"
$Url = "http://zlib.net/zlib1211.zip"
$ExtractedPath = "zlib-1.2.11"
$DestinationPath = "..\zlib"

If (Test-Path ${Filename})


+ 2
- 0
tests/pff_test_libuna.h View File

@@ -3,6 +3,8 @@
*
* Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or


+ 63
- 0
tests/pff_test_macros.h View File

@@ -71,6 +71,62 @@
goto on_error; \
}

#define PFF_TEST_ASSERT_EQUAL_INT8( name, value, expected_value ) \
if( value != expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi8 ") != %" PRIi8 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_NOT_EQUAL_INT8( name, value, expected_value ) \
if( value == expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi8 ") == %" PRIi8 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_EQUAL_UINT8( name, value, expected_value ) \
if( value != expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi8 ") != %" PRIu8 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_LESS_THAN_UINT8( name, value, expected_value ) \
if( value >= expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi8 ") >= %" PRIu8 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_EQUAL_INT16( name, value, expected_value ) \
if( value != expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi16 ") != %" PRIi16 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_NOT_EQUAL_INT16( name, value, expected_value ) \
if( value == expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi16 ") == %" PRIi16 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_EQUAL_UINT16( name, value, expected_value ) \
if( value != expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi16 ") != %" PRIu16 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_LESS_THAN_UINT16( name, value, expected_value ) \
if( value >= expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi16 ") >= %" PRIu16 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_EQUAL_INT32( name, value, expected_value ) \
if( value != expected_value ) \
{ \
@@ -78,6 +134,13 @@
goto on_error; \
}

#define PFF_TEST_ASSERT_NOT_EQUAL_INT32( name, value, expected_value ) \
if( value == expected_value ) \
{ \
fprintf( stdout, "%s:%d %s (%" PRIi32 ") == %" PRIi32 "\n", __FILE__, __LINE__, name, value, expected_value ); \
goto on_error; \
}

#define PFF_TEST_ASSERT_EQUAL_UINT32( name, value, expected_value ) \
if( value != expected_value ) \
{ \


+ 5
- 3
tests/pff_test_memory.h View File

@@ -28,9 +28,11 @@
extern "C" {
#endif

#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ )

#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __arm__ ) && !defined( __mips__ ) && !defined( __hppa__ ) && !defined( __sparc__ )
#define HAVE_PFF_TEST_MEMORY 1
#endif

#if defined( HAVE_PFF_TEST_MEMORY )

extern int pff_test_malloc_attempts_before_fail;

@@ -40,7 +42,7 @@ extern int pff_test_memset_attempts_before_fail;

extern int pff_test_realloc_attempts_before_fail;

#endif /* defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) */
#endif /* defined( HAVE_PFF_TEST_MEMORY ) */

#if defined( __cplusplus )
}


+ 12
- 0
tests/test_library.ps1 View File

@@ -47,6 +47,18 @@ If (-Not (Test-Path ${TestToolDirectory}))
$TestToolDirectory = "..\vs2010\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2012\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2013\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2015\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
Write-Host "Missing test tool directory." -foreground Red



+ 24
- 1
tests/test_pffinfo.ps1 View File

@@ -11,11 +11,34 @@ $TestPrefix = Split-Path -path ${TestPrefix} -leaf
$TestPrefix = ${TestPrefix}.Substring(3)
$TestSuffix = "info"

$TestToolDirectory = "..\vs2010\Release"
$TestToolDirectory = "..\msvscpp\Release"
$TestTool = "${TestPrefix}${TestSuffix}"
$InputDirectory = "input"
$InputGlob = "*"

If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2010\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2012\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2013\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
$TestToolDirectory = "..\vs2015\Release"
}
If (-Not (Test-Path ${TestToolDirectory}))
{
Write-Host "Missing test tool directory." -foreground Red

Exit ${ExitFailure}
}

$TestExecutable = "${TestToolDirectory}\${TestTool}.exe"

If (-Not (Test-Path -Path "${InputDirectory}"))


Loading…
Cancel
Save