From: Fam Zheng <famz@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, berrange@redhat.com,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
pbonzini@redhat.com, stefanha@redhat.com,
"Cleber Rosa" <crosa@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
eblake@redhat.com, "Kamil Rytarowski" <kamil@netbsd.org>
Subject: Re: [Qemu-devel] [PATCH v7 05/13] tests: Add vm test lib
Date: Fri, 15 Sep 2017 19:57:26 +0800 [thread overview]
Message-ID: <20170915115726.GJ17199@lemon> (raw)
In-Reply-To: <87wp508a5w.fsf@linaro.org>
On Fri, 09/15 12:37, Alex Bennée wrote:
>
> Fam Zheng <famz@redhat.com> writes:
>
> > This is the common code to implement a "VM test" to
> >
> > 1) Download and initialize a pre-defined VM that has necessary
> > dependencies to build QEMU and SSH access.
> >
> > 2) Archive $SRC_PATH to a .tar file.
> >
> > 3) Boot the VM, and pass the source tar file to the guest.
> >
> > 4) SSH into the VM, untar the source tarball, build from the source.
> >
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> > tests/vm/basevm.py | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 256 insertions(+)
> > create mode 100755 tests/vm/basevm.py
> >
> > diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> > new file mode 100755
> > index 0000000000..e4603f3fba
> > --- /dev/null
> > +++ b/tests/vm/basevm.py
> > @@ -0,0 +1,256 @@
> > +#!/usr/bin/env python
> > +#
> > +# VM testing base class
> > +#
> > +# Copyright 2017 Red Hat Inc.
> > +#
> > +# Authors:
> > +# Fam Zheng <famz@redhat.com>
> > +#
> > +# This code is licensed under the GPL version 2 or later. See
> > +# the COPYING file in the top-level directory.
> > +#
> > +
> > +import os
> > +import sys
> > +import logging
> > +import time
> > +import datetime
> > +sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "scripts"))
> > +from qemu import QEMUMachine
> > +import subprocess
> > +import hashlib
> > +import optparse
> > +import atexit
> > +import tempfile
> > +import shutil
> > +import multiprocessing
> > +import traceback
> > +
> > +SSH_KEY = open(os.path.join(od.path.dirname(__file__),
> > + "..", "keys", "id_rsa")).read()
> > +SSH_PUB_KEY = open(os.path.join(od.path.dirname(__file__),
> > + "..", "keys", "id_rsa.pub")).read()
>
> Hmm I don't think this was tested:
>
> 12:35:56 [alex@zen:~/l/q/qemu.git] review/fam-vm-build-test-v7(+2/-2) ± make vm-build-netbsd
> CHK version_gen.h
> VM-IMAGE netbsd
> Traceback (most recent call last):
> File "/home/alex/lsrc/qemu/qemu.git/tests/vm/netbsd", line 17, in <module>
> import basevm
> File "/home/alex/lsrc/qemu/qemu.git/tests/vm/basevm.py", line 30, in <module>
> SSH_KEY = open(os.path.join(od.path.dirname(__file__),
> NameError: name 'od' is not defined
> /home/alex/lsrc/qemu/qemu.git/tests/vm/Makefile.include:23: recipe for target 'tests/vm/netbsd.img' failed
Right, I tested the fixed version (s/od/os).
Fam
next prev parent reply other threads:[~2017-09-15 11:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 3:01 [Qemu-devel] [PATCH v7 00/13] tests: Add VM based build tests (for non-x86_64 and/or non-Linux) Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 01/13] gitignore: Ignore vm test images Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 02/13] qemu.py: Add "wait()" method Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 03/13] scripts: Add archive-source.sh Fam Zheng
2017-09-13 10:55 ` Peter Maydell
2017-09-15 6:14 ` Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 04/13] tests: Add a test key pair Fam Zheng
2017-09-15 10:51 ` Alex Bennée
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 05/13] tests: Add vm test lib Fam Zheng
2017-09-15 11:37 ` Alex Bennée
2017-09-15 11:57 ` Fam Zheng [this message]
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 06/13] tests: Add ubuntu.i386 image Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 07/13] tests: Add FreeBSD image Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 08/13] tests: Add NetBSD image Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 09/13] tests: Add OpenBSD image Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 10/13] Makefile: Add rules to run vm tests Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 11/13] MAINTAINERS: Add tests/vm entry Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 12/13] tests: Add README for vm tests Fam Zheng
2017-09-15 14:24 ` Alex Bennée
2017-09-15 14:52 ` Fam Zheng
2017-09-13 3:01 ` [Qemu-devel] [PATCH v7 13/13] docker: Use archive-source.py Fam Zheng
2017-09-13 3:15 ` [Qemu-devel] [PATCH v7 00/13] tests: Add VM based build tests (for non-x86_64 and/or non-Linux) no-reply
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=20170915115726.GJ17199@lemon \
--to=famz@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=eblake@redhat.com \
--cc=f4bug@amsat.org \
--cc=kamil@netbsd.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).