12 - b2conditionsdb iov --run-range
14 - b2conditionsdb diff --run-range
15 - b2conditionsdb legacydownload --run-range
16 - b2conditionsdb iovs delete --run-range
17 - b2conditionsdb iovs delete --run-range --fully-contained
18 - b2conditionsdb iovs copy --replace
27def call_command(command):
28 """Call command print output after having removed some lines from output
31 command (string): command to be called
33 output = subprocess.check_output(shlex.split(command), encoding='utf-8').strip().split(
'\n')
35 if "created" not in line
and "modified" not in line:
39if __name__ ==
'__main__':
41 tags = [
'main_tag_merge_test_1',
'main_tag_merge_test_2',
'main_tag_merge_test_3']
43 call_command(
'b2conditionsdb iov main_tag_merge_test_2')
44 call_command(
'b2conditionsdb iov main_tag_merge_test_2 --run-range 5 200 5 300')
45 call_command(
'b2conditionsdb diff main_tag_merge_test_2 main_tag_merge_test_3')
46 call_command(
'b2conditionsdb diff main_tag_merge_test_2 main_tag_merge_test_3 --run-range 5 200 5 300')
50 with tempfile.TemporaryDirectory()
as tmpdirname:
51 output = subprocess.check_output(
52 shlex.split(f
'b2conditionsdb legacydownload -c main_tag_merge_test_3 {tmpdirname} --run-range 5 0 5 1000'),
53 encoding=
'utf-8').strip().split(
'\n')
55 print(line.replace(tmpdirname,
"centraldb")[7:])
57 call_command(
'b2conditionsdb iovs delete --dry-run main_tag_merge_test_2 --run-range 5 200 5 300')
58 call_command(
'b2conditionsdb iovs delete --dry-run main_tag_merge_test_2 --run-range 5 200 5 300 --fully-contained')
59 call_command(
'b2conditionsdb iovs copy --replace --dry-run main_tag_merge_test_2 main_tag_merge_test_1')