Skip to content

Commit

Permalink
up test for memory option #166
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierCladellas committed Dec 20, 2024
1 parent d00c79c commit f0affb0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/configtest/test_commandBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def test_buildExecutionMode(self,cmd_builder,parser):
def test_buildCommand(self,cmd_builder,machine_config,parser):
"""Tests the buildCommand method of the CommandBuilder"""
timeout = "0-00:01:00"
memory = "250G"
executable ="test_executable"
use_case ="test_use_case"

Expand All @@ -127,10 +128,11 @@ def test_buildCommand(self,cmd_builder,machine_config,parser):
f"--exec-policy={machine_config.execution_policy} "
f"--prefix={machine_config.reframe_base_dir} "
f"--report-file={str(os.path.join(report_folder_path,'reframe_report.json'))} "
f"-J '#SBATCH --time={timeout}' "
f"-J time={timeout} "
f"-J mem={memory} "
f"--perflogdir={os.path.join(machine_config.reframe_base_dir,'logs')} "
)
expected_command += "-" + "v"*parser.args.verbose if parser.args.verbose else ""
expected_command += " --dry-run" if parser.args.dry_run else " -r"

assert expected_command == cmd_builder.buildCommand(timeout)
assert expected_command == cmd_builder.buildCommand(timeout,memory)

0 comments on commit f0affb0

Please sign in to comment.