It's not worked, I added the below line in device-dictionary and it's working now.

{% set interrupt_prompt = 'Press SPACE to abort autoboot in 5 seconds' %}


Thanks,
Ankit

On Fri, Jul 28, 2017 at 12:40 PM, Remi Duraffort <remi.duraffort@linaro.org> wrote:
The constant is called "uboot-autoboot-prompt"

2017-07-28 8:21 GMT+02:00 ankit gupta <ankitrtk@gmail.com>:
Hi Neil,

I switched to LAVA 2017.7 from 2016.12.

I want to interrupt my u-boot prompt for this I did changes in constant.py file for LAVA-2016.12 version, but this should be configurable by device dictionary in 2017.2 or later version as you mentioned in above mail chain.

I added " {% set uboot_autoboot_prompt =  'Press SPACE to abort autoboot in 5 seconds' %}" in device-dictionary as you suggested but it's not reflecting and taking the default value for u-boot_interrupt prompt.

Can you please look into it and let me know whether I am missing something?


Thanks,
Ankit


On Fri, Jul 14, 2017 at 4:03 PM, Neil Williams <neil.williams@linaro.org> wrote:
On 14 July 2017 at 10:54, ankit gupta <ankitrtk@gmail.com> wrote:
Hi Neil,

Thanks for your quick response I am working on LAVA - V2.

I meant the packaged version - it looks from the log file that you're using 2016.12-2 as there is no output at the top of the log file declaring the installed version of lava-dispatcher as there is with later releases. Run:

$ dpkg -l lava-server lava-dispatcher lava-tool

See the lava-announce mailing list archive for more on changes since 2016.12 - I'm just in the process of uploading 2017.7 to stretch-backports which was only recently created after the release of Stretch.

In 2016.12, there was no way to change this constant other than by editing the constants.py in the source code, Stevan added this support a bit later (2017.2 or thereabouts if I remember correctly).

You're ahead of a lot of others at this point because most people are on Jessie and waiting to upgrade to Stretch. Your options are:

* you can wait a few days for 2017.7 to turn up in stretch-backports of an official Debian mirror near you. This is likely to take a bit longer than usual because stretch-backports is new, so there is some processing which needs to be done within Debian: https://ftp-master.debian.org/new/lava-dispatcher_2017.7-1~bpo9+1.html

* you can keep the changes to your device dictionary and make a change to the constants.py to get things working with 2016.12 whilst ensuring that things will continue to work once you install 2017.7

* you can use the LAVA repositories but that's a little awkward for you at the moment as we only have packages for jessie-backports there, not stretch-backports. It would still work but future updates for stretch will be in stretch-backports which would mean changing that again later.

 
Based on your suggestions below are my observations.

-- I set the uboot_autoboot_prompt in my device-dictionary file and the content of my device-dictionary(bbb02-ankit) is,
    
   {% extends 'beaglebone-black.jinja2' %}
   {% mac_address = '50:54:30:14:34:23' %}
   {% memory = '1024' %}
   {% set connection_command = 'telnet localhost 3003' %}
   {% set uboot_autoboot_prompt =  'Press SPACE to abort autoboot in 5 seconds' %}

   After adding the above line in my device-dictionary file I executed the below command to update device dictionary.
   
   lava-server manage device-dictionary --hostname bbb02-ankit --import ./bbb02-ankit.jinja2

   After execution of above command I can see the changes in device dictionary file using web-UI, please see the screenshot 
     

But when I submitted the job its took default value of "UBOOT_AUTOBOOT_PROMPT" please see the below screenshot.




The detailed logs and the job definition is attached in this mail​, Every input will be helpful for me.


Thanks,
Ankit
  


On Fri, Jul 14, 2017 at 1:22 PM, Neil Williams <neil.williams@linaro.org> wrote:
On 14 July 2017 at 05:40, ankit gupta <ankitrtk@gmail.com> wrote:
> Hi All,
>  I am adding BBB board on LAVA server I want to change
> "UBOOT_AUTOLOAD_MESSAGE" in constant.py,

Which version of LAVA are you running? In latest code (in Debian
unstable and available from the LAVA repositories), this would be
UBOOT_AUTOBOOT_PROMPT and has moved into the jinja2 template support,
so it modifiable in the device dictionary.

{% set uboot_autoboot_prompt =  'Press SPACE to abort autoboot in 10 seconds' %}

i.e. the bootloader prompt is not part of the test job because it
doesn't change with every test job, it only changes when a new UBoot
is installed onto the device and that's an admin task, so it is part
of the device configuration. The template contains a default but
different devices of the same type could have different versions of
UBoot (not encouraged, but possible), so the device dictionary is the
right place for that override.


> I used "interrupt_prompt"
> parameters in job submission but it took the message written in constant.py.
> If I changed the message in constant.py its working but I know this is not
> the right way to do that, Please suggest if any one has idea what is the
> problem with me.
>
>
> Below is the my Job:
>
> device_type: beaglebone-black
>
> # NFS fails on panda and arndale.
>
> job_name: BBB smoke test
> timeouts:
>   job:
>     minutes: 240
>   action:
>     minutes: 240
>   connection:
>     minutes: 2
> priority: medium
> visibility: public
>
> metadata:
>   source: https://git.linaro.org/lava-team/refactoring.git
>   path: health-checks/beaglebone-black-health.yaml
>   build-readme:
> http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/debian-armmp-armhf-readme.html
>   build-console:
> https://ci.linaro.org/view/lava-ci/job/lava-debian-armmp-armhf/1/console
>   build-script:
> http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/armmp-nfs.sh
>
> actions:
> - deploy:
>     timeout:
>       minutes: 40
>     to: tftp
>     kernel:
>       url: file:////home/pi/lava/dl/vmlinuz
>     ramdisk:
>       url: file:////home/pi/lava/dl/initramfs.cpio.gz
>       compression: gz
>       # the bootloader needs a u-boot header on the modified ramdisk
>       add-header: u-boot
>     modules:
>       url: file:////home/pi/lava/dl/modules.tar.gz
>       compression: gz
>     nfsrootfs:
>       url: file:////home/pi/lava/dl/jessie-armhf-nfs.tar.gz
>       compression: gz
>     os: debian
>     dtb:
>       url: file:////home/pi/lava/dl/am335x-boneblack.dtb
>
> - boot:
>     method: u-boot
>     commands: nfs
>     parameters:
>       shutdown-message: 'INIT: Sending processes the TERM signal'
>       interrupt_prompt: 'Press SPACE to abort autoboot in 10 seconds'
>       interrupt_char: ' '
>     send_char: False
>     type: bootz
>     auto_login:
>       login_prompt: 'beaglebone login: '
>       username: root
>     prompts:
>     - 'root@jessie:'
>     timeout:
>       minutes: 10
>
>
> - test:
>     timeout:
>       minutes: 50
>     definitions:
>     - repository: git://git.linaro.org/qa/test-definitions.git
>       from: git
>       path: ubuntu/smoke-tests-basic.yaml
>       name: smoke-tests
>
>
> _______________________________________________
> Lava-users mailing list
> Lava-users@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lava-users
>



--

Neil Williams
=============
neil.williams@linaro.org
http://www.linux.codehelp.co.uk/



_______________________________________________
Lava-users mailing list
Lava-users@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lava-users




--
Rémi Duraffort
STMIcroelectronics