From cb0445e0b4b1b5ce59c41117b714d9f717203ffc Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Tue, 14 Nov 2023 17:04:33 +0100 Subject: [PATCH] test: use CVMFS in the PilotWrapper tests' containers --- .github/workflows/pilotWrapper.yml | 13 +++++++++++-- .../Test_GenerateAndExecutePilotWrapper.py | 9 ++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pilotWrapper.yml b/.github/workflows/pilotWrapper.yml index 4e0937e24e8..eb0840af82d 100644 --- a/.github/workflows/pilotWrapper.yml +++ b/.github/workflows/pilotWrapper.yml @@ -15,11 +15,20 @@ jobs: - 2.7.13 - 3.6.8 - 3.11.4 + pilot_branch: + - master + - devel steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + + - name: Test CernVM-FS + run: ls /cvmfs/dirac.egi.eu + - name: Fail-fast for outdated pipelines run: .github/workflows/fail-fast.sh + - name: prepare environment run: | conda config --set add_pip_as_python_dependency false @@ -28,4 +37,4 @@ jobs: run: | cp tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py . eval "$(conda shell.bash hook)" && conda activate python_${{ matrix.python }} - python Test_GenerateAndExecutePilotWrapper.py file://${{ github.workspace }}/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py + python Test_GenerateAndExecutePilotWrapper.py file://${{ github.workspace }}/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py ${{ matrix.pilot_branch }} diff --git a/tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py b/tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py index feb12796cdd..af020553f34 100644 --- a/tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py +++ b/tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py @@ -17,12 +17,10 @@ # python Test_GenerateAndExecutePilotWrapper.py url://to_PilotWrapper.py -from __future__ import print_function -from __future__ import absolute_import -from __future__ import division +from __future__ import absolute_import, division, print_function -import sys import os +import sys import time # 1) gets the (DIRAC-free) PilotWrapper.py @@ -41,6 +39,7 @@ rf = url_library_urlopen(sys.argv[1], context=context) else: rf = url_library_urlopen(sys.argv[1]) +pilotBranch = sys.argv[2] with open("PilotWrapper.py", "wb") as pj: pj.write(rf.read()) @@ -53,7 +52,7 @@ res = pilotWrapperScript( pilotOptions="--setup=CI -N ce.dirac.org -Q DIRACQUEUE -n DIRAC.CI.ORG --pythonVersion=3 --debug", - location="diracproject.web.cern.ch/diracproject/tars/Pilot/DIRAC/master/,wrong.cern.ch", + location="diracproject.web.cern.ch/diracproject/tars/Pilot/DIRAC/" + pilotBranch + "/,wrong.cern.ch", ) with open("pilot-wrapper.sh", "wb") as pj: