tools/tryselect/test/test_auto.t
author Andrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 03 Jun 2020 21:00:43 +0000
changeset 533975 275d082f51b37acb3fa358650381e74893ea457d
parent 530860 91dc80342f46fd9875b9a930d1b68c0b05755e43
child 540399 0e3b96f1a87f509f03e5b662cbd3eabe8808b20d
permissions -rw-r--r--
Bug 1633866 - [tryselect] Use 'bugbug' loader with |mach try auto|, r=marco Enables manifest-scheduling with |mach try auto| pushes. Differential Revision: https://phabricator.services.mozilla.com/D76525


  $ . $TESTDIR/setup.sh
  $ cd $topsrcdir

Test auto selector

  $ ./mach try auto $testargs
  warning: 'mach try auto' is experimental, results may vary!
  Commit message:
  Tasks automatically selected.
  
  Pushed via `mach try auto`
  Calculated try_task_config.json:
  {
      "parameters": {
          "optimize_target_tasks": true,
          "target_tasks_method": "try_auto",
          "test_manifest_loader": "bugbug",
          "try_mode": "try_auto",
          "try_task_config": {
              "optimize-strategies": "taskgraph.optimize:tryselect.bugbug_debug_disperse"
          }
      },
      "version": 2
  }
  

  $ ./mach try auto $testargs --closed-tree
  warning: 'mach try auto' is experimental, results may vary!
  Commit message:
  Tasks automatically selected. ON A CLOSED TREE
  
  Pushed via `mach try auto`
  Calculated try_task_config.json:
  {
      "parameters": {
          "optimize_target_tasks": true,
          "target_tasks_method": "try_auto",
          "test_manifest_loader": "bugbug",
          "try_mode": "try_auto",
          "try_task_config": {
              "optimize-strategies": "taskgraph.optimize:tryselect.bugbug_debug_disperse"
          }
      },
      "version": 2
  }
  
  $ ./mach try auto $testargs --closed-tree -m "foo {msg} bar"
  warning: 'mach try auto' is experimental, results may vary!
  Commit message:
  foo Tasks automatically selected. bar ON A CLOSED TREE
  
  Pushed via `mach try auto`
  Calculated try_task_config.json:
  {
      "parameters": {
          "optimize_target_tasks": true,
          "target_tasks_method": "try_auto",
          "test_manifest_loader": "bugbug",
          "try_mode": "try_auto",
          "try_task_config": {
              "optimize-strategies": "taskgraph.optimize:tryselect.bugbug_debug_disperse"
          }
      },
      "version": 2
  }