Skip to content
Snippets Groups Projects
Commit 78db367e authored by Millian Poquet's avatar Millian Poquet
Browse files

[test] move init_instance to helper

parent 1edb6250
No related branches found
No related tags found
No related merge requests found
......@@ -44,3 +44,12 @@ def create_dir_rec_if_needed(dirname):
def run_robin(filename):
return subprocess.run(['robin', filename])
def init_instance(test_name):
output_dir = os.path.abspath(f'test-out/{test_name}')
robin_filename = os.path.abspath(f'test-instances/{test_name}.yaml')
batconf_filename = f'{output_dir}/batconf.json'
schedconf_filename = f'{output_dir}/schedconf.json'
create_dir_rec_if_needed(output_dir)
return (output_dir, robin_filename, batconf_filename, schedconf_filename)
......@@ -2,22 +2,10 @@
import itertools
import json
import glob
import os
import os.path
import unittest
from helper import *
def init_instance(test_name):
output_dir = os.path.abspath(f'test-out/{test_name}')
robin_filename = os.path.abspath(f'test-instances/{test_name}.yaml')
batconf_filename = f'{output_dir}/batconf.json'
schedconf_filename = f'{output_dir}/schedconf.json'
create_dir_rec_if_needed(output_dir)
return (output_dir, robin_filename, batconf_filename, schedconf_filename)
def test_basic_algo_no_param(platform, workload, basic_algo_no_param):
test_name = f'{basic_algo_no_param}-{platform.name}-{workload.name}'
output_dir, robin_filename, _, _ = init_instance(test_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment