aboutsummaryrefslogtreecommitdiff
path: root/schneider-openembedded/lava-job-definitions-test/soca9/prod-image.yaml
blob: 457600c993798e8b993800dc4b3a792203e6a131 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
device_type: soca9
job_name: SE ${MACHINE} prod-image (u-boot,nfs,wic) ${MANIFEST_BRANCH}-${KERNEL_VERSION_PATCHLEVEL} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 100
  action:
    minutes: 70
  connection:
    minutes: 20
priority: medium
visibility: public

actions:

##################
# Deploy WIC image
##################
- deploy:
    timeout:
      minutes: 20
    to: flasher
    images:
      image:
        url: ${WIC_IMAGE_URL}
        compression: bz2
      layout:
        url: ${WIC_BMAP_URL}


##########################
# Configure ethernet ports
##########################
- command:
    name: j17_off
- command:
    name: j21_on
- command:
    name: j22_off
- command:
    name: j23_off
- command:
    name: j24_off

###############
# u-boot
###############
- deploy:
    timeout:
      minutes: 15
    to: tftp
    kernel:
      # This is a known kernel image used for CRC checks only
      url: https://releases.linaro.org/members/schneider/openembedded/2019.09-warrior/soca9/zImage--4.19.72+git0+7549a49ae5-r0-snarc-soca9-20191003145415.bin
      type: zimage

- boot:
    timeout:
      minutes: 20
    method: bootloader
    bootloader: u-boot
    commands: []
    prompts: ["=>"]

# Run some U-Boot tests
- test:
    timeout:
      minutes: 5
    interactive:
    - name: uboot-tests
      prompts: ["=> ", "/ # "]
      script:
      - command: echo "u-boot echo test"
        name: echo
        successes:
        - message: "u-boot echo test"
      - command: version
        name: version
        successes:
        - message: "U-Boot"
      - command: help test
        name: help
        successes:
        - message: "test - minimal test like /bin/sh"
      # saveenv and printenv
      - command: setenv test_var test123
      - command: printenv
        name: setenv-and-printenv
        successes:
        - message: "test_var=test123"
    - name: memory-test
      prompts: ["=> ", "/ # "]
      script:
      # memory test
      # base - print or set address offset
      - command: base
        name: print-default-base-address-offset
        successes:
        - message: "Base Address: 0x"
      - command: base 00000000
        name: set-address-offset-0x00000000
        successes:
        - message: "Base Address: 0x00000000"
      - command: base
        name: check-address-offset-0x00000000
        successes:
        - message: "Base Address: 0x00000000"
      # crc32 - checksum calculation
      - command: mw.b 00000000 aa 400
      - command: crc32 -v 0 400 3c6f327d
      - command: echo return code $$?
        name: compute-CRC32-checksum
        successes:
        - message: "return code 0"
      # mw - memory write
      # md - memory display
      - command: mw 100000 aabbccdd 10
      - command: md 100000 10
        name: mw-md-100000
        successes:
        - message: "aabbccdd"
      # md - memory display
      # cp - memory copy
      - command: cp 100000 200000 10
      - command: md 200000 10
        name: cp-md-200000
        successes:
        - message: "aabbccdd"
      # cmp - memory compare
      - command: cmp 100000 200000 10
        name: cmp-100000-200000-10
        successes:
        - message: "Total of 16 word\\(s\\) were the same"
    - name: fpga-check-cmds
      prompts: ["=> ", "/ # "]
      script:
      # FPGA checksum and dump start and end of image
      - command: mw.b 0x01000000 0 0x700000
      - command: run scan_dev_for_fpga
      - command: crc32 0x01000000 006aebe4
      - command: '#'
      - command: md.b 0x01000000 100
      - command: '#'
      - command: md.b 016aea10 200
      - command: '#'
    - name: dhcp-cmds
      prompts: ["=> ", "/ # "]
      script:
      # dhcp
      - command: run FPGA_INIT
        successes:
        - message: "FPGA updated to correct revision."
        name: fpga_init
      - command: setenv autoload no ; dhcp ; dhcp
        name: dhcp
        successes:
        - message: "DHCP client bound to address"
    - name: ping-cmds
      prompts: ["=> ", "/ # "]
      script:
      # ping
      - command: ping {SERVER_IP}
        name: ping
        successes:
        - message: "is alive"
    - name: tftp-cmds
      prompts: ["=> ", "/ # "]
      script:
      # TFTP
      - command: setenv serverip {SERVER_IP} ; tftp {KERNEL_ADDR} {KERNEL}
        name: tftp
        successes:
        - message: "Bytes transferred = 6752784"
      - command: crc32 -v {KERNEL_ADDR} 670a10 ca050911
      - command: echo return code $$?
        successes:
        - message: "return code 0"


###############
# TFTP/NFS
###############
- deploy:
    timeout:
      minutes: 15
    to: tftp
    os: oe
    kernel:
      url: ${KERNEL_ZIMAGE_URL}
      type: zimage
    dtb:
      url: ${DTB_URL}
    nfsrootfs:
      url: ${NFSROOTFS_URL}
      compression: bz2

- boot:
    timeout:
      minutes: 20
    method: u-boot
    commands:
      - run FPGA_INIT
      - setenv autoload no
      - dhcp
      - dhcp
      - env print
      - setenv serverip {SERVER_IP}
      - tftp {KERNEL_ADDR} {KERNEL}
      - tftp 0x1000 {DTB}
      - "setenv bootargs 'console=ttyS0,115200n8 root=/dev/nfs rw nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard,intr,vers=3 rootwait coherent_pool=2M ip=dhcp'"
      - bootz 0x01000000 - 0x00001000
    auto_login:
      login_prompt: "login:"
      username: root
      password_prompt: "Password:"
      password: "P@ssword-1"
      login_commands:
      - "P@ssword-1"
      - "azertAZERT12345"
      - "azertAZERT12345"
      - "azertAZERT12345"
    prompts:
    - "Current password: "
    - "New password: "
    - "Retype new password: "
    - "root@snarc-soca9:"
    - "root@rzn1-snarc:"

- test:
    timeout:
      minutes: 10
    interactive:
    - name: basic-cmds-tftp
      prompts: ["root@snarc-soca9", "root@rzn1-snarc"]
      script:
      - command: uname -a
      - command: cat /proc/device-tree/model ; echo ""
      - command: ps aux --sort -rss
      - command: cat /proc/meminfo
      - command: cat /proc/cpuinfo
      - command: free -h
      - command: sysctl -a | grep vm.min_free_kbytes
      - command: mount
      - command: systemctl --no-pager status systemd-resolved
      - command: systemctl --no-pager restart systemd-resolved
      - command: systemctl --no-pager status systemd-resolved
      - command: ifconfig -a
      - command: ping -c 3 github.com
      - command: which docker

- test:
    timeout:
      minutes: 20
    definitions:

    - name: smoke-tests-tftp
      from: git
      history: false
      repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git
      branch: master
      path: automated/linux/smoke/smoke.yaml
      parameters:
        SKIP_INSTALL: True
        TESTS: "pwd, uname -a, cat /etc/os-release, ip a, lscpu, vmstat, lsblk, ps aux --sort -rss, free -h, mount"

    - name: ethernet-tftp
      from: git
      history: false
      repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git
      branch: master
      path: automated/linux/ethernet/ethernet.yaml
      parameters:
        INTERFACE: eth1

    - name: meminfo-tftp
      from: git
      history: false
      repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git
      branch: master
      path: automated/linux/meminfo/meminfo.yaml


###############
# prod-image.wic
###############
# We already flashed the SDcard WIC image in the deploy step at the begging of this test run
- boot:
    timeout:
      minutes: 10
    method: u-boot
    commands:
    - run linux_sd
    auto_login:
      login_prompt: "login:"
      username: root
      password_prompt: "Password:"
      password: "P@ssword-1"
      login_commands:
      - "P@ssword-1"
      - "azertAZERT12345"
      - "azertAZERT12345"
      - "azertAZERT12345"
    prompts:
    - "Current password: "
    - "New password: "
    - "Retype new password: "
    - "root@snarc-soca9:"
    - "root@rzn1-snarc:"

- test:
    timeout:
      minutes: 10
    interactive:
    - name: basic-cmds-wic
      prompts: ["root@snarc-soca9", "root@rzn1-snarc"]
      script:
      - command: uname -a
      - command: cat /proc/device-tree/model ; echo ""
      - command: mount
      - command: ps aux --sort -rss
      - command: cat /proc/meminfo
      - command: cat /proc/cpuinfo
      - command: free -h
      - command: sysctl -a | grep vm.min_free_kbytes
      - command: mount
      - command: systemctl --no-pager status systemd-resolved
      - command: systemctl --no-pager restart systemd-resolved
      - command: systemctl --no-pager status systemd-resolved
      - command: ifconfig -a
      - command: ping -c 3 github.com
      - command: which docker

metadata:
  machine: ${MACHINE}
  manifest branch: ${MANIFEST_BRANCH}-${KERNEL_VERSION_PATCHLEVEL}
  manifest commit: ${MANIFEST_COMMIT}
  build url: ${BUILD_URL}
  build location: ${PUBLISH_SERVER}${PUB_DEST}

notify:
    recipients:
    - to:
        method: email
        email: ryan.harkin@linaro.org
    criteria:
        status: incomplete
    verbosity: verbose