Skip to content

Commit

Permalink
Merge pull request DIRACGrid#7293 from fstagni/pilotWrapper_v8_test
Browse files Browse the repository at this point in the history
[8.0] test: use CVMFS in the PilotWrapper tests' containers
  • Loading branch information
fstagni authored Nov 14, 2023
2 parents 2821b6a + cb0445e commit 16769a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/pilotWrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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())
Expand All @@ -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:
Expand Down

0 comments on commit 16769a7

Please sign in to comment.