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 5c915ed commit 8df1fb9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 17 deletions.
15 changes: 14 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,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/[email protected]/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/[email protected]/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 @@ -105,6 +111,7 @@ environment:
PYTHON: "/usr/local/opt/[email protected]/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/[email protected]/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 @@ -140,6 +147,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 @@ -184,7 +197,7 @@ install:
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
git clone https://github.com/libyal/vstools.git ..\vstools )
- 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
6 changes: 3 additions & 3 deletions hmactools/hmactools_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void (*hmactools_signal_signal_handler)( hmactools_signal_t ) = NULL;
/* Signal handler for Ctrl+C or Ctrl+Break signals
*/
BOOL WINAPI hmactools_signal_handler(
unsigned long signal )
DWORD signal )
{
static char *function = "hmactools_signal_handler";

Expand Down Expand Up @@ -112,7 +112,7 @@ int hmactools_signal_attach(
hmactools_signal_signal_handler = signal_handler;

if( SetConsoleCtrlHandler(
hmactools_signal_handler,
(PHANDLER_ROUTINE) hmactools_signal_handler,
TRUE ) == 0 )
{
libcerror_error_set(
Expand Down Expand Up @@ -179,7 +179,7 @@ int hmactools_signal_detach(
static char *function = "hmactools_signal_detach";

if( SetConsoleCtrlHandler(
hmactools_signal_handler,
(PHANDLER_ROUTINE) hmactools_signal_handler,
FALSE ) == 0 )
{
libcerror_error_set(
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
3 changes: 2 additions & 1 deletion tests/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ set -e
./synclibs.sh --use-head
./autogen.sh
./configure "$@"
make > /dev/null
# make > /dev/null
make

6 changes: 4 additions & 2 deletions tests/test_library.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Tests library functions and types.
#
# Version: 20231005
# Version: 20231007

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -86,6 +86,8 @@ run_test_with_input()
fi
for INPUT_FILE in "${INPUT_FILES[@]}";
do
OPTION_INPUT_FILE="${INPUT_FILE}";

if test "${OSTYPE}" = "msys";
then
# A test executable built with MinGW expects a Windows path.
Expand All @@ -95,7 +97,7 @@ run_test_with_input()

for OPTION_SET in ${OPTION_SETS[@]};
do
local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");
local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${OPTION_INPUT_FILE}" "${OPTION_SET}");

if test -f ${TEST_DATA_OPTION_FILE};
then
Expand Down
6 changes: 3 additions & 3 deletions tests/test_md5sum.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Sum tool testing script
#
# Version: 20231001
# Version: 20231007

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -165,7 +165,7 @@ do

IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");

run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_stdout_reference" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}";
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_callback" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}";
RESULT=$?;

if test ${RESULT} -ne ${EXIT_SUCCESS};
Expand All @@ -177,7 +177,7 @@ do

if test ${TESTED_WITH_OPTIONS} -eq 0;
then
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_stdout_reference" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}";
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_callback" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}";
RESULT=$?;
fi

Expand Down
6 changes: 3 additions & 3 deletions tests/test_sha1sum.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Sum tool testing script
#
# Version: 20231001
# Version: 20231007

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -165,7 +165,7 @@ do

IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");

run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_stdout_reference" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}";
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_callback" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}";
RESULT=$?;

if test ${RESULT} -ne ${EXIT_SUCCESS};
Expand All @@ -177,7 +177,7 @@ do

if test ${TESTED_WITH_OPTIONS} -eq 0;
then
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_stdout_reference" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}";
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_callback" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}";
RESULT=$?;
fi

Expand Down
6 changes: 3 additions & 3 deletions tests/test_sha2sum.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Sum tool testing script
#
# Version: 20231001
# Version: 20231007

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -199,7 +199,7 @@ do

IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");

run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_stdout_reference" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}";
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_callback" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}";
RESULT=$?;

if test ${RESULT} -ne ${EXIT_SUCCESS};
Expand All @@ -211,7 +211,7 @@ do

if test ${TESTED_WITH_OPTIONS} -eq 0;
then
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_stdout_reference" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}";
run_test_on_input_file "${TEST_SET_DIRECTORY}" "hmacsum" "with_callback" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}";
RESULT=$?;
fi

Expand Down

0 comments on commit 8df1fb9

Please sign in to comment.