Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / tools / tryselect / test / test_fuzzy.t
blob5f53c07c974e3d736c84e711192fa73e9aeaebd4
1   $ . $TESTDIR/setup.sh
2   $ cd $topsrcdir
4 Test fuzzy selector
6   $ ./mach try fuzzy $testargs -q "'foo"
7   Commit message:
8   Fuzzy query='foo
9   
10   Pushed via `mach try fuzzy`
11   Calculated try_task_config.json:
12   {
13       "env": {
14           "TRY_SELECTOR": "fuzzy"
15       },
16       "tasks": [
17           "test/foo-debug",
18           "test/foo-opt"
19       ],
20       "version": 1
21   }
22   
23   $ ./mach try fuzzy $testargs -q "'bar"
24   no tasks selected
25   $ ./mach try fuzzy $testargs --full -q "'bar"
26   Commit message:
27   Fuzzy query='bar
28   
29   Pushed via `mach try fuzzy`
30   Calculated try_task_config.json:
31   {
32       "env": {
33           "TRY_SELECTOR": "fuzzy"
34       },
35       "tasks": [
36           "test/bar-debug",
37           "test/bar-opt"
38       ],
39       "version": 1
40   }
41   
43 Test multiple selectors
45   $ ./mach try fuzzy $testargs --full -q "'foo" -q "'bar"
46   Commit message:
47   Fuzzy query='foo&query='bar
48   
49   Pushed via `mach try fuzzy`
50   Calculated try_task_config.json:
51   {
52       "env": {
53           "TRY_SELECTOR": "fuzzy"
54       },
55       "tasks": [
56           "test/bar-debug",
57           "test/bar-opt",
58           "test/foo-debug",
59           "test/foo-opt"
60       ],
61       "version": 1
62   }
63   
65 Test query intersection
67   $ ./mach try fuzzy $testargs --and -q "'foo" -q "'opt"
68   Commit message:
69   Fuzzy query='foo&query='opt
70   
71   Pushed via `mach try fuzzy`
72   Calculated try_task_config.json:
73   {
74       "env": {
75           "TRY_SELECTOR": "fuzzy"
76       },
77       "tasks": [
78           "test/foo-opt"
79       ],
80       "version": 1
81   }
82   
84 Test intersection with preset containing multiple queries
86   $ ./mach try fuzzy --save foo -q "'test" -q "'opt"
87   preset saved, run with: --preset=foo
89   $ ./mach try fuzzy $testargs --preset foo -xq "'test"
90   Commit message:
91   Fuzzy query='test&query='opt&query='test
92   
93   Pushed via `mach try fuzzy`
94   Calculated try_task_config.json:
95   {
96       "env": {
97           "TRY_SELECTOR": "fuzzy"
98       },
99       "tasks": [
100           "test/foo-debug",
101           "test/foo-opt"
102       ],
103       "version": 1
104   }
105   
106   $ ./mach try $testargs --preset foo -xq "'test"
107   Commit message:
108   Fuzzy query='test&query='opt&query='test
109   
110   Pushed via `mach try fuzzy`
111   Calculated try_task_config.json:
112   {
113       "env": {
114           "TRY_SELECTOR": "fuzzy"
115       },
116       "tasks": [
117           "test/foo-debug",
118           "test/foo-opt"
119       ],
120       "version": 1
121   }
122   
124 Test exact match
126   $ ./mach try fuzzy $testargs --full -q "testfoo | 'testbar"
127   Commit message:
128   Fuzzy query=testfoo | 'testbar
129   
130   Pushed via `mach try fuzzy`
131   Calculated try_task_config.json:
132   {
133       "env": {
134           "TRY_SELECTOR": "fuzzy"
135       },
136       "tasks": [
137           "test/foo-debug",
138           "test/foo-opt"
139       ],
140       "version": 1
141   }
142   
143   $ ./mach try fuzzy $testargs --full --exact -q "testfoo | 'testbar"
144   Commit message:
145   Fuzzy query=testfoo | 'testbar
146   
147   Pushed via `mach try fuzzy`
148   Calculated try_task_config.json:
149   {
150       "env": {
151           "TRY_SELECTOR": "fuzzy"
152       },
153       "tasks": [
154           "test/bar-debug",
155           "test/bar-opt"
156       ],
157       "version": 1
158   }
159   
162 Test task config 
164   $ ./mach try fuzzy --no-push --artifact -q "'foo"
165   Commit message:
166   Fuzzy query='foo
167   
168   Pushed via `mach try fuzzy`
169   Calculated try_task_config.json:
170   {
171       "disable-pgo": true,
172       "env": {
173           "TRY_SELECTOR": "fuzzy"
174       },
175       "tasks": [
176           "test/foo-debug",
177           "test/foo-opt"
178       ],
179       "use-artifact-builds": true,
180       "version": 1
181   }
182   
183   $ ./mach try fuzzy $testargs --env FOO=1 --env BAR=baz -q "'foo"
184   Commit message:
185   Fuzzy query='foo
186   
187   Pushed via `mach try fuzzy`
188   Calculated try_task_config.json:
189   {
190       "env": {
191           "BAR": "baz",
192           "FOO": "1",
193           "TRY_SELECTOR": "fuzzy"
194       },
195       "tasks": [
196           "test/foo-debug",
197           "test/foo-opt"
198       ],
199       "version": 1
200   }
201