summaryrefslogtreecommitdiffstats
path: root/tools/tryselect/test/test_message.t
blob: 25a104833c81e9aa51a86716188838dd47294e1d (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
  $ . $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:
  {
      "env": {
          "TRY_SELECTOR": "fuzzy"
      },
      "tasks": [
          "test/foo-debug",
          "test/foo-opt"
      ],
      "version": 1
  }
  
  $ ./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:
  {
      "env": {
          "TRY_SELECTOR": "fuzzy"
      },
      "tasks": [
          "test/foo-debug",
          "test/foo-opt"
      ],
      "version": 1
  }
  
  $ 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]