Skip to content

Commit

Permalink
test: for the PilotWrapper tests use the artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Jul 11, 2024
1 parent 03c556d commit 2593623
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/pilotWrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,16 @@ 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 ${{ matrix.pilot_branch }}
# use github APIs to get the artifacts URLS from https://github.com/DIRACGrid/Pilot/, for those named Pilot_${{ matrix.pilot_branch }}
url=$(curl -s https://api.github.com/repos/DIRACGrid/Pilot/actions/artifacts | jq -r '.artifacts[] | select(.name == "Pilot_${{ matrix.pilot_branch }}") | .archive_download_url')
echo $url
# download and unzip the url above
curl -L $url --output Pilot_${{ matrix.pilot_branch }}.zip
mkdir -p ${{ matrix.pilot_branch }}/pilot
cp Pilot_${{ matrix.pilot_branch }}.zip ${{ matrix.pilot_branch }}/pilot
cd ${{ matrix.pilot_branch }}/pilot
unzip Pilot_${{ matrix.pilot_branch }}.zip
cd ../..
python Test_GenerateAndExecutePilotWrapper.py file://${{ github.workspace }}/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py file://${{ github.workspace }}/${{ matrix.pilot_branch }}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
rf = url_library_urlopen(sys.argv[1], context=context)
else:
rf = url_library_urlopen(sys.argv[1])
pilotBranch = sys.argv[2]
locc = sys.argv[2]

with open("PilotWrapper.py", "wb") as pj:
pj.write(rf.read())
Expand All @@ -52,7 +52,7 @@

res = pilotWrapperScript(
pilotOptions="--setup=CI -N ce.dirac.org -Q DIRACQUEUE -n DIRAC.CI.ORG --debug",
location="diracproject.web.cern.ch/diracproject/tars/Pilot/DIRAC/" + pilotBranch + "/,wrong.cern.ch",
location=locc + "/,wrong.cern.ch",
)

with open("pilot-wrapper.sh", "wb") as pj:
Expand Down

0 comments on commit 2593623

Please sign in to comment.