diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a03a5f2..8746029 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,24 +3,6 @@ name: build on: [push, pull_request] permissions: read-all jobs: - build_freebsd: - # FreeBSD support is provided via virtualization on MacOS 12 - # See https://github.com/vmactions/freebsd-vm#under-the-hood. - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Building from source - id: build_freebsd - uses: vmactions/freebsd-vm@v0 - with: - usesh: true - mem: 4096 - # Note that the test scripts require bash - prepare: | - pkg install -y autoconf automake bash byacc flex fusefs-libs gettext git libtool openssl pkgconf - run: | - tests/build.sh - tests/runtests.sh build_ubuntu: runs-on: ubuntu-22.04 strategy: diff --git a/.github/workflows/build_freebsd.yml b/.github/workflows/build_freebsd.yml new file mode 100644 index 0000000..0a4eafb --- /dev/null +++ b/.github/workflows/build_freebsd.yml @@ -0,0 +1,21 @@ +# Build from source on FreeBSD. +name: build_freebsd +on: [push] +permissions: read-all +jobs: + build_freebsd: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Building from source + id: build_freebsd + uses: vmactions/freebsd-vm@v1 + with: + usesh: true + mem: 4096 + # Note that the test scripts require bash + prepare: | + pkg install -y autoconf automake bash byacc flex fusefs-libs gettext git libtool openssl pkgconf + run: | + tests/build.sh + tests/runtests.sh diff --git a/appveyor.yml b/appveyor.yml index 95e65e6..8ef8685 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -251,7 +251,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 macfuse 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 ) diff --git a/ewftools/ewftools_signal.c b/ewftools/ewftools_signal.c index 6e35231..e0b8a68 100644 --- a/ewftools/ewftools_signal.c +++ b/ewftools/ewftools_signal.c @@ -1,7 +1,7 @@ /* * Signal handling functions * - * Copyright (C) 2006-2021, Joachim Metz + * Copyright (C) 2006-2023, Joachim Metz * * Refer to AUTHORS for acknowledgements. * @@ -40,7 +40,7 @@ void (*ewftools_signal_signal_handler)( ewftools_signal_t ) = NULL; /* Signal handler for Ctrl+C or Ctrl+Break signals */ BOOL WINAPI ewftools_signal_handler( - unsigned long signal ) + ewftools_signal_t signal ) { static char *function = "ewftools_signal_handler"; @@ -112,7 +112,7 @@ int ewftools_signal_attach( ewftools_signal_signal_handler = signal_handler; if( SetConsoleCtrlHandler( - ewftools_signal_handler, + (PHANDLER_ROUTINE) ewftools_signal_handler, TRUE ) == 0 ) { libcerror_error_set( @@ -179,7 +179,7 @@ int ewftools_signal_detach( static char *function = "ewftools_signal_detach"; if( SetConsoleCtrlHandler( - ewftools_signal_handler, + (PHANDLER_ROUTINE) ewftools_signal_handler, FALSE ) == 0 ) { libcerror_error_set( diff --git a/tests/pyewf_test_support.py b/tests/pyewf_test_support.py index 8ec2676..9bab22b 100644 --- a/tests/pyewf_test_support.py +++ b/tests/pyewf_test_support.py @@ -2,7 +2,7 @@ # # Python-bindings support functions test script # -# Copyright (C) 2006-2021, Joachim Metz +# Copyright (C) 2006-2023, Joachim Metz # # Refer to AUTHORS for acknowledgements. # @@ -37,7 +37,7 @@ def test_get_version(self): def test_check_file_signature(self): """Tests the check_file_signature function.""" - test_source = unittest.source + test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") @@ -46,7 +46,7 @@ def test_check_file_signature(self): def test_check_file_signature_file_object(self): """Tests the check_file_signature_file_object function.""" - test_source = unittest.source + test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") diff --git a/tests/runtests.py b/tests/runtests.py index 9df3912..40a2242 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -2,7 +2,7 @@ # # Script to run Python test scripts. # -# Version: 20231009 +# Version: 20231024 import glob import os @@ -70,6 +70,9 @@ def ReadIgnoreList(test_profile): if lines[0] == "# libyal test data options": for line in lines[1:]: key, value = line.split("=", maxsplit=1) + if key == 'offset': + value = int(value) + setattr(unittest, key, value) test_results = test_runner.run(test_scripts) diff --git a/tests/test_ewfinfo.ps1 b/tests/test_ewfinfo.ps1 index 48374e6..6b0496d 100644 --- a/tests/test_ewfinfo.ps1 +++ b/tests/test_ewfinfo.ps1 @@ -1,6 +1,6 @@ # Info tool testing script # -# Version: 20200726 +# Version: 20230410 $ExitSuccess = 0 $ExitFailure = 1 @@ -10,17 +10,17 @@ $Profiles = @() $OptionsPerProfile = @() $OptionSets = "" -$InputGlob = "*" +$InputGlob = "*.[ELels]01" Function GetTestExecutablesDirectory { $TestExecutablesDirectory = "" - ForEach (${VSDirectory} in "msvscpp vs2008 vs2010 vs2012 vs2013 vs2015 vs2017 vs2019" -split " ") + ForEach (${VSDirectory} in ("msvscpp", "vs2008", "vs2010", "vs2012", "vs2013", "vs2015", "vs2017", "vs2019", "vs2022")) { - ForEach (${VSConfiguration} in "Release VSDebug" -split " ") + ForEach (${VSConfiguration} in ("Release", "VSDebug")) { - ForEach (${VSPlatform} in "Win32 x64" -split " ") + ForEach (${VSPlatform} in ("Win32", "x64")) { $TestExecutablesDirectory = "..\${VSDirectory}\${VSConfiguration}\${VSPlatform}"