Skip to content

Commit 7af8ffd

Browse files
authored
Merge pull request #37 from norlab-ulaval/test-fix-slurm-job-dry-run-test-stability
Fix slurm dry run test stability
2 parents ff3b87c + 7fff7c5 commit 7af8ffd

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/lib/core/execute/project_validate.slurm.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,14 @@ function dna::project_validate_slurm() {
162162

163163
n2st::print_msg "Completed build in dry-run mode tests"
164164

165-
# ....Dry-run SLURM/Mamba jobs.....................................................................
165+
# ....Dry-run SLURM/Mamba jobs on native aarch.....................................................
166166
n2st::print_formated_script_header "Dry-run slurm job" "${line_format}" "${line_style}"
167167
pushd "$(pwd)" >/dev/null || exit 1
168168

169+
# Execute slurm joc dry-run tests
169170
slurm_job_file_name=()
170171
for each_file_path in "${SUPER_PROJECT_ROOT:?err}"/"${slurm_script_job_path}"/slurm_job.*.bash ; do
171-
each_file_name="$(basename $each_file_path)"
172+
each_file_name="$(basename "${each_file_path}")"
172173
slurm_job_file_name+=("$each_file_name")
173174
done
174175

tests/tests_dryrun_and_tests_scripts/test_project_validate.slurm.bash

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ function dna::test_teardown_callback() {
1212
}
1313
trap dna::test_teardown_callback EXIT
1414

15+
# ====begin========================================================================================
16+
17+
# Re-build slurm image (required on TC to prevent ownership error related to agent switching)
1518
cd "${DNA_MOCK_SUPER_PROJECT_ROOT:?err}" || exit 1
19+
bash "${DNA_LIB_EXEC_PATH:?err}"/build.all.bash --service-names project-slurm -- --no-cache
1620

17-
# ====begin========================================================================================
1821
# Execute project validate slurm script
1922
# Note: the "--include-multiarch" flag affect only the dry-run config check, not the slurm job check
23+
cd "${DNA_MOCK_SUPER_PROJECT_ROOT:?err}" || exit 1
2024
bash "${DNA_LIB_EXEC_PATH:?err}"/project_validate.slurm.bash --include-multiarch "slurm_jobs"
2125

2226
## ....Teardown.....................................................................................

0 commit comments

Comments
 (0)