Skip to content

Commit

Permalink
Changes for CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Oct 7, 2023
1 parent cc78ef0 commit ec5bf24
Show file tree
Hide file tree
Showing 15 changed files with 492 additions and 417 deletions.
15 changes: 14 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,24 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: clang
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: ""
- TARGET: macos-x64-gcc
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: ""
- TARGET: macos-x64-gcc-python
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
PYTHON: "/usr/local/opt/python@3.11/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/python@3.11/bin/python3-config"
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: "--enable-python"
Expand All @@ -113,6 +119,7 @@ environment:
PYTHON: "/usr/local/opt/python@3.11/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/python@3.11/bin/python3-config"
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
Expand Down Expand Up @@ -148,6 +155,12 @@ environment:
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.11
TOXENV: py311
- TARGET: macos-tox-py312
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.12
TOXENV: py312
- TARGET: cygwin64-gcc
BUILD_ENVIRONMENT: cygwin64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
Expand Down Expand Up @@ -236,7 +249,7 @@ install:
.\builddokan.ps1 -Configuration ${Configuration} -Platform "x64"; }
}
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q gettext gnu-sed || true; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool openssl pkg-config || true; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
"%PYTHON%" -m pip install -U pip setuptools twine wheel )
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libbde],
[20230930],
[20231007],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
4 changes: 2 additions & 2 deletions libbde.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package >
<metadata>
<id>libbde</id>
<version>20230930</version>
<version>20231007</version>
<authors>Joachim Metz</authors>
<owners>joachimmetz</owners>
<license type="expression">LGPL-3.0-or-later</license>
<projectUrl>https://github.com/libyal/libbde</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<title>libbde</title>
<description>Library to access the BitLocker Drive Encryption (BDE) format</description>
<releaseNotes>Release of libbde 20230930</releaseNotes>
<releaseNotes>Release of libbde 20231007</releaseNotes>
<copyright>Copyright (C) 2011-2023</copyright>
<tags>native</tags>
</metadata>
Expand Down
6 changes: 5 additions & 1 deletion m4/libcrypto.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcrypto required headers and functions
dnl
dnl Version: 20230701
dnl Version: 20231007

dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h
AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE],
Expand Down Expand Up @@ -687,6 +687,10 @@ AC_DEFUN([AX_LIBCRYPTO_CHECK_LIB],
ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS"
ac_cv_libcrypto_LIBADD="$openssl_LIBS"
AS_IF(
[test "x$ac_cv_libcrypto_LIBADD" = x],
[ac_cv_libcrypto_LIBADD="-lcrypto"])
dnl On Cygwin also link zlib since libcrypto relies on it
AS_CASE(
[$host],
Expand Down
15 changes: 0 additions & 15 deletions setup.cfg

This file was deleted.

12 changes: 9 additions & 3 deletions synctestdata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ If (-Not (Test-Path "${TestInputDirectory}\${TestSet}"))
New-Item -Name "${TestInputDirectory}\.pybde\${TestSet}" -ItemType "directory" | Out-Null
New-Item -Name "${TestInputDirectory}\.bdeinfo\${TestSet}" -ItemType "directory" | Out-Null
}

@"
# libyal test data options
password=bde-TEST
"@ | Out-File -FilePath test_data_options

ForEach ($TestFile in ${TestFiles} -split " ")
{
$Url = "https://github.com/log2timeline/dfvfs/blob/main/test_data/${TestFile}?raw=true"

Invoke-WebRequest -Uri ${Url} -OutFile "${TestInputDirectory}\${TestSet}\${TestFile}"

"-pbde-TEST" | Out-File -FilePath "${TestInputDirectory}\.libbde\${TestSet}\${TestFile}.password"
"-pbde-TEST" | Out-File -FilePath "${TestInputDirectory}\.pybde\${TestSet}\${TestFile}.password"
"-pbde-TEST" | Out-File -FilePath "${TestInputDirectory}\.bdeinfo\${TestSet}\${TestFile}.password"
Copy-Item test_data_options -Destination "${TestInputDirectory}\.libbde\${TestSet}\${TestFile}.password"
Copy-Item test_data_options -Destination "${TestInputDirectory}\.pybde\${TestSet}\${TestFile}.password"
Copy-Item test_data_options -Destination "${TestInputDirectory}\.bdeinfo\${TestSet}\${TestFile}.password"
}

13 changes: 9 additions & 4 deletions synctestdata.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# Script that synchronizes the local test data
#
# Version: 20161009
# Version: 20231001

TEST_SET="public";
TEST_INPUT_DIRECTORY="tests/input";
Expand All @@ -12,14 +12,19 @@ mkdir -p "${TEST_INPUT_DIRECTORY}/.libbde/${TEST_SET}";
mkdir -p "${TEST_INPUT_DIRECTORY}/.pybde/${TEST_SET}";
mkdir -p "${TEST_INPUT_DIRECTORY}/.bdeinfo/${TEST_SET}";

cat > test_data_options << EOT
# libyal test data options
password=bde-TEST
EOT

for TEST_FILE in ${TEST_FILES};
do
URL="https://github.com/log2timeline/dfvfs/blob/main/test_data/${TEST_FILE}?raw=true";

curl -L -o "${TEST_INPUT_DIRECTORY}/${TEST_SET}/${TEST_FILE}" ${URL};

echo "-pbde-TEST" > "${TEST_INPUT_DIRECTORY}/.libbde/${TEST_SET}/${TEST_FILE}.password";
echo "-pbde-TEST" > "${TEST_INPUT_DIRECTORY}/.pybde/${TEST_SET}/${TEST_FILE}.password";
echo "-pbde-TEST" > "${TEST_INPUT_DIRECTORY}/.bdeinfo/${TEST_SET}/${TEST_FILE}.password";
cp test_data_options "${TEST_INPUT_DIRECTORY}/.libbde/${TEST_SET}/${TEST_FILE}.password";
cp test_data_options "${TEST_INPUT_DIRECTORY}/.pybde/${TEST_SET}/${TEST_FILE}.password";
cp test_data_options "${TEST_INPUT_DIRECTORY}/.bdeinfo/${TEST_SET}/${TEST_FILE}.password";
done

8 changes: 4 additions & 4 deletions tests/pybde_test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_get_version(self):

def test_check_volume_signature(self):
"""Tests the check_volume_signature function."""
test_source = unittest.source
test_source = getattr(unittest, 'source', None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -46,7 +46,7 @@ def test_check_volume_signature(self):

def test_check_volume_signature_file_object(self):
"""Tests the check_volume_signature_file_object function."""
test_source = unittest.source
test_source = getattr(unittest, 'source', None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -56,7 +56,7 @@ def test_check_volume_signature_file_object(self):

def test_open(self):
"""Tests the open function."""
test_source = unittest.source
test_source = getattr(unittest, 'source', None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -73,7 +73,7 @@ def test_open(self):

def test_open_file_object(self):
"""Tests the open_file_object function."""
test_source = unittest.source
test_source = getattr(unittest, 'source', None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand Down
Loading

0 comments on commit ec5bf24

Please sign in to comment.