summaryrefslogtreecommitdiffstats
path: root/tools/tryselect/test/test_message.t
blob: a707e410fb91aea40542c1764c3298ad14fbba4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  $ . $TESTDIR/setup.sh
  $ cd $topsrcdir

Test custom commit messages with fuzzy selector

  $ ./mach try fuzzy $testargs -q foo --message "Foobar"
  Commit message:
  Foobar
  
  Fuzzy query=foo
  
  Pushed via `mach try fuzzy`
  Calculated try_task_config.json:
  {
      "parameters": {
          "optimize_target_tasks": false,
          "try_task_config": {
              "env": {
                  "TRY_SELECTOR": "fuzzy"
              },
              "tasks": [
                  "test/foo-debug",
                  "test/foo-opt"
              ]
          }
      },
      "version": 2
  }
  
  $ ./mach try fuzzy $testargs -q foo -m "Foobar: {msg}"
  Commit message:
  Foobar: Fuzzy query=foo
  
  Pushed via `mach try fuzzy`
  Calculated try_task_config.json:
  {
      "parameters": {
          "optimize_target_tasks": false,
          "try_task_config": {
              "env": {
                  "TRY_SELECTOR": "fuzzy"
              },
              "tasks": [
                  "test/foo-debug",
                  "test/foo-opt"
              ]
          }
      },
      "version": 2
  }
  
  $ unset EDITOR
  $ ./mach try fuzzy $testargs -q foo -m > /dev/null 2>&1
  [2]


Test custom commit messages with syntax selector

  $ ./mach try syntax $testargs -p linux -u mochitests --message "Foobar"
  Commit message:
  Foobar
  
  try: -b do -p linux -u mochitests
  
  Pushed via `mach try syntax`
  $ ./mach try syntax $testargs -p linux -u mochitests -m "Foobar: {msg}"
  Commit message:
  Foobar: try: -b do -p linux -u mochitests
  
  Pushed via `mach try syntax`
  $ unset EDITOR
  $ ./mach try syntax $testargs -p linux -u mochitests -m > /dev/null 2>&1
  [2]