Skip to content

Commit

Permalink
Merge pull request #7485 from fstagni/90_addARMtest
Browse files Browse the repository at this point in the history
[9.0] add ARM mtest
  • Loading branch information
fstagni committed Feb 27, 2024
2 parents e5f3a47 + a2d722c commit 4941a7a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/DIRAC/Resources/Computing/SSHBatchComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
directly through ssh
"""
import os
import socket
import stat
from urllib.parse import urlparse

from DIRAC import S_ERROR, S_OK, rootPath
from DIRAC import S_ERROR, S_OK
from DIRAC.Resources.Computing.PilotBundle import bundleProxy, writeScript
from DIRAC.Resources.Computing.SSHComputingElement import SSHComputingElement
from DIRAC.WorkloadManagementSystem.Client import PilotStatus
Expand Down
13 changes: 4 additions & 9 deletions src/DIRAC/Resources/Computing/SSHComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,17 @@
import shutil
import stat
import uuid
from urllib.parse import urlparse
from urllib.parse import quote
from urllib.parse import unquote
from shlex import quote as shlex_quote
from urllib.parse import quote, unquote, urlparse

import pexpect

import DIRAC
from DIRAC import S_OK, S_ERROR
from DIRAC import gLogger

from DIRAC import S_ERROR, S_OK, gLogger
from DIRAC.Core.Utilities.List import breakListIntoChunks, uniqueElements
from DIRAC.Resources.Computing.BatchSystems.executeBatch import executeBatchContent
from DIRAC.Resources.Computing.ComputingElement import ComputingElement
from DIRAC.Resources.Computing.PilotBundle import bundleProxy, writeScript
from DIRAC.Resources.Computing.BatchSystems.executeBatch import executeBatchContent
from DIRAC.Core.Utilities.List import uniqueElements
from DIRAC.Core.Utilities.List import breakListIntoChunks


class SSH:
Expand Down
5 changes: 2 additions & 3 deletions src/DIRAC/Resources/Computing/SingularityComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
See the Configuration/Resources/Computing documention for details on
where to set the option parameters.
"""
import io
import json
import os
import re
Expand All @@ -20,9 +19,9 @@
import tempfile

import DIRAC
from DIRAC import S_OK, S_ERROR, gConfig, gLogger
from DIRAC.Core.Utilities.Subprocess import systemCall
from DIRAC import S_ERROR, S_OK, gConfig, gLogger
from DIRAC.ConfigurationSystem.Client.Helpers import Operations
from DIRAC.Core.Utilities.Subprocess import systemCall
from DIRAC.Core.Utilities.ThreadScheduler import gThreadScheduler
from DIRAC.Resources.Computing.ComputingElement import ComputingElement
from DIRAC.Resources.Storage.StorageElement import StorageElement
Expand Down
16 changes: 16 additions & 0 deletions src/DIRAC/tests/Utilities/testJobDefinitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,22 @@ def helloWorldSSHBatch():
return endOfAllJobs(J)


def helloWorldARM():
"""simple hello world job to DIRAC.ARM.ch"""

J = baseToAllJobs("helloWorldARM")
try:
J.setInputSandbox([find_all("exe-script.py", rootPath, "DIRAC/tests/Workflow")[0]])
except IndexError:
try:
J.setInputSandbox([find_all("exe-script.py", ".", "DIRAC/tests/Workflow")[0]])
except IndexError: # we are in Jenkins
J.setInputSandbox([find_all("exe-script.py", os.environ["WORKSPACE"], "DIRAC/tests/Workflow")[0]])
J.setExecutable("exe-script.py", "", "helloWorld.log")
J.setDestination("DIRAC.ARM.ch")
return endOfAllJobs(J)


def helloWorldCloudCE():
"""simple hello world job to Cloud at Imperial College using SiteDirector"""

Expand Down
4 changes: 4 additions & 0 deletions tests/System/unitTestUserJobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ def test_submit(self):
self.assertTrue(res["OK"])
jobsSubmittedList.append(res["Value"])

res = helloWorldARM()
self.assertTrue(res["OK"])
jobsSubmittedList.append(res["Value"])

res = mpJob()
self.assertTrue(res["OK"])
jobsSubmittedList.append(res["Value"])
Expand Down

0 comments on commit 4941a7a

Please sign in to comment.