Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Nov 19, 2023
1 parent c884b09 commit 5428945
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 32 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/build_freebsd.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
8 changes: 4 additions & 4 deletions ewftools/ewftools_signal.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Signal handling functions
*
* Copyright (C) 2006-2021, Joachim Metz <[email protected]>
* Copyright (C) 2006-2023, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions tests/pyewf_test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Python-bindings support functions test script
#
# Copyright (C) 2006-2021, Joachim Metz <[email protected]>
# Copyright (C) 2006-2023, Joachim Metz <[email protected]>
#
# Refer to AUTHORS for acknowledgements.
#
Expand Down Expand Up @@ -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")

Expand All @@ -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")

Expand Down
5 changes: 4 additions & 1 deletion tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Script to run Python test scripts.
#
# Version: 20231009
# Version: 20231024

import glob
import os
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions tests/test_ewfinfo.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Info tool testing script
#
# Version: 20200726
# Version: 20230410

$ExitSuccess = 0
$ExitFailure = 1
Expand All @@ -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}"

Expand Down

0 comments on commit 5428945

Please sign in to comment.