All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Martincoski <ricardo.martincoski@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] support/testing: core testing infrastructure
Date: Wed, 01 Mar 2017 22:46:17 -0300	[thread overview]
Message-ID: <58b7796915aa8_1c373ff168005f0c91983@ultri3.mail> (raw)
In-Reply-To: 1486467363-19881-2-git-send-email-thomas.petazzoni@free-electrons.com

Thomas,

On Tue, Feb 07, 2017 at 09:35 AM, Thomas Petazzoni wrote:

[snip]
> +++ b/support/testing/infra/emulator.py
[snip]
> +    def boot(self, arch, kernel=None, kernel_cmdline=None, options=None):
> +        if arch in ["armv7", "armv5"]:
> +            qemu_arch = "arm"

Support for arch="i386" from test_iso9660 is missing here:
        else:
            qemu_arch = arch

ERROR: test_run (tests.fs.test_iso9660.TestIso9660SyslinuxInternal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/testing-v1/support/testing/tests/fs/test_iso9660.py", line 157, in test_run
    self.builddir, internal=True)
  File "/tmp/testing-v1/support/testing/tests/fs/test_iso9660.py", line 30, in test_mount_internal_external
    emulator.boot(arch="i386", options=["-cdrom", img])
  File "/tmp/testing-v1/support/testing/infra/emulator.py", line 39, in boot
    qemu_cmd = ["qemu-system-{}".format(qemu_arch),
UnboundLocalError: local variable 'qemu_arch' referenced before assignment

> +
> +        qemu_cmd = ["qemu-system-{}".format(qemu_arch),
> +                    "-serial", "telnet::1234,server",
> +                    "-display", "none"]
[snip]
> +++ b/support/testing/run-tests
> @@ -0,0 +1,77 @@
> +#!/usr/bin/env python

Maybe we can do for now as scanpypi does:
#!/usr/bin/python2

[snip]
> +import string

Not used.

[snip]
> +    if not os.path.exists(args.output):
> +        print "The selected output directory does not exist"
> +        return 1
> +
> +    BRTest.outputdir = args.output

Maybe changing this line to:
    BRTest.outputdir = os.path.abspath(args.output)
would fix the use of relative path with some testcases.

$ support/testing/run-tests -d dl -o $(readlink -f output) \
  tests.core.test_post_scripts.TestPostScripts
...
OK

$ support/testing/run-tests -d dl -o output \
  tests.core.test_post_scripts.TestPostScripts
...
FAIL: test_run (tests.core.test_post_scripts.TestPostScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/testing-v1/support/testing/tests/core/test_post_scripts.py", line 34, in test_run
    self.check_post_log_file(f, "target")
  File "/tmp/testing-v1/support/testing/tests/core/test_post_scripts.py", line 21, in check_post_log_file
    self.assertEqual(lines[0], os.path.join(self.builddir, what))
AssertionError: '/tmp/testing-v1/output/TestPostScripts/target' != 'output/TestPostScripts/target'

Regards,
Ricardo

  parent reply	other threads:[~2017-03-02  1:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 11:35 [Buildroot] [PATCH 0/5] Runtime testing infrastructure Thomas Petazzoni
2017-02-07 11:35 ` [Buildroot] [PATCH 1/5] support/testing: core " Thomas Petazzoni
2017-02-08  9:50   ` Thomas De Schampheleire
2017-02-08 10:05     ` Thomas Petazzoni
2017-02-08 11:42       ` Thomas De Schampheleire
2017-03-04 18:12         ` Luca Ceresoli
2017-03-05  7:27           ` Thomas De Schampheleire
2017-03-05  8:29           ` Thomas Petazzoni
2017-03-07 21:59             ` Luca Ceresoli
2017-03-07 22:09               ` Thomas Petazzoni
2017-03-07 23:10                 ` Luca Ceresoli
2017-03-08  1:48                   ` Ricardo Martincoski
2017-03-02  1:46   ` Ricardo Martincoski [this message]
2017-03-05 14:09     ` Thomas Petazzoni
2017-03-04 23:26   ` Luca Ceresoli
2017-03-05 14:44     ` Thomas Petazzoni
2017-02-07 11:36 ` [Buildroot] [PATCH 2/5] support/testing: add core tests Thomas Petazzoni
2017-03-02  1:47   ` Ricardo Martincoski
2017-03-05 14:11     ` Thomas Petazzoni
2017-02-07 11:36 ` [Buildroot] [PATCH 3/5] support/testing: add fs tests Thomas Petazzoni
2017-03-02  1:51   ` Ricardo Martincoski
2017-03-05 14:13     ` Thomas Petazzoni
2017-02-07 11:36 ` [Buildroot] [PATCH 4/5] support/testing: add package tests Thomas Petazzoni
2017-03-02  1:53   ` Ricardo Martincoski
2017-03-05 14:14     ` Thomas Petazzoni
2017-02-07 11:36 ` [Buildroot] [PATCH 5/5] support/testing: add toolchain tests Thomas Petazzoni
2017-03-02  1:54   ` Ricardo Martincoski
2017-03-02  1:45 ` [Buildroot] [PATCH 0/5] Runtime testing infrastructure Ricardo Martincoski
2017-03-05 14:08   ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58b7796915aa8_1c373ff168005f0c91983@ultri3.mail \
    --to=ricardo.martincoski@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.