On 4 January 2018 at 08:16, Mylene JOSSERAND <mylene.josserand@free-electrons.com> wrote:
Hello everyone,

I am trying to use lava with a custom script[1].
Previously, my test was used as a shell script (using exit) and I
updated it to be a custom script to be able to use "skip" result. 

I ran a job and I got this error:
/lava-854766/0/tests/1_custom-tests/run.sh: line 1: ####: not found

It seems to be linked with my echo of "#### Starting NAND test
####" [2].

Here is the yaml used:
https://github.com/free-electrons/test_suite/blob/master/tests/custom.yaml

Why are you trying to use a subshell here?
- $(./scripts/$TEST.sh $DEVICE)

Just use:

- ./scripts/$TEST.sh $DEVICE

Also, attach the full job definition, it could be a problem with the shell interpreter being used.
 


the source of the script:
https://github.com/free-electrons/test_suite/blob/master/scripts/nand.sh

the jinja file:
https://github.com/free-electrons/custom_tests_tool/blob/master/src/jobs_templates/custom_simple_job.jinja

and some part of the output when the test ran and failed:
http://code.bulix.org/ca3mc7-254957?raw

As I am new to LAVA, I have probably missed something.
On the current test example [3], it seems that there is no output using
"echo". Is it possible that my "echo" leads to this error? It is
possible to print messages in a custom script, right?

[1]:
https://validation.linaro.org/static/docs/v2/writing-tests.html#writing-custom-scripts-to-support-tests
[2]:
https://github.com/free-electrons/test_suite/blob/master/scripts/nand.sh#L9
[3]:
https://git.linaro.org/lava-team/refactoring.git/tree/functional/unittests.sh


Thank you in advance for your help,

Best regards,

--
Mylène Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
Lava-users mailing list
Lava-users@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lava-users



--