How to make test with arguments?

Asked by Marcin Juszkiewicz

I have a test which builds Ubuntu package using gcc-linaro toolchain. For now I hardcoded name of package but would prefer to be able to write job which will run this test few times with different package names.

Current test:

{
        "format": "LAVA-Test Test Definition Format",
                "test_id": "hrw-gcc-linaro-build-test",
                "install": {
                        "steps": ["sudo apt-get build-dep eglibc"]
                },
                "run": {
                        "steps": ["PATH=/usr/lib/gcc-linaro/bin:$PATH apt-get source -b eglibc"]
                },
                "parse": {
                        "pattern": "^(dpkg-genchanges: binary-only upload - not including any source code)",
                        "appendall": {
                                "units": "MB/s",
                                "result": "pass"
                        }
                }
}

Question information

Language:
English Edit question
Status:
Answered
For:
Obsolete LAVA Test Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Le Chi Thu (le-chi-thu) said :
#1

Hi

Please add $(OPTIONS) to the run steps such as

  "run": {
                       "steps": ["PATH=/usr/lib/gcc-linaro/bin:$PATH
apt-get source -b $(OPTIONS)"]
               },

In the lava-dispatcher test job, add test_options to lava_test_run command.

   "command": "lava_test_run",
      "parameters":
        {
          "test_name": "peacekeeper",
          "test_options": "firefox"
        }
    }

BR

/Chi Thu

On 19 December 2011 14:30, Marcin Juszkiewicz
<email address hidden> wrote:
> New question #182355 on LAVA Test:
> https://answers.launchpad.net/lava-test/+question/182355
>
> I have a test which builds Ubuntu package using gcc-linaro toolchain. For now I hardcoded name of package but would prefer to be able to write job which will run this test few times with different package names.
>
> Current test:
>
> {
>        "format": "LAVA-Test Test Definition Format",
>                "test_id": "hrw-gcc-linaro-build-test",
>                "install": {
>                        "steps": ["sudo apt-get build-dep eglibc"]
>                },
>                "run": {
>                        "steps": ["PATH=/usr/lib/gcc-linaro/bin:$PATH apt-get source -b eglibc"]
>                },
>                "parse": {
>                        "pattern": "^(dpkg-genchanges: binary-only upload - not including any source code)",
>                        "appendall": {
>                                "units": "MB/s",
>                                "result": "pass"
>                        }
>                }
> }
>
>
> --
> You received this question notification because you are a member of
> Linaro Validation Team, which is an answer contact for LAVA Test.

Can you help with this problem?

Provide an answer of your own, or ask Marcin Juszkiewicz for more information if necessary.

To post a message you must log in.