Skip to content
Snippets Groups Projects
Commit 2a918511 authored by Mael Madon's avatar Mael Madon
Browse files

test: added new tests checking against expected logs"

parent 428d2168
Branches master_upstream
Tags
No related merge requests found
job_id,workload_name,profile,submission_time,requested_number_of_resources,requested_time,success,final_state,starting_time,execution_time,finish_time,waiting_time,turnaround_time,stretch,allocated_resources,consumed_energy,metadata
8,w0,blast_vm_xlarge,0.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,2213.000000,2213.000000,0.000000,2213.000000,1.000000,0,480221.000000,""
0,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,0,763840.000000,""
1,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,1,763840.000000,""
2,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,1,763840.000000,""
3,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,1,763840.000000,""
10,w0,blast_vm_xlarge,1000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,2213.000000,2213.000000,4426.000000,1213.000000,3426.000000,1.548125,0,444887.000000,""
11,w0,blast_vm_xlarge,6000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,6000.000000,2213.000000,8213.000000,0.000000,2213.000000,1.000000,0,480221.000000,""
9,w0,blast_vm_xlarge,6000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,6000.000000,2213.000000,8213.000000,0.000000,2213.000000,1.000000,1,480221.000000,""
4,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6000.000000,7043.000000,13043.000000,0.000000,7043.000000,1.000000,0,1151591.000000,""
5,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6000.000000,7043.000000,13043.000000,0.000000,7043.000000,1.000000,0,1151591.000000,""
6,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6000.000000,7043.000000,13043.000000,0.000000,7043.000000,1.000000,1,1151591.000000,""
7,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6000.000000,7043.000000,13043.000000,0.000000,7043.000000,1.000000,1,1151591.000000,""
12,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14000.000000,3520.000000,17520.000000,0.000000,3520.000000,1.000000,0,763840.000000,""
13,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14000.000000,3520.000000,17520.000000,0.000000,3520.000000,1.000000,0,763840.000000,""
14,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14000.000000,3520.000000,17520.000000,0.000000,3520.000000,1.000000,0,763840.000000,""
15,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14000.000000,3520.000000,17520.000000,0.000000,3520.000000,1.000000,1,489280.000000,""
job_id,workload_name,profile,submission_time,requested_number_of_resources,requested_time,success,final_state,starting_time,execution_time,finish_time,waiting_time,turnaround_time,stretch,allocated_resources,consumed_energy,metadata
8,w0,blast_vm_xlarge,0.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,2213.000000,2213.000000,0.000000,2213.000000,1.000000,0,480221.000000,""
0,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,0,763840.000000,""
1,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,1,763840.000000,""
2,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,1,763840.000000,""
3,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,1,763840.000000,""
10,w0,blast_vm_xlarge,1000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,2213.000000,2213.000000,4426.000000,1213.000000,3426.000000,1.548125,0,444887.000000,""
11,w0,blast_vm_xlarge,6000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,6150.000000,2213.000000,8363.000000,150.000000,2363.000000,1.067781,0,480221.000000,""
9,w0,blast_vm_xlarge,6000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,6150.000000,2213.000000,8363.000000,150.000000,2363.000000,1.067781,1,480221.000000,""
4,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6150.000000,7043.000000,13193.000000,150.000000,7193.000000,1.021298,0,1151591.000000,""
5,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6150.000000,7043.000000,13193.000000,150.000000,7193.000000,1.021298,0,1151591.000000,""
6,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6150.000000,7043.000000,13193.000000,150.000000,7193.000000,1.021298,1,1151591.000000,""
7,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,6150.000000,7043.000000,13193.000000,150.000000,7193.000000,1.021298,1,1151591.000000,""
12,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14150.000000,3520.000000,17670.000000,150.000000,3670.000000,1.042614,0,763840.000000,""
13,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14150.000000,3520.000000,17670.000000,150.000000,3670.000000,1.042614,0,763840.000000,""
14,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14150.000000,3520.000000,17670.000000,150.000000,3670.000000,1.042614,0,763840.000000,""
15,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,14150.000000,3520.000000,17670.000000,150.000000,3670.000000,1.042614,1,489280.000000,""
job_id,workload_name,profile,submission_time,requested_number_of_resources,requested_time,success,final_state,starting_time,execution_time,finish_time,waiting_time,turnaround_time,stretch,allocated_resources,consumed_energy,metadata
0,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,0.000000,3520.000000,3520.000000,0.000000,3520.000000,1.000000,0,489280.000000,""
1,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,3520.000000,3520.000000,7040.000000,3520.000000,7040.000000,2.000000,0,489280.000000,""
2,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,7040.000000,3520.000000,10560.000000,7040.000000,10560.000000,3.000000,0,489280.000000,""
3,w0,blast_vm_large,0.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,10560.000000,3520.000000,14080.000000,10560.000000,14080.000000,4.000000,0,489280.000000,""
8,w0,blast_vm_xlarge,0.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,14080.000000,2213.000000,16293.000000,14080.000000,16293.000000,7.362404,0,393914.000000,""
10,w0,blast_vm_xlarge,1000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,16293.000000,2213.000000,18506.000000,15293.000000,17506.000000,7.910529,0,393914.000000,""
11,w0,blast_vm_xlarge,6000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,18506.000000,2213.000000,20719.000000,12506.000000,14719.000000,6.651152,0,393914.000000,""
4,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,20719.000000,7043.000000,27762.000000,14719.000000,21762.000000,3.089876,0,841638.500000,""
5,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,27762.000000,7043.000000,34805.000000,21762.000000,28805.000000,4.089876,0,841638.500000,""
6,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,34805.000000,7043.000000,41848.000000,28805.000000,35848.000000,5.089876,0,841638.500000,""
7,w0,blast_vm_medium,6000.000000,2,-1.000000,1,COMPLETED_SUCCESSFULLY,41848.000000,7043.000000,48891.000000,35848.000000,42891.000000,6.089876,0,841638.500000,""
9,w0,blast_vm_xlarge,6000.000000,8,-1.000000,1,COMPLETED_SUCCESSFULLY,48891.000000,2213.000000,51104.000000,42891.000000,45104.000000,20.381383,0,393914.000000,""
12,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,51104.000000,3520.000000,54624.000000,37104.000000,40624.000000,11.540909,0,489280.000000,""
13,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,54624.000000,3520.000000,58144.000000,40624.000000,44144.000000,12.540909,0,489280.000000,""
14,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,58144.000000,3520.000000,61664.000000,44144.000000,47664.000000,13.540909,0,489280.000000,""
15,w0,blast_vm_large,14000.000000,4,-1.000000,1,COMPLETED_SUCCESSFULLY,61664.000000,3520.000000,65184.000000,47664.000000,51184.000000,14.540909,0,489280.000000,""
......@@ -2,6 +2,7 @@
import os
import os.path
import subprocess
import filecmp
from collections import namedtuple
class RobinInstance(object):
......@@ -52,3 +53,11 @@ def init_instance(test_name):
create_dir_rec_if_needed(output_dir)
return (output_dir, robin_filename, schedconf_filename)
def has_expected_output(test_file):
return os.path.exists('test/expected_log/' + test_file + '_jobs.csv')
def equals_expected_output(test_file):
expected = 'test/expected_log/' + test_file + '_jobs.csv'
obtained = 'test-out/' + test_file + '_jobs.csv'
return filecmp.cmp(expected, obtained)
\ No newline at end of file
......@@ -16,6 +16,9 @@ def test_multicore_filler(platform_multiC, workload_multiC):
ret = run_robin(robin_filename)
assert ret.returncode == 0
if has_expected_output(test_name):
assert equals_expected_output(test_name)
def test_bin_packing(platform_multiC, workload_multiC):
test_name = f'bin_packing-{platform_multiC.name}-{workload_multiC.name}'
output_dir, robin_filename, _ = init_instance(test_name)
......@@ -32,6 +35,9 @@ def test_bin_packing(platform_multiC, workload_multiC):
ret = run_robin(robin_filename)
assert ret.returncode == 0
if has_expected_output(test_name):
assert equals_expected_output(test_name)
def test_bin_packing_energy(platform_multiC, workload_multiC):
test_name = f'bin_packing_energy-{platform_multiC.name}-{workload_multiC.name}'
output_dir, robin_filename, _ = init_instance(test_name)
......@@ -46,4 +52,7 @@ def test_bin_packing_energy(platform_multiC, workload_multiC):
instance.to_file(robin_filename)
ret = run_robin(robin_filename)
assert ret.returncode == 0
\ No newline at end of file
assert ret.returncode == 0
if has_expected_output(test_name):
assert equals_expected_output(test_name)
\ No newline at end of file
from helper import *
def test_expected_output():
for log_file in os.listdir('test/expected_log'):
expected = 'test/expected_log/' + log_file
obtained = 'test-out/' + log_file
assert filecmp.cmp(expected, obtained)
\ No newline at end of file
......@@ -6,14 +6,18 @@
{"id": "1", "profile": "blast_vm_large", "res": 4, "subtime": 0},
{"id": "2", "profile": "blast_vm_large", "res": 4, "subtime": 0},
{"id": "3", "profile": "blast_vm_large", "res": 4, "subtime": 0},
{"id": "4", "profile": "blast_vm_medium", "res": 2, "subtime": 2000},
{"id": "5", "profile": "blast_vm_medium", "res": 2, "subtime": 2000},
{"id": "6", "profile": "blast_vm_medium", "res": 2, "subtime": 2000},
{"id": "7", "profile": "blast_vm_medium", "res": 2, "subtime": 2000},
{"id": "8", "profile": "blast_vm_xlarge", "res": 8, "subtime": 1000},
{"id": "9", "profile": "blast_vm_xlarge", "res": 8, "subtime": 1000},
{"id": "4", "profile": "blast_vm_medium", "res": 2, "subtime": 6000},
{"id": "5", "profile": "blast_vm_medium", "res": 2, "subtime": 6000},
{"id": "6", "profile": "blast_vm_medium", "res": 2, "subtime": 6000},
{"id": "7", "profile": "blast_vm_medium", "res": 2, "subtime": 6000},
{"id": "8", "profile": "blast_vm_xlarge", "res": 8, "subtime": 0},
{"id": "9", "profile": "blast_vm_xlarge", "res": 8, "subtime": 6000},
{"id": "10", "profile": "blast_vm_xlarge", "res": 8, "subtime": 1000},
{"id": "11", "profile": "blast_vm_xlarge", "res": 8, "subtime": 1000}
{"id": "11", "profile": "blast_vm_xlarge", "res": 8, "subtime": 6000},
{"id": "12", "profile": "blast_vm_large", "res": 4, "subtime": 14000},
{"id": "13", "profile": "blast_vm_large", "res": 4, "subtime": 14000},
{"id": "14", "profile": "blast_vm_large", "res": 4, "subtime": 14000},
{"id": "15", "profile": "blast_vm_large", "res": 4, "subtime": 14000}
],
"profiles": {
"blast_vm_large": {"com": 0.0, "cpu": 1.657216e14, "type": "parallel_homogeneous_total"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment