Commit 7a95e88c authored by Millian Poquet's avatar Millian Poquet
Browse files

[test] add SET_JOB_METADATA test

parent 7a4427f1
Pipeline #1281 failed with stages
in 6 minutes and 39 seconds
......@@ -329,5 +329,11 @@ add_test(pybatsim_tests
add_test(fewer_resources
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/test/test_fewer_resources.yaml
-bod /tmp/fewer_resources
-bod /tmp/batsim_tests/fewer_resources
-bwd ${CMAKE_SOURCE_DIR})
add_test(set_job_metadata
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/test/test_set_job_metadata.yaml
-bod /tmp/batsim_tests/set_job_metadata
-bwd ${CMAKE_SOURCE_DIR})
# This script should be called from Batsim's root directory
# If needed, the working directory of this script can be specified within this file
#base_working_directory: ~/proj/batsim
# If needed, the output directory of this script can be specified within this file
base_output_directory: /tmp/batsim_tests/set_job_metadata
base_variables:
batsim_dir: ${base_working_directory}
implicit_instances:
implicit:
sweep:
platform :
- {"name":"homo128", "filename":"${batsim_dir}/platforms/energy_platform_homogeneous_no_net_128.xml"}
workload :
- {"name":"tiny", "filename":"${batsim_dir}/workload_profiles/test_workload_profile.json"}
- {"name":"medium", "filename":"${batsim_dir}/workload_profiles/batsim_paper_workload_example.json"}
algo:
- {"name":"filler", "algo_name":"filler"}
generic_instance:
variables:
socket_port: "$((${instance_number} + 28000))"
timeout: 10
working_directory: ${base_working_directory}
output_directory: ${base_output_directory}/results/${algo[name]}_${workload[name]}_${platform[name]}
batsim_command: batsim -p ${platform[filename]} -w ${workload[filename]} -e ${output_directory}/out --mmax-workload --redis-prefix ${instance_id} --socket-endpoint="tcp://localhost:${socket_port}"
sched_command: batsched -v ${algo[algo_name]} --socket-endpoint="tcp://*:${socket_port}" --variant_options_filepath ${output_directory}/sched_input.json
commands_before_execution:
# Generate sched options
- |
#!/usr/bin/env bash
cat > ${output_directory}/sched_input.json << EOF
{
"set_job_metadata": true
}
EOF
commands_before_instances:
- ${batsim_dir}/test/is_batsim_dir.py ${base_working_directory}
- ${batsim_dir}/test/clean_output_dir.py ${base_output_directory}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment