diff --git a/tests/pipeline/CMakeLists.txt b/tests/pipeline/CMakeLists.txt index bf0de63b5..98f9d3fa2 100644 --- a/tests/pipeline/CMakeLists.txt +++ b/tests/pipeline/CMakeLists.txt @@ -254,3 +254,16 @@ add_crash_test(crash_test_sigtrap 5 134) add_crash_test(crash_test_sigbus 7 134) add_crash_test(crash_test_sigfpe 8 134) + +# +# Automatic migration tests +# + +revng_add_test( + NAME + automatic_migration_test + COMMAND + bash + ${CMAKE_CURRENT_SOURCE_DIR}/run_migration_test.sh + WORKING_DIRECTORY + ${CMAKE_BINARY_DIR}) diff --git a/tests/pipeline/run_migration_test.sh b/tests/pipeline/run_migration_test.sh new file mode 100755 index 000000000..6a02bc175 --- /dev/null +++ b/tests/pipeline/run_migration_test.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# +# This file is distributed under the MIT License. See LICENSE.md for details. +# +set -euo pipefail + +log() { + echo "$@" >&2 +} + +log_file() { + cat "$@" >&2 +} + +TEST_DIR=$(mktemp -d) + +trap 'rm --recursive --force "${TEST_DIR}"' EXIT + +mkdir --parents "${TEST_DIR}"/resume-dir/context + +cat > "${TEST_DIR}"/resume-dir/context/model.yml <