[why] We will add more spec cases, so it should give each type of cases for different input and output directories
[how] Create merge_yaml and submit merge_yaml/*.yaml
Signed-off-by: Hu XueJiao 1034502035@qq.com --- spec/submit_spec.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/spec/submit_spec.rb b/spec/submit_spec.rb index 983d050e..b2ad7168 100644 --- a/spec/submit_spec.rb +++ b/spec/submit_spec.rb @@ -34,6 +34,21 @@ describe 'submit job spec' do ] system(*submit_cmd) traverse_file(output_dir) + end + end + it 'merge yaml spec' do + Dir.glob("#{LKP_SRC}/spec/submit/merge_yaml/*.yaml").each do |yaml_file| + job_name = File.basename(yaml_file, '.yaml') + output_dir = "#{LKP_SRC}/spec/submit/merge_yaml/#{job_name}/output" + submit_cmd = [ + "#{LKP_SRC}/sbin/submit", + '-o', output_dir, + '-s', 'lab: spec_lab', + '-s', 'testbox: vm-2p8g--spec_submit', + yaml_file + ] + system(*submit_cmd) + traverse_file(output_dir) + end end - end end