Skip to content

Commit ca65c38

Browse files
authored
Yaml parser (New) (#2383)
* First full run * First translated smoke + builtin * Imports are now array in yaml * Jobs may also contain yaml units * Accessed paramteres are now variadically text or array * Remove duplicated Visitors * Remove duplicated Visitors * Templatable fields are now variadic (list or str) * Siblings are now yaml so no more json parsing * Support creating words from pre-parsed nodes * Handle sibling multi type in the getter * Wrong getter from setup_include * Missing parameter to MissingParameter explorer * Translate the metabox provider * Depends is now a list * Siblings are now always parsed in the getter * Summary is no longer forced variant This didnt work before because it was also forced translatable and when that was the case the forced variant check was skipped (sigh). This removes both * Siblings are json * Fix environ may be list or str * Black formatting * Package yaml units * Add backward compatibility notes on isinstance Minor: use list comprehension to parse resource * Test and cover parse_import_stmt * Correctly track origin of yaml units * Test new yaml unit loader * Test from preparsed xparsers calls Minor: raise an exception instead of assert * Test init and better documentation * Fix origin is not raw data, use kwargs * Deduplicate sibling code and fix flags for manual jobs flags weren't correctly treatedfor manual after suspend jobs because I didn't notice them. Now the code is unique so it is easier to make changes for both * Also check after and depends * Enforce no trailing comma due to Python3.5 * Make black happy * More coverage for test_v1 * Descriptions are summary, fixed most issues in PR review * Test should test * Rephrase comment * Fix typo in function name * Fix comments to call dicts dicts
1 parent bb6aba5 commit ca65c38

46 files changed

Lines changed: 2252 additions & 1598 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

checkbox-ng/MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,24 @@ exclude mk-venv
1212
exclude tox.ini
1313

1414
include plainbox/impl/resource_constants.yaml
15+
1516
include plainbox/impl/providers/categories/README.md
1617
include plainbox/impl/providers/categories/manage.py
1718
include plainbox/impl/providers/categories/po/*.po
1819
include plainbox/impl/providers/categories/po/*.pot
1920
include plainbox/impl/providers/categories/po/POTFILES.in
2021
include plainbox/impl/providers/categories/units/*.pxu
22+
include plainbox/impl/providers/categories/units/*.yml
23+
include plainbox/impl/providers/categories/units/*.yaml
2124

2225
include plainbox/impl/providers/exporters/README.md
2326
include plainbox/impl/providers/exporters/manage.py
2427
include plainbox/impl/providers/exporters/po/*.po
2528
include plainbox/impl/providers/exporters/po/*.pot
2629
include plainbox/impl/providers/exporters/po/POTFILES.in
2730
include plainbox/impl/providers/exporters/units/*.pxu
31+
include plainbox/impl/providers/exporters/units/*.yml
32+
include plainbox/impl/providers/exporters/units/*.yaml
2833
include plainbox/impl/providers/exporters/data/*
2934

3035
include plainbox/impl/providers/manifest/README.md
@@ -34,6 +39,9 @@ include plainbox/impl/providers/manifest/po/*.po
3439
include plainbox/impl/providers/manifest/po/*.pot
3540
include plainbox/impl/providers/manifest/po/POTFILES.in
3641
include plainbox/impl/providers/manifest/units/*.pxu
42+
include plainbox/impl/providers/manifest/units/*.yml
43+
include plainbox/impl/providers/manifest/units/*.yaml
44+
3745
include plainbox/vendor/inxi
3846

3947
recursive-exclude daily-package-testing *

checkbox-ng/plainbox/impl/ctrl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def _is_job_impacting_suspend(self, suspend_job_id, job):
208208
if job.flags and expected_flag in job.flags:
209209
return True
210210
if job.siblings:
211-
for sibling_data in json.loads(job.tr_siblings()):
211+
for sibling_data in job.siblings:
212212
if suspend_job_id in sibling_data.get("depends", []):
213213
return True
214214
return False

checkbox-ng/plainbox/impl/providers/categories/units/categories.pxu renamed to checkbox-ng/plainbox/impl/providers/categories/units/categories.yaml

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,159 @@
11
unit: category
22
id: audio
3-
_name: Audio tests
4-
3+
name: Audio tests
4+
---
55
unit: category
66
id: benchmarks
7-
_name: Benchmarks tests
8-
7+
name: Benchmarks tests
8+
---
99
unit: category
1010
id: bluetooth
11-
_name: Bluetooth tests
12-
11+
name: Bluetooth tests
12+
---
1313
unit: category
1414
id: camera
15-
_name: Camera tests
16-
15+
name: Camera tests
16+
---
1717
unit: category
1818
id: codecs
19-
_name: Codec tests
20-
19+
name: Codec tests
20+
---
2121
unit: category
2222
id: cpu
23-
_name: CPU tests
24-
23+
name: CPU tests
24+
---
2525
unit: category
2626
id: daemons
27-
_name: System Daemon tests
28-
27+
name: System Daemon tests
28+
---
2929
unit: category
3030
id: disk
31-
_name: Disk tests
32-
31+
name: Disk tests
32+
---
3333
unit: category
3434
id: ethernet
35-
_name: Ethernet Device tests
36-
35+
name: Ethernet Device tests
36+
---
3737
unit: category
3838
id: esata
39-
_name: eSATA disk tests
40-
39+
name: eSATA disk tests
40+
---
4141
unit: category
4242
id: fingerprint
43-
_name: Fingerprint reader tests
44-
43+
name: Fingerprint reader tests
44+
---
4545
unit: category
4646
id: firewire
47-
_name: Firewire disk tests
48-
47+
name: Firewire disk tests
48+
---
4949
unit: category
5050
id: firmware
51-
_name: Firmware tests
52-
51+
name: Firmware tests
52+
---
5353
unit: category
5454
id: floppy
55-
_name: Floppy disk tests
56-
55+
name: Floppy disk tests
56+
---
5757
unit: category
5858
id: graphics
59-
_name: Graphics tests
60-
59+
name: Graphics tests
60+
---
6161
unit: category
6262
id: hibernate
63-
_name: Hibernation tests
64-
63+
name: Hibernation tests
64+
---
6565
unit: category
6666
id: info
67-
_name: Informational tests
68-
67+
name: Informational tests
68+
---
6969
unit: category
7070
id: input
71-
_name: Input Devices tests
72-
71+
name: Input Devices tests
72+
---
7373
unit: category
7474
id: keys
75-
_name: Hotkey tests
76-
75+
name: Hotkey tests
76+
---
7777
unit: category
7878
id: led
79-
_name: LED tests
80-
79+
name: LED tests
80+
---
8181
unit: category
8282
id: mediacard
83-
_name: Media Card tests
84-
83+
name: Media Card tests
84+
---
8585
unit: category
8686
id: memory
87-
_name: Memory tests
88-
87+
name: Memory tests
88+
---
8989
unit: category
9090
id: mir
91-
_name: MIR tests
92-
91+
name: MIR tests
92+
---
9393
unit: category
9494
id: miscellanea
95-
_name: Miscellaneous tests
96-
95+
name: Miscellaneous tests
96+
---
9797
unit: category
9898
id: monitor
99-
_name: Monitor tests
100-
99+
name: Monitor tests
100+
---
101101
unit: category
102102
id: networking
103-
_name: Non-device specific networking tests
104-
103+
name: Non-device specific networking tests
104+
---
105105
unit: category
106106
id: optical
107-
_name: Optical Drive tests
108-
107+
name: Optical Drive tests
108+
---
109109
unit: category
110110
id: expresscard
111-
_name: ExpressCard tests
112-
111+
name: ExpressCard tests
112+
---
113113
unit: category
114114
id: peripheral
115-
_name: Peripheral tests
116-
115+
name: Peripheral tests
116+
---
117117
unit: category
118118
id: power-management
119-
_name: Power Management tests
120-
119+
name: Power Management tests
120+
---
121121
unit: category
122122
id: suspend
123-
_name: Suspend tests
124-
123+
name: Suspend tests
124+
---
125125
unit: category
126126
id: touchpad
127-
_name: Touchpad tests
128-
127+
name: Touchpad tests
128+
---
129129
unit: category
130130
id: touchscreen
131-
_name: Touchscreen tests
132-
131+
name: Touchscreen tests
132+
---
133133
unit: category
134134
id: usb
135-
_name: USB tests
136-
135+
name: USB tests
136+
---
137137
unit: category
138138
id: user_apps
139-
_name: User Applications
140-
139+
name: User Applications
140+
---
141141
unit: category
142142
id: virtualization
143-
_name: Virtualization tests
144-
143+
name: Virtualization tests
144+
---
145145
unit: category
146146
id: wireless
147-
_name: Wireless networking tests
148-
147+
name: Wireless networking tests
148+
---
149149
unit: category
150150
id: mobilebroadband
151-
_name: Mobile broadband tests
152-
151+
name: Mobile broadband tests
152+
---
153153
unit: category
154154
id: stress
155-
_name: Stress tests
156-
155+
name: Stress tests
156+
---
157157
unit: category
158158
id: uncategorised
159-
_name: Uncategorised
159+
name: Uncategorised

checkbox-ng/plainbox/impl/providers/exporters/units/exporter.pxu

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)