aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-run-test-snapshot.sh
blob: b753708f03b16029df698f2038701243ea1379da (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
# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
# License GPLv2

################################################################################
## Run SHORT CI test
################################################################################

# test currently only for porter, rest WIP
echo "## ${MACHINE} ##"


echo "default keyring config"

mkdir -p ~/.local/share/python_keyring/

cat <<EOF >  ~/.local/share/python_keyring/keyringrc.cfg
[backend]
default-keyring=keyring.backends.file.PlaintextKeyring
EOF

cat <<EOF > ~/.local/token
$AGLLAVATOKEN
EOF

lava-tool auth-add --token-file ~/.local/token https://agl-jenkins-user@porter.automotivelinux.org

cat ~/.local/token

cat <<EOF > testjob.yaml
# Your first LAVA JOB definition for a porter board
device_type: renesas-porter-uboot
job_name: renesas-porter-uboot

protocols:
  lava-xnbd:
    port: auto

timeouts:
  job:
    minutes: 15
  action:
    minutes: 5
  connection:
    minutes: 2
priority: medium
visibility: public

# ACTION_BLOCK
actions:
- deploy:
    to: nbd
    dtb:
      url: 'https://download.automotivelinux.org/AGL/snapshots/master/latest/porter-nogfx/deploy/images/porter/uImage-r8a7791-porter.dtb'
    kernel:
      url: 'https://download.automotivelinux.org/AGL/snapshots/master/latest/porter-nogfx/deploy/images/porter/uImage'
    initramfs:
      url: 'https://download.automotivelinux.org/AGL/snapshots/master/latest/porter-nogfx/deploy/images/porter/initramfs-netboot-image-porter.ext4.gz.u-boot'
      allow_modify: false
    nbdroot:
      url: 'https://download.automotivelinux.org/AGL/snapshots/master/latest/porter-nogfx/deploy/images/porter/core-image-minimal-porter.ext4'
    os: debian
    failure_retry: 2


# BOOT_BLOCK
- boot:
    method: u-boot
    commands: nbd
    type: bootm
    prompts: ["root@porter:~"]
    auto_login:
      login_prompt: "login:"
      username: root

EOF

#rm ~/.local/token

lava-tool submit-job https://agl-jenkins-user@porter.automotivelinux.org testjob.yaml | tee .myjob

MYJOB=`cat .myjob | sed -e "s#submitted as job id: ##g"`

echo $MYJOB

lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
lava-tool job-details https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
lava-tool job-output https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-status https://agl-jenkins-user@porter.automotivelinux.org $MYJOB
sleep 10
lava-tool job-details https://agl-jenkins-user@porter.automotivelinux.org $MYJOB



# setup