[why]
Originally submit_job is too complicated, it needs to be simplified.
Signed-off-by: Hu XueJiao <1034502035(a)qq.com>
---
.../job_on_fail-3000.yaml => job-3000.yaml} | 0
.../{job_on_fail.yaml => job.yaml} | 1 +
...68000000-1-65535-set_get-never-never.yaml} | 0
.../redis.yaml => link_jobs1/job.yaml} | 0
.../job-1000-2-100000ss-add.yaml} | 0
.../job-10000-2-100000ss-add.yaml} | 0
.../job-20-2-6000ss-cache.yaml} | 0
.../ftq.yaml => link_jobs2/job.yaml} | 0
...e.yaml => job-1-300-whetstone-double.yaml} | 0
...-300-shell1.yaml => job-3-300-shell1.yaml} | 0
.../matrix/{unixbench-spec.yaml => job.yaml} | 0
..._files-defaults.yaml => job-defaults.yaml} | 0
spec/submit/merge_yaml/job.yaml | 1 +
.../merge_yaml/merge_included_files.yaml | 1 -
...-add.yaml => job-1000-2-100000ss-add.yaml} | 0
...add.yaml => job-10000-2-100000ss-add.yaml} | 0
...-cache.yaml => job-20-2-6000ss-cache.yaml} | 0
.../separate_yaml/{ftq.yaml => job.yaml} | 0
spec/submit_spec.rb | 30 +++++--------------
19 files changed, 9 insertions(+), 24 deletions(-)
rename spec/submit/job_on_fail/{job_on_fail/job_on_fail-3000.yaml => job-3000.yaml} (100%)
rename spec/submit/job_on_fail/{job_on_fail.yaml => job.yaml} (97%)
rename spec/submit/{link_jobs/redis/redis-1-cs-localhost-even-1024-68000000-5-3-4-68000000-1-65535-set_get-never-never.yaml => link_jobs1/job-1-cs-localhost-even-1024-68000000-5-3-4-68000000-1-65535-set_get-never-never.yaml} (100%)
rename spec/submit/{link_jobs/redis.yaml => link_jobs1/job.yaml} (100%)
rename spec/submit/{link_jobs/ftq/ftq-1000-2-100000ss-add.yaml => link_jobs2/job-1000-2-100000ss-add.yaml} (100%)
rename spec/submit/{link_jobs/ftq/ftq-10000-2-100000ss-add.yaml => link_jobs2/job-10000-2-100000ss-add.yaml} (100%)
rename spec/submit/{link_jobs/ftq/ftq-20-2-6000ss-cache.yaml => link_jobs2/job-20-2-6000ss-cache.yaml} (100%)
rename spec/submit/{link_jobs/ftq.yaml => link_jobs2/job.yaml} (100%)
rename spec/submit/matrix/{unixbench-spec/unixbench-spec-1-300-whetstone-double.yaml => job-1-300-whetstone-double.yaml} (100%)
rename spec/submit/matrix/{unixbench-spec/unixbench-spec-3-300-shell1.yaml => job-3-300-shell1.yaml} (100%)
rename spec/submit/matrix/{unixbench-spec.yaml => job.yaml} (100%)
rename spec/submit/merge_yaml/{merge_included_files/merge_included_files-defaults.yaml => job-defaults.yaml} (100%)
create mode 100644 spec/submit/merge_yaml/job.yaml
delete mode 100644 spec/submit/merge_yaml/merge_included_files.yaml
rename spec/submit/separate_yaml/{ftq/ftq-1000-2-100000ss-add.yaml => job-1000-2-100000ss-add.yaml} (100%)
rename spec/submit/separate_yaml/{ftq/ftq-10000-2-100000ss-add.yaml => job-10000-2-100000ss-add.yaml} (100%)
rename spec/submit/separate_yaml/{ftq/ftq-20-2-6000ss-cache.yaml => job-20-2-6000ss-cache.yaml} (100%)
rename spec/submit/separate_yaml/{ftq.yaml => job.yaml} (100%)
diff --git a/spec/submit/job_on_fail/job_on_fail/job_on_fail-3000.yaml b/spec/submit/job_on_fail/job-3000.yaml
similarity index 100%
rename from spec/submit/job_on_fail/job_on_fail/job_on_fail-3000.yaml
rename to spec/submit/job_on_fail/job-3000.yaml
diff --git a/spec/submit/job_on_fail/job_on_fail.yaml b/spec/submit/job_on_fail/job.yaml
similarity index 97%
rename from spec/submit/job_on_fail/job_on_fail.yaml
rename to spec/submit/job_on_fail/job.yaml
index bf68ff40..5aaedf30 100644
--- a/spec/submit/job_on_fail/job_on_fail.yaml
+++ b/spec/submit/job_on_fail/job.yaml
@@ -2,4 +2,5 @@ suite: atomic
on_fail:
sleep: 3000
+
atomic:
diff --git a/spec/submit/link_jobs/redis/redis-1-cs-localhost-even-1024-68000000-5-3-4-68000000-1-65535-set_get-never-never.yaml b/spec/submit/link_jobs1/job-1-cs-localhost-even-1024-68000000-5-3-4-68000000-1-65535-set_get-never-never.yaml
similarity index 100%
rename from spec/submit/link_jobs/redis/redis-1-cs-localhost-even-1024-68000000-5-3-4-68000000-1-65535-set_get-never-never.yaml
rename to spec/submit/link_jobs1/job-1-cs-localhost-even-1024-68000000-5-3-4-68000000-1-65535-set_get-never-never.yaml
diff --git a/spec/submit/link_jobs/redis.yaml b/spec/submit/link_jobs1/job.yaml
similarity index 100%
rename from spec/submit/link_jobs/redis.yaml
rename to spec/submit/link_jobs1/job.yaml
diff --git a/spec/submit/link_jobs/ftq/ftq-1000-2-100000ss-add.yaml b/spec/submit/link_jobs2/job-1000-2-100000ss-add.yaml
similarity index 100%
rename from spec/submit/link_jobs/ftq/ftq-1000-2-100000ss-add.yaml
rename to spec/submit/link_jobs2/job-1000-2-100000ss-add.yaml
diff --git a/spec/submit/link_jobs/ftq/ftq-10000-2-100000ss-add.yaml b/spec/submit/link_jobs2/job-10000-2-100000ss-add.yaml
similarity index 100%
rename from spec/submit/link_jobs/ftq/ftq-10000-2-100000ss-add.yaml
rename to spec/submit/link_jobs2/job-10000-2-100000ss-add.yaml
diff --git a/spec/submit/link_jobs/ftq/ftq-20-2-6000ss-cache.yaml b/spec/submit/link_jobs2/job-20-2-6000ss-cache.yaml
similarity index 100%
rename from spec/submit/link_jobs/ftq/ftq-20-2-6000ss-cache.yaml
rename to spec/submit/link_jobs2/job-20-2-6000ss-cache.yaml
diff --git a/spec/submit/link_jobs/ftq.yaml b/spec/submit/link_jobs2/job.yaml
similarity index 100%
rename from spec/submit/link_jobs/ftq.yaml
rename to spec/submit/link_jobs2/job.yaml
diff --git a/spec/submit/matrix/unixbench-spec/unixbench-spec-1-300-whetstone-double.yaml b/spec/submit/matrix/job-1-300-whetstone-double.yaml
similarity index 100%
rename from spec/submit/matrix/unixbench-spec/unixbench-spec-1-300-whetstone-double.yaml
rename to spec/submit/matrix/job-1-300-whetstone-double.yaml
diff --git a/spec/submit/matrix/unixbench-spec/unixbench-spec-3-300-shell1.yaml b/spec/submit/matrix/job-3-300-shell1.yaml
similarity index 100%
rename from spec/submit/matrix/unixbench-spec/unixbench-spec-3-300-shell1.yaml
rename to spec/submit/matrix/job-3-300-shell1.yaml
diff --git a/spec/submit/matrix/unixbench-spec.yaml b/spec/submit/matrix/job.yaml
similarity index 100%
rename from spec/submit/matrix/unixbench-spec.yaml
rename to spec/submit/matrix/job.yaml
diff --git a/spec/submit/merge_yaml/merge_included_files/merge_included_files-defaults.yaml b/spec/submit/merge_yaml/job-defaults.yaml
similarity index 100%
rename from spec/submit/merge_yaml/merge_included_files/merge_included_files-defaults.yaml
rename to spec/submit/merge_yaml/job-defaults.yaml
diff --git a/spec/submit/merge_yaml/job.yaml b/spec/submit/merge_yaml/job.yaml
new file mode 100644
index 00000000..6d64c381
--- /dev/null
+++ b/spec/submit/merge_yaml/job.yaml
@@ -0,0 +1 @@
+<< : template_yaml
diff --git a/spec/submit/merge_yaml/merge_included_files.yaml b/spec/submit/merge_yaml/merge_included_files.yaml
deleted file mode 100644
index 8d459a32..00000000
--- a/spec/submit/merge_yaml/merge_included_files.yaml
+++ /dev/null
@@ -1 +0,0 @@
-<<: template_yaml
diff --git a/spec/submit/separate_yaml/ftq/ftq-1000-2-100000ss-add.yaml b/spec/submit/separate_yaml/job-1000-2-100000ss-add.yaml
similarity index 100%
rename from spec/submit/separate_yaml/ftq/ftq-1000-2-100000ss-add.yaml
rename to spec/submit/separate_yaml/job-1000-2-100000ss-add.yaml
diff --git a/spec/submit/separate_yaml/ftq/ftq-10000-2-100000ss-add.yaml b/spec/submit/separate_yaml/job-10000-2-100000ss-add.yaml
similarity index 100%
rename from spec/submit/separate_yaml/ftq/ftq-10000-2-100000ss-add.yaml
rename to spec/submit/separate_yaml/job-10000-2-100000ss-add.yaml
diff --git a/spec/submit/separate_yaml/ftq/ftq-20-2-6000ss-cache.yaml b/spec/submit/separate_yaml/job-20-2-6000ss-cache.yaml
similarity index 100%
rename from spec/submit/separate_yaml/ftq/ftq-20-2-6000ss-cache.yaml
rename to spec/submit/separate_yaml/job-20-2-6000ss-cache.yaml
diff --git a/spec/submit/separate_yaml/ftq.yaml b/spec/submit/separate_yaml/job.yaml
similarity index 100%
rename from spec/submit/separate_yaml/ftq.yaml
rename to spec/submit/separate_yaml/job.yaml
diff --git a/spec/submit_spec.rb b/spec/submit_spec.rb
index 4096cb73..c8cdcc15 100644
--- a/spec/submit_spec.rb
+++ b/spec/submit_spec.rb
@@ -16,20 +16,18 @@ end
def traverse_file(output_dir)
Dir.glob("#{output_dir}/*.yaml").each do |yaml_file|
- stable_yaml_file(yaml_file)
+ stable_yaml_file(yaml_file) unless File.basename(yaml_file) == 'job.yaml'
end
end
-def submit_job(submit_item)
- submit_yaml_path = File.join("#{LKP_SRC}/spec/submit", submit_item)
- Dir.glob("#{submit_yaml_path}/*.yaml").each do |yaml_file|
- output_dir = File.join(submit_yaml_path, File.basename(yaml_file, '.yaml'))
+def submit_job()
+ Dir.glob("#{LKP_SRC}/spec/submit/*").each do |output_dir|
submit_cmd = [
"#{LKP_SRC}/sbin/submit",
'-o', output_dir,
'-s', 'lab: spec_lab',
'-s', 'testbox: vm-2p8g--spec_submit',
- yaml_file
+ "#{output_dir}/job.yaml"
]
system(*submit_cmd)
traverse_file(output_dir)
@@ -38,22 +36,8 @@ end
describe 'submit job spec' do
it 'link jobs spec' do
- submit_job('link_jobs')
- end
-
- it 'link matrix' do
- submit_job('matrix')
- end
-
- it 'separate yaml spec' do
- submit_job('separate_yaml')
- end
-
- it 'job on fail' do
- submit_job('job_on_fail')
- end
-
- it 'merge yaml' do
- submit_job('merge_yaml')
+ submit_job()
end
end
+
+submit_job
--
2.23.0