Introduce LAVA TradeFed templates

Generate the LAVA job definitions from Jinja2 templates for TradeFed
based suites (xTS).

A working example is given with CTS which is split in several templates
to cope with our setup limitations:

- Not all devices have the same hardware attributes (e.g. dual SIM,
  micro-SD card, FP2 vs. FP2.5) and some modules do not require any
  extra hardware at all. Splitting them allows for a more flexible
  scheduling.
- AppSecurityHost and Net are known to fail if run on multiple DUTs.
- Deqp and Media will run on only one DUT no matter what, thus
  blocking the whole job they belong.

Change-Id: I4f7a393c4a50b7e3cfa4ced0abfb46f5655955b1
diff --git a/lava/templates/partials/multinode-worker-share-device.yaml b/lava/templates/partials/multinode-worker-share-device.yaml
new file mode 100644
index 0000000..9ef2dee
--- /dev/null
+++ b/lava/templates/partials/multinode-worker-share-device.yaml
@@ -0,0 +1,58 @@
+- test:
+    namespace: tlxc
+    role:
+    - worker
+    timeout:
+      minutes: 5
+    definitions:
+    - repository: ssh://lava-dispatcher@review.fairphone.software/Infra/lava/qa/test-definitions
+      from: git
+      path: automated/android/wait-single-network-connected.yaml
+      branch: staging/fp
+      name: wait-single-network-connected
+
+- test:
+    namespace: tlxc
+    role:
+    - worker
+    timeout:
+      minutes: 15
+    definitions:
+    - repository: ssh://lava-dispatcher@review.fairphone.software/Infra/lava/qa/test-definitions
+      from: git
+      path: automated/android/multinode/share-local-device-over-adb-tcpip.yaml
+      branch: staging/fp
+      name: share-local-device-over-adb-tcpip
+      params:
+        TIMEOUT_SECS: "600"
+
+- test:
+    namespace: tlxc
+    role:
+    - worker
+    timeout:
+      hours: {{ job.timeout }}
+    definitions:
+    - repository: ssh://lava-dispatcher@review.fairphone.software/Infra/lava/qa/test-definitions
+      from: git
+      path: automated/android/multinode/wait-and-keep-local-device-accessible.yaml
+      branch: staging/fp
+      name: wait-and-keep-local-device-accessible
+      params:
+        # The sum of these timeouts must be smaller than the lava-multinode timeout for the master.
+        BOOT_TIMEOUT_SECS: "480"
+        NETWORK_TIMEOUT_SECS: "300"
+        ADB_CONNECT_TEST_TIMEOUT_SECS: "60"
+
+- test:
+    namespace: tlxc
+    role:
+    - worker
+    timeout:
+      minutes: 15
+    definitions:
+    - repository: ssh://lava-dispatcher@review.fairphone.software/Infra/lava/qa/test-definitions
+      from: git
+      path: automated/android/multinode/wait-for-release-and-reset.yaml
+      branch: staging/fp
+      name: wait-for-release-and-reset