From fb8c735ade6a7a6e7cf3d35463dcb7bf43d5974f Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Mon, 27 Jan 2020 10:17:40 +0100 Subject: [PATCH 1/2] Use colon separated path convenction in CI --- Jenkinsfile | 6 ------ ci-scripts/ci-runner.bash | 12 ++++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ce4215405c..0b57a4ed08 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -92,15 +92,9 @@ stage('Unittest') { script: """${loginBash} echo \$SCRATCH""").trim() def reframeDir = "${scratch}/${dirPrefix}-${machineName}-${uniqueID}" - def moduleDefinition = '' - if (machineName == 'leone') { - moduleDefinition = '''module() { eval `/usr/bin/modulecmd bash $*`; } - export -f module''' - } dir(reframeDir) { checkout scm sh("""${loginBash} - ${moduleDefinition} bash ${reframeDir}/${bashScript} -f ${reframeDir} -i ''""") } } diff --git a/ci-scripts/ci-runner.bash b/ci-scripts/ci-runner.bash index 35dc0fc7af..f73a48f141 100644 --- a/ci-scripts/ci-runner.bash +++ b/ci-scripts/ci-runner.bash @@ -41,7 +41,7 @@ checked_exec() run_tutorial_checks() { - cmd="./bin/reframe -C tutorial/config/settings.py --exec-policy=async \ + cmd="./bin/reframe -C tutorial/config/settings.py \ --save-log-files -r -t tutorial $@" echo "Running tutorial checks with \`$cmd'" checked_exec $cmd @@ -49,7 +49,7 @@ run_tutorial_checks() run_user_checks() { - cmd="./bin/reframe -C config/cscs.py --exec-policy=async --save-log-files \ + cmd="./bin/reframe -C config/cscs.py --save-log-files \ -r --flex-alloc-nodes=2 -t production|benchmark $@" echo "Running user checks with \`$cmd'" checked_exec $cmd @@ -160,9 +160,9 @@ elif [ $CI_TUTORIAL -eq 1 ]; then grep -e '^tutorial/(?!config/).*\.py') ) if [ ${#tutorialchecks[@]} -ne 0 ]; then - tutorialchecks_path="" + tutorialchecks_path="-c " for check in ${tutorialchecks[@]}; do - tutorialchecks_path="${tutorialchecks_path} -c ${check}" + tutorialchecks_path="${tutorialchecks_path}:${check}" done echo "========================" @@ -197,9 +197,9 @@ else userchecks=( $(git diff origin/master...HEAD --name-only --oneline --no-merges | \ grep -e '^cscs-checks/.*\.py') ) if [ ${#userchecks[@]} -ne 0 ]; then - userchecks_path="" + userchecks_path="-c " for check in ${userchecks[@]}; do - userchecks_path="${userchecks_path} -c ${check}" + userchecks_path="${userchecks_path}:${check}" done echo "====================" From f66420336a7c1e90b8a7440ca7bb4a6423864509 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Mon, 27 Jan 2020 10:29:27 +0100 Subject: [PATCH 2/2] Join paths by : --- ci-scripts/ci-runner.bash | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ci-scripts/ci-runner.bash b/ci-scripts/ci-runner.bash index f73a48f141..492718925d 100644 --- a/ci-scripts/ci-runner.bash +++ b/ci-scripts/ci-runner.bash @@ -160,10 +160,7 @@ elif [ $CI_TUTORIAL -eq 1 ]; then grep -e '^tutorial/(?!config/).*\.py') ) if [ ${#tutorialchecks[@]} -ne 0 ]; then - tutorialchecks_path="-c " - for check in ${tutorialchecks[@]}; do - tutorialchecks_path="${tutorialchecks_path}:${check}" - done + tutorialchecks_path="-c $(IFS=: eval 'echo "${tutorialchecks[*]}"')" echo "========================" echo "Modified tutorial checks" @@ -197,10 +194,7 @@ else userchecks=( $(git diff origin/master...HEAD --name-only --oneline --no-merges | \ grep -e '^cscs-checks/.*\.py') ) if [ ${#userchecks[@]} -ne 0 ]; then - userchecks_path="-c " - for check in ${userchecks[@]}; do - userchecks_path="${userchecks_path}:${check}" - done + userchecks_path="-c $(IFS=: eval 'echo "${userchecks[*]}"')" echo "====================" echo "Modified user checks"