Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ jobs:
timeout-minutes: 5
run: >
flux start
python -m unittest tests/test_fluxpythonspawner.py tests/test_fluxjobexecutor_plot.py tests/test_fluxjobexecutor.py tests/test_fluxclusterexecutor.py;
python -m unittest tests/task_scheduler/interactive/test_spawner_flux.py tests/executor/test_flux_job_plot.py tests/executor/test_flux_job.py tests/executor/test_flux_cluster.py;

unittest_flux_openmpi:
needs: [black]
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
timeout-minutes: 5
run: >
flux start
coverage run -a -m unittest tests/test_fluxpythonspawner.py tests/test_fluxjobexecutor_plot.py tests/test_fluxjobexecutor.py tests/test_fluxclusterexecutor.py;
coverage run -a -m unittest tests/task_scheduler/interactive/test_spawner_flux.py tests/executor/test_flux_job_plot.py tests/executor/test_flux_job.py tests/executor/test_flux_cluster.py;
coverage report;
coverage xml
env:
Expand Down Expand Up @@ -292,8 +292,8 @@ jobs:
cd tests
sinfo -o "%n %e %m %a %c %C"
srun --mpi=list
python -m unittest test_slurmjobexecutor.py
python -m unittest test_slurmclusterexecutor.py
python -m unittest executor/test_slurm_job.py
python -m unittest tests/executor/test_slurm_cluster.py

unittest_mpich:
needs: [black]
Expand Down
Empty file added tests/backend/__init__.py
Empty file.
Empty file added tests/executor/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_single_task(self):
)

def test_output_files_cwd(self):
dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
os.makedirs(dirname, exist_ok=True)
file_stdout = os.path.join(dirname, "flux.out")
file_stderr = os.path.join(dirname, "flux.err")
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from executorlib.standalone.interactive.spawner import MpiExecSpawner


executable_path = os.path.join(os.path.dirname(__file__), "executables", "count.py")
executable_path = os.path.join(os.path.dirname(__file__), "..", "executables", "count.py")


def init_process():
Expand Down
File renamed without changes.
Empty file added tests/standalone/__init__.py
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def test_interface_mpi(self):
sys.executable,
os.path.abspath(
os.path.join(
__file__,
os.path.dirname(__file__),
"..",
"..",
"..",
"src",
Expand Down Expand Up @@ -77,7 +78,8 @@ def test_interface_serial_without_debug(self):
sys.executable,
os.path.abspath(
os.path.join(
__file__,
os.path.dirname(__file__),
"..",
"..",
"..",
"src",
Expand Down Expand Up @@ -108,7 +110,8 @@ def test_interface_serial_with_debug(self):
sys.executable,
os.path.abspath(
os.path.join(
__file__,
os.path.dirname(__file__),
"..",
"..",
"..",
"src",
Expand Down Expand Up @@ -170,7 +173,8 @@ def test_interface_serial_with_stopped_process(self):
sys.executable,
os.path.abspath(
os.path.join(
__file__,
os.path.dirname(__file__),
"..",
"..",
"..",
"src",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ def test_executor_dependence_error(self):
fs.result()

def test_executor_working_directory(self):
cwd = os.path.join(os.path.dirname(__file__), "executables")
cwd = os.path.join(os.path.dirname(__file__), "..", "..", "executables")
with FileTaskScheduler(
resource_dict={"cwd": cwd}, execute_function=execute_in_subprocess
) as exe:
fs1 = exe.submit(list_files_in_working_directory)
self.assertEqual(fs1.result(), os.listdir(cwd))

def test_executor_error(self):
cwd = os.path.join(os.path.dirname(__file__), "executables")
cwd = os.path.join(os.path.dirname(__file__), "..", "..", "executables")
with FileTaskScheduler(
resource_dict={"cwd": cwd}, execute_function=execute_in_subprocess
) as exe:
Expand All @@ -92,9 +92,9 @@ def test_executor_error(self):
self.assertEqual(len(os.listdir(cwd)), 1)

def test_executor_error_file(self):
cwd = os.path.join(os.path.dirname(__file__), "executables")
cwd = os.path.join(os.path.dirname(__file__), "..", "..", "executables")
with FileTaskScheduler(
resource_dict={"cwd": cwd, "error_log_file": "error.out"},
resource_dict={"cwd": cwd, "error_log_file": "error.out"},
execute_function=execute_in_subprocess
) as exe:
fs1 = exe.submit(get_error, a=1)
Expand Down Expand Up @@ -224,8 +224,8 @@ def test_execute_in_subprocess(self):
self.assertIsNone(terminate_subprocess(task=process))

def test_execute_in_subprocess_errors(self):
file_name = os.path.abspath(os.path.join(__file__, "..", "executorlib_cache", "test.h5"))
os.makedirs(os.path.dirname(file_name))
file_name = os.path.abspath(os.path.join(os.path.dirname(__file__), "executorlib_cache", "test.h5"))
os.makedirs(os.path.dirname(file_name), exist_ok=True)
with open(file_name, "w") as f:
f.write("test")
with self.assertRaises(ValueError):
Expand Down
Empty file.
Loading