Skip to content

Commit

Permalink
Add option to exclude selected tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kubov committed Dec 7, 2022
1 parent eebf0d4 commit e149c9b
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 3 deletions.
Empty file.
Empty file.
6 changes: 6 additions & 0 deletions .github/workflows/Linux/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/bash

set -x

IGNORE_TESTS=$(cat $1 | tr '\n' ',' | sed 's/,$//' | tr '.' '/')

cat <<EOF > $PWD/retdec-regression-tests-framework/config_local.ini
[runner]
; Path to the extracted Clang package containing subdirectories such as bin, include, lib, share.
Expand All @@ -8,6 +12,8 @@ clang_dir = $PWD/clang
tests_root_dir = $PWD/retdec-regression-tests
; Path to the RetDec's installation directory.
retdec_install_dir = $PWD/install
; Exclude directories
excluded_dirs = $IGNORE_TESTS
EOF

cd "$PWD/retdec-regression-tests-framework"
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/Windows/ignore_Debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bugs.bin2llvmir-type-recovery-analysis-segfault
bugs.issue-184-elf-thunks
bugs.issue-197-empty-selected-fnc-body
bugs.llvmir-syntax-expected-top-level-entity
bugs.phi-node-error-replaceAllUsesWith
bugs.segments-assert.segments_in_elf_arm
features.invalid-entrypoint-decompilation
features.macho-archives
features.macho
features.new-static-code-signatures
features.raw.binaries
samples.bashbot
integration.float-operations
external.unit-tests
Empty file.
6 changes: 6 additions & 0 deletions .github/workflows/Windows/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set -x

IGNORE_TESTS=$(cat $1 | tr '\n' ',' | sed 's/,$//' | tr '.' '\\')

# We need to specify each path in Windows format.
WIN_PWD=D:$(echo $PWD | sed 's/^\/d//' | sed 's/\//\\/g')

Expand All @@ -9,6 +13,8 @@ clang_dir = $WIN_PWD\\clang
tests_root_dir = $WIN_PWD\\retdec-regression-tests
; Path to the RetDec's installation directory.
retdec_install_dir = $WIN_PWD\\install
; Exclude directories
excluded_dirs = $IGNORE_TESTS
EOF

cd "$PWD/retdec-regression-tests-framework"
Expand Down
Empty file.
Empty file.
7 changes: 6 additions & 1 deletion .github/workflows/macOS/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/bash

set -x

IGNORE_TESTS=$(cat $1 | tr '\n' ',' | sed 's/,$//' | tr '.' '/')

cat <<EOF > $PWD/retdec-regression-tests-framework/config_local.ini
[runner]
; Path to the extracted Clang package containing subdirectories such as bin, include, lib, share.
Expand All @@ -19,7 +23,8 @@ retdec_install_dir = $PWD/install
; (https://github.com/avast/retdec/issues/213). So, we decided to skip tests that
; compile output C files when running regression tests on macOS.
skip_c_compilation_tests = 0
; Exclude directories
excluded_dirs = $IGNORE_TESTS
EOF

cd "$PWD/retdec-regression-tests-framework"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/retdec-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ jobs:
shell: bash

- name: Run Tests
run: bash "${WORKFLOWS_DIR}/${RUNNER_OS}/run-tests.sh"

run: bash "${WORKFLOWS_DIR}/${RUNNER_OS}/run-tests.sh" "${WORKFLOWS_DIR}/${RUNNER_OS}/ignore_${{ matrix.type }}"

# Prepare files for publishing/release. The resulting structure:
# RetDec-OSType-Release
Expand Down

0 comments on commit e149c9b

Please sign in to comment.