Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in testkomodo #8844

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ jobs:
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Download shellcheck
id: get_shellcheck
run: |
sudo apt-get update
sudo apt-get install shellcheck
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
- name: Check testkomodo.sh
run: shellcheck -s bash ci/testkomodo.sh
shell: bash
28 changes: 14 additions & 14 deletions ci/testkomodo.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
copy_test_files () {
cp -r ${CI_SOURCE_ROOT}/tests ${CI_TEST_ROOT}
ln -s ${CI_SOURCE_ROOT}/test-data ${CI_TEST_ROOT}/test-data
cp -r "${CI_SOURCE_ROOT}"/tests "${CI_TEST_ROOT}"
ln -s "${CI_SOURCE_ROOT}"/test-data "${CI_TEST_ROOT}"/test-data

ln -s ${CI_SOURCE_ROOT}/src ${CI_TEST_ROOT}/src
ln -s "${CI_SOURCE_ROOT}"/src "${CI_TEST_ROOT}"/src

# Trick ERT to find a fake source root
mkdir ${CI_TEST_ROOT}/.git
mkdir "${CI_TEST_ROOT}"/.git

# Keep pytest configuration:
ln -s ${CI_SOURCE_ROOT}/pyproject.toml ${CI_TEST_ROOT}/pyproject.toml
ln -s "${CI_SOURCE_ROOT}"/pyproject.toml "${CI_TEST_ROOT}"/pyproject.toml
}

install_test_dependencies () {
Expand Down Expand Up @@ -38,40 +38,40 @@ start_tests () {

export ECL_SKIP_SIGNAL=ON

pushd ${CI_TEST_ROOT}/tests/ert
pushd "${CI_TEST_ROOT}"/tests/ert

set +e

pytest --eclipse-simulator -n logical --show-capture=stderr -v --max-worker-restart 0 \
-m "not limit_memory and not requires_window_manager" --benchmark-disable --dist loadgroup
retun_code_0=$?
return_code_0=$?
pytest --eclipse-simulator -v --mpl \
-m "not limit_memory and requires_window_manager" --benchmark-disable
retun_code_1=$?
return_code_1=$?

# Restricting the number of threads utilized by numpy to control memory consumption, as some tests evaluate memory usage and additional threads increase it.
export OMP_NUM_THREADS=1

pytest -n 2 --durations=0 -m "limit_memory" --memray
retun_code_2=$?
return_code_2=$?

unset OMP_NUM_THREADS

basetemp=$(mktemp -d -p $_ERT_TESTS_SHARED_TMP)
pytest --timeout=3600 -v --$_ERT_TESTS_QUEUE_SYSTEM --basetemp="$basetemp" unit_tests/scheduler
retun_code_3=$?
basetemp=$(mktemp -d -p "$_ERT_TESTS_SHARED_TMP")
pytest --timeout=3600 -v --"$_ERT_TESTS_QUEUE_SYSTEM" --basetemp="$basetemp" unit_tests/scheduler
return_code_3=$?
rm -rf "$basetemp" || true

popd

run_ert_with_opm
retun_code_4=$?
return_code_4=$?

set -e

# We error if one or more returncodes are nonzero
for code in $return_code_0 $return_code_1 $return_code_2 $return_code_3 $return_code_4; do
if [ $code -ne 0 ]; then
if [ "$code" -ne 0 ]; then
echo "One or more tests failed."
return 1
fi
Expand Down