ubuntu-server-iso-testing-dev team mailing list archive
-
ubuntu-server-iso-testing-dev team
-
Mailing list archive
-
Message #00205
[Merge] lp:~pgraner/ubuntu-server-iso-testing/arm-changes into lp:ubuntu-server-iso-testing
Pete Graner has proposed merging lp:~pgraner/ubuntu-server-iso-testing/arm-changes into lp:ubuntu-server-iso-testing.
Requested reviews:
Jean-Baptiste Lallement (jibel)
For more details, see:
https://code.launchpad.net/~pgraner/ubuntu-server-iso-testing/arm-changes/+merge/119385
Changes to support ARM auotmated testing.
--
https://code.launchpad.net/~pgraner/ubuntu-server-iso-testing/arm-changes/+merge/119385
Your team Ubuntu Server Iso Testing Developers is subscribed to branch lp:ubuntu-server-iso-testing.
=== removed file 'LICENSE.txt'
--- LICENSE.txt 2010-12-01 17:48:05 +0000
+++ LICENSE.txt 1970-01-01 00:00:00 +0000
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
=== added file 'boottests.py'
--- boottests.py 1970-01-01 00:00:00 +0000
+++ boottests.py 2012-08-13 17:07:21 +0000
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2012, Canonical Ltd (http://www.canonical.com/)
+# Author: Clint Byrum <clint.byrum@xxxxxxxxxxxxx>
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+import subprocess
+from glob import iglob
+
+RECORDED_SERVICES_PATH = '/.recorded_services'
+
+def get_service_info():
+ initlist = subprocess.Popen(['initctl','list'], stdout=subprocess.PIPE)
+ filtered = list()
+ for line in initlist.stdout:
+ filtered.append(line.split(', process')[0].strip())
+ filtered.sort()
+ sysv = iglob('/etc/rc2.d/S*')
+ with open('/dev/null','a') as devnull:
+ for script in sysv:
+ if subprocess.call([script,'status'], stdout=devnull, stderr=devnull) == 0:
+ filtered.append(script)
+ return filtered
+
+def get_recorded_service_info():
+ ret = []
+ with open(RECORDED_SERVICES_PATH, 'r') as rservices:
+ ret = [line.strip() for line in rservices]
+ return ret
+
+def record_service_info():
+ with open(RECORDED_SERVICES_PATH, 'w') as services:
+ services.write("\n".join(get_service_info()))
=== removed directory 'configuration'
=== removed file 'configuration/couchdb-iso-testing.ini'
--- configuration/couchdb-iso-testing.ini 2011-06-26 14:06:40 +0000
+++ configuration/couchdb-iso-testing.ini 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-;
-; Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-;
-; This file is part of ubuntu-server-iso-testing.
-;
-; ubuntu-server-iso-testing is free software: you can redistribute it
-; and/or modify it under the terms of the GNU General Public License
-; as published by the Free Software Foundation, either version 3 of
-; the License, or (at your option) any later version.
-;
-; ubuntu-server-iso-testing is distributed in the hope that it will
-; be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-; GNU General Public License for more details.
-;
-; You should have received a copy of the GNU General Public License
-; along with ubuntu-server-iso-testing. If not, see
-; <http://www.gnu.org/licenses/>.
-;
-
-; Bind couchdb onto iso-testing bridge interface
-[httpd]
-bind_address = 192.168.123.1
=== removed file 'configuration/iso-testing-network.xml'
--- configuration/iso-testing-network.xml 2011-11-15 15:51:03 +0000
+++ configuration/iso-testing-network.xml 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-<network>
- <name>iso-testing</name>
- <forward mode='nat'/>
- <bridge name='virbr999' stp='on' delay='0' />
- <ip address='192.168.123.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.123.2' end='192.168.123.254' />
- <bootp file='pxelinux.0'/>
- </dhcp>
- <tftp root='/var/lib/ubuntu-iso-testing/tftp'/>
- </ip>
-</network>
-
=== renamed file 'debian/changelog' => 'debian/changelog.THIS'
=== removed file 'debian/compat'
--- debian/compat 2010-12-01 17:48:05 +0000
+++ debian/compat 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-7
=== removed file 'debian/control'
--- debian/control 2011-11-16 17:00:07 +0000
+++ debian/control 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-Source: ubuntu-iso-testing
-Section: misc
-Priority: extra
-Maintainer: Ubuntu Server ISO Testing Developers <ubuntu-server-iso-testing-dev@xxxxxxxxxxxxxxxxxxx>
-Build-Depends: debhelper (>= 7.0.50~), python-apt
-Standards-Version: 3.9.2
-Homepage: https://launchpad.net/ubuntu-server-iso-testing
-
-Package: ubuntu-iso-testing
-Architecture: amd64 i386
-Depends:
- adduser,
- apt-cacher-ng,
- bsdtar,
- couchdb,
- curl,
- jenkins-slave,
- kvm,
- kvm-pxe,
- libvirt-bin,
- python,
- python-couchdb,
- python-jinja2,
- python-lockfile,
- python-setuptools,
- qemu-kvm,
- syslinux-common,
- ubuntu-qa-tools,
- ${misc:Depends},
- ${python:Depends}
-Description: Ubuntu ISO Testing framework
- This package provides the framework for both Desktop and Server
- ISO testing frameworks.
=== renamed file 'debian/copyright' => 'debian/copyright.THIS'
=== removed file 'debian/rules'
--- debian/rules 2010-12-01 17:48:05 +0000
+++ debian/rules 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-#!/usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-%:
- dh $@
=== removed directory 'debian/source'
=== removed file 'debian/source/format'
--- debian/source/format 2010-12-01 17:48:05 +0000
+++ debian/source/format 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-3.0 (native)
=== removed file 'debian/ubuntu-iso-testing.dirs'
--- debian/ubuntu-iso-testing.dirs 2011-11-15 15:51:03 +0000
+++ debian/ubuntu-iso-testing.dirs 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-usr/bin
-usr/share/ubuntu-iso-testing
-var/lib/ubuntu-iso-testing
-var/lib/ubuntu-iso-testing/tftp
-var/log/ubuntu-iso-testing
=== removed file 'debian/ubuntu-iso-testing.docs'
--- debian/ubuntu-iso-testing.docs 2011-11-15 15:51:03 +0000
+++ debian/ubuntu-iso-testing.docs 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-docs/*
=== removed file 'debian/ubuntu-iso-testing.install'
--- debian/ubuntu-iso-testing.install 2011-11-15 15:51:03 +0000
+++ debian/ubuntu-iso-testing.install 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
-# Main part of ISO testing
-download-latest-test-iso.py usr/share/ubuntu-iso-testing/python
-run-test.py usr/share/ubuntu-iso-testing/python
-unbsdtar-safelink /usr/bin
-# Configuration for couchdb
-configuration/couchdb-iso-testing.ini usr/share/ubuntu-iso-testing/configuration
-# Configuration for libvirtd - deployed in postinst
-configuration/iso-testing-network.xml usr/share/ubuntu-iso-testing/configuration
-# Install some default templates just in case someone is not
-# using the official branch for the release
-templates* usr/share/ubuntu-iso-testing
=== removed file 'debian/ubuntu-iso-testing.links'
--- debian/ubuntu-iso-testing.links 2011-11-15 15:51:03 +0000
+++ debian/ubuntu-iso-testing.links 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-usr/share/ubuntu-iso-testing/python/run-test.py /usr/bin/run-test
-usr/share/ubuntu-iso-testing/python/download-latest-test-iso.py /usr/bin/download-latest-test-iso
=== removed file 'debian/ubuntu-iso-testing.postinst'
--- debian/ubuntu-iso-testing.postinst 2011-11-15 15:51:03 +0000
+++ debian/ubuntu-iso-testing.postinst 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
-#!/bin/sh
-# postinst script for ubuntu-iso-testing
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <postinst> `abort-remove'
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-case "$1" in
- configure)
- # Create usit user if it doesn't exist.
- if ! id usit > /dev/null 2>&1 ; then
- adduser --system --home /var/lib/ubuntu-iso-testing --no-create-home \
- --ingroup nogroup --disabled-password --quiet --shell /bin/bash \
- usit || true
- # Add usit to libvirtd as required access to vm management
- adduser --quiet usit libvirtd || true
- # add usit to adm since we need to read /var/log/syslog
- adduser --quiet usit adm || true
- else
- # the user exists, just make sure it has access to the required groups
- adduser --quiet usit libvirtd || true
- adduser --quiet usit adm || true
-
- fi
- # Fix permissions on runtime directories/files.
- # This is copied direct from the Hudson debian package
- # and relates to edge cases on dir perms for ssh key authentication
- # change group/owner to usit:adm - exclude jobs directory.
- find /var/lib/ubuntu-iso-testing -path "*jobs" -prune -o -exec chown usit:adm {} + || true
-
- # Setup TFTP root for testing
- mkdir -p /var/lib/ubuntu-iso-testing/tftp/pxelinux.cfg || true
- # Link in pxelinux.0 from syslinux-common package
- ln -sf /usr/lib/syslinux/pxelinux.0 \
- /var/lib/ubuntu-iso-testing/tftp/pxelinux.0 || true
- # Fix permissions on tftp dir
- chown -R usit:adm /var/lib/ubuntu-iso-testing/tftp || true
-
- # /var/run/ubuntu-iso-testing
- chown -R usit:adm /var/log/ubuntu-iso-testing || true
- # change mode to 755 - exclude jobs and .ssh directories.
- find /var/lib/ubuntu-iso-testing -path "*jobs" -prune -o -path "*.ssh" -prune -o \
- -path "pxelinux.0" -prune -o -exec chmod 755 {} + || true
- # chmod -R 755 /var/run/ubuntu-iso-testing || true
- chmod 755 /var/log/ubuntu-iso-testing || true
-
- if [ ! $(virsh net-uuid iso-testing 2>/dev/null) ]; then
- echo "Setting up libvirt network configuration"
- # Setup new network in libvirtd for iso testing
- # Create new setup
- virsh net-define /usr/share/ubuntu-iso-testing/configuration/iso-testing-network.xml 2>&1 >/dev/null
- # Mark as autostart for next reboot
- virsh net-autostart iso-testing 2>&1 > /dev/null
- # Startup network
- virsh net-start iso-testing 2>&1 >/dev/null
- fi
-
- # Deploy couchdb configuration and restart
- ln -sf /usr/share/ubuntu-iso-testing/configuration/couchdb-iso-testing.ini \
- /etc/couchdb/local.d/iso-testing.ini
-
- if [ -x /etc/init.d/couchdb ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d couchdb restart || true
- else
- /etc/init.d/couchdb restart || true
- fi
- fi
-
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
=== removed file 'debian/ubuntu-iso-testing.postrm'
--- debian/ubuntu-iso-testing.postrm 2011-11-15 15:51:03 +0000
+++ debian/ubuntu-iso-testing.postrm 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
-#!/bin/sh
-# postrm script for ubuntu-iso-testing
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <overwriter>
-# <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-case "$1" in
- purge)
- # Remove usit user
- userdel usit || true
- # Remove log files
- rm -Rf /var/log/ubuntu-iso-testing || true
- # Purge user home directory
- rm -Rf /var/lib/ubuntu-iso-testing || true
-
- if [ $(virsh net-uuid iso-testing 2>/dev/null) ]; then
- # Remove iso-testing config from virsh
- virsh net-destroy iso-testing > /dev/null || true
- virsh net-undefine iso-testing > /dev/null || true
- fi
-
- # Remove couchdb configuration
- rm -f /etc/couchdb/local.d/iso-testing.ini || true
-
- if [ -x /etc/init.d/couchdb ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d couchdb restart || true
- else
- /etc/init.d/couchdb restart || true
- fi
- fi
-
- ;;
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
=== removed directory 'docs'
=== removed file 'docs/NEWS'
--- docs/NEWS 2011-01-12 22:03:09 +0000
+++ docs/NEWS 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
-.. vim: set ft=rst tw=79:
-
-
-1.0
-===
-
-Summary:
-
- - Testing framework now makes use of apt-cacher-ng to improve the performance
- of updates downloaded by ISO test cases.
- - Test execution timeout is now configurable using the BUILD_TIMEOUT environment
- variable.
- - Framework now uses TFTP/PXE rather than gPXE to simplify solution and remove
- dependency on non-ubuntu codebase.
- - First -desktop test case (thanks to jibel for that).
- - Refactoring of packages to seperate -server and -desktop
- + ubuntu-server-iso-testing - Server ISO Test cases
- + ubuntu-desktop-iso-testing - Desktop ISO Test cases
- + ubuntu-iso-testing-common - common python components
- + hudson-slave - helper script and dependencies for Hudson slave setup and
- execution
- - ec2 based master server: http://hudson.qa.ubuntu-uk.org
-
-
-Work items:
-
- - [james-page] make slave more contained to support firewalled network:
- + move all couchdb info to be local to slave: DONE
- - [james-page] Provide a Debian package to setup a Hudson slave on a system: DONE
- - [james-page] Provide a package in PPA for installing a slave: DONE
- + ppa:james-page/usit
- - [james-page] fix iso download <-> overall build time out of 20 minutes: it can take more
- than 20 minutes to download a new iso (eg initial run - no iso are cached): DONE
- + TEST_TIMEOUT is now configurable using an environment variable - defaults to 20 mins.
- - [james-page] Refactor gPXE -> PXE to provide wider support and cleaner install: DONE
- - [james-page] Use apt-proxy or alternative mirrors to decrease test times:
- add to documentation : DONE
- - [jibel] Support automated -desktop iso testing : DONE
- - [james-page] handle multiple job run on each slave:
- + fix iso cache component to support multiple execution of
- configure_and_run_test.
-
-
-0.2
-===
-
-Schedule release date:
- Demo at the server team mumble meeting on Tuesday, Oct 5th 2010.
-
-User stories:
- + The hudson master runs in an instance in EC2.
- + Couchdb server runs locally with the slave.
- + Hudson slaves run on mathiaz laptop and james laptop.
- + mathiaz can debug failing tests that have executed on james laptop
- when james laptop is powered off.
- + daily -server isos are automatically tested by Hudson.
-
-Assumptions:
- + Hudson slaves and test vms have access to the internet.
- + Hudson slaves can only run 1 job at a time because of iso caching.
-
-Work items:
-
- DONE:
- - Remove mathiaz acccount and ssh key and replace with ubuntu [DONE]
- - Introduce sleep to run_test script to allow apps to start - 30 seconds sleep. [DONE]
- - Fix tomcat server test. [DONE]
- - Support multiple hudson slaves [DONE]:
- + cache isos on each slave - use zsync:
- + Move logic to configure_and_run_test script
- - pass build number to determine whether correct version in local cache.
- The build number is the date of the iso - available on cdimage in
- the folder name (not using current).
- + don't send qcow2 files to hudson workspace [DONE].
- + clean up hudson slave once the test has been executed:
- - clean up libvirt configuration, qcow files and other local files. [DONE]
- - Amend configure_and_run_by_uuid.py to tidyup dnsmasq.d directory
- post execution. [DONE]
- + Add an overall build timeout in the slave configure_and_run_test script
- of 20 minutes [DONE]
- + workspace sync post test execution to master (ie push back workspace from
- slaves to master). [DONE]
- - automated trigger to test daily -server isos [DONE]:
- + [mathiaz] ping marc tardic (cr3) about daily cron job that watches new
- isos in the certification lab.
- + write hudson job that leverage script above to automatically test -server
- isos.
- - [mathiaz] setup master in Rackspace Cloud. [DONE]
- - [james-page] remove initrd and kernel from artifacts to minimise upload. [DONE]
- - [james-page] update documentation to move couchdb to slave. [DONE]
- - [james-page] setup and test additional hudson slave.
-
-0.1
-===
-Initial release:
- - all-in-one setup.
-
-
=== removed file 'docs/README'
--- docs/README 2011-01-12 20:47:12 +0000
+++ docs/README 1970-01-01 00:00:00 +0000
@@ -1,168 +0,0 @@
-.. vim: set ft=rst tw=79:
-
-Overview
-========
-
-This documents outlines the use of the automated ISO testing scripts put
-together by Mathias Gug.
-
-At a high level, the scripts use
-
-* CouchDB to setup test configuration and store test results
-* Jinja2 to generate configurations for each test using templates
-* gPXE, libvirt and kvm to execute ISO build and task sel tests
-* dnsmasq to control the gPXE boot processes
-
-This framework has been amended/supplement by James Page to build integration
-points with Hudson to facilitate parametrised setup, automated job creation
-and execution and reporting of test results.
-
-Hudson Integration
-==================
-
-Hudson Overview
----------------
-
-The standalone testing framework described above has been extended to allow
-easy integration into Hudson.
-
-Hudson's basic concept is that of a **project** - this is a set of steps which
-is executed either manually or based on a trigger of some description.
-
-The following project is configured for execution of testing jobs (one for each
-preseed/iso combination).
-
-<isoname>-<preseed>
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Automatically created job which triggers based on a new ISO being dropped onto
-cdimage.ubuntu.com.
-
-Executes the run-test.py script which:
- * Checks that the latest ISO image is located in the local cache
- (and downloads if need be)
- * Executes the test setup
- * Executes the test
-
-Monitors test execution (see the console output) and then scans results to
-generate a testing report.
-
-Also grabs all attachments and the virtual machine images and drops them into
-the workspace folder.
-
-These jobs are configured to run on nodes with the **virtual-host** label.
-
-The job will track test success over time and generate some nice graphs.
-
-
-Hudson Master Host Setup
-------------------------
-
-Overview
-~~~~~~~~
-
-The Hudson master is this implementation is design to act as a control point
-rather than executing any of the actual ISO tests.
-
-This allows it to be located on minimal hardware or in a cloud based location.
-ISO test execution is completed by Hudson slave nodes.
-
-Install Hudson
-~~~~~~~~~~~~~~
-
-See Hudson Labs http://pkg.hudson-labs.org/debian - nicely packaged for ease
-of use using apt.
-
-Accessed on http://hostname:8080 once installed.
-
-Once installed go to Manage Hudson -> Configure System and set the Hudson
-URL parameter at the bottom of the page as the projects rely on this being
-setup correctly (won't try to communicate with Hudson if not set).
-
-Then install the following plugins
-
-* Hudson disk-usage plugin
-* URL Change Trigger
-* Rebuilder
-
-
-The hudson user will also need to be added to the shadow group to provide
-access to the /etc/shadow file for UNIX based authentication.
-
-Hudson Slave Host Setup
------------------------
-
-Overview
-~~~~~~~~
-
-The hudson slave runs a simple java client which connects to the master server
-and executed jobs as part of a build farm.
-
-This is not current bundled seperately from Hudson, but is downloaded from the
-Hudson master server and then executed.
-
-Note that the slave *MUST* be hardware virtualisation capable as it relies on
-kvm and libvirt to execute test instances.
-
-Enable PPA repository and Install
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The latest version of the ubuntu-server-iso-testing package can be found at
-ppa:ubuntu-server-iso-testing-dev/testing.
-
-To enable the repository::
-
- sudo add-apt-repository ppa:ubuntu-server-iso-testing-dev/testing
-
-To install the ubuntu-server-iso-testing package::
-
- sudo apt-get install ubuntu-server-iso-testing
-
-This will install all dependencies and setup the system ready to execute
-ISO tests.
-
-Hudson Configuration
-^^^^^^^^^^^^^^^^^^^^
-
-The Hudson master server can be remotely configured with all of the required
-projects (tests) using the following command on the slave::
-
- setup-hudson -u <username> -p <password> -r <release> HUDSON_URL
-
-This can be run multiple times; it simple re-configures each project with the
-latest definition provided in the package.
-
-Hudson can localise the configuration of the TEST_TRACKER (i.e couchdb instance)
-for each slave instance; this is implemented by setting up an environment variable
-through the Hudson web interface.
-
-Manage Husdon -> Manage Nodes -> Configure Node; then add an environment
-variable defining the location of the CouchDB instance that the ISO
-testing scripts should use for execution::
-
- TEST_TRACKER=http://<IPADDRESS>:<5984>
-
-The following additional environment variables can be specified to create a localised
-configuration for a slave:
-
- * TEST_DATABASE (default:tests) - name of the couchdb database to use for testing.
- * TEST_TIMEOUT (default:1200) - time permitted for a VM to complete test execution
- before it is terminated by the run-tests script (useful for install hangs)
- * TEST_DIR (defaults:~/tests) - directory to use for storage of virtual machine
- images during testing.
-
-Download and execute the slave agent
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Execute the following command as the usit user::
-
- hudson-slave http://<hudsonmaster>:<port>/ &
-
-The script will by default use the hostname of the local box to login to the
-Hudson master server.
-
-Your slave should now be ready to rock-and-roll!
-
-If you want to start the slave automatically on boot, update /etc/default/hudson-slave
-to enable the hudson-slave upstart script and set the URL to the hudson master
-server.
=== removed file 'docs/README.dev'
--- docs/README.dev 2011-08-23 13:03:56 +0000
+++ docs/README.dev 1970-01-01 00:00:00 +0000
@@ -1,240 +0,0 @@
-.. vim: set ft=rst tw=79:
-
-Introduction
-============
-
-The purpose of this document is to outline the structure of the
-ubuntu-server-iso-testing project to enable developers and testers to easily
-develop new test cases and allow developers to submit new features to the
-codebase.
-
-
-Directory Layout of Source Code
-===============================
-
-\*.py : codebase that downloads ISO's and executes the test cases
-
-templates/* : templates and test cases for Ubuntu Server ISO
-
-templates.desktop/* : templates and test cases for Ubuntu Desktop ISO
-
-templates.altenate/* : templates and test cases for Ubuntu Alternate ISO
-
-templates.kernel/* : templates and test cases for Kernel testing
-
-wubi/* : Framework for Wubi testing
-
-debian/* : contains the Debian/Ubuntu packaging for this
-project.
-
-
-Codebase
-========
-
-download-latest-test-iso.py
----------------------------
-
-This script Scans cdimages.ubuntu.com to determine which set of ISO images
-constitute the latest published. This script support multi-releases and
-variants to allow the local ISO cache to be easily synced on demand. The
-code 'locks' to ensure that if multiple test runs are being execute from
-Jenkins only one will download the ISO image
-
-run-test.py
------------
-
-This script actually executes the test cases; it completes the following steps
-prior to executing the actual testing:
-
- * Initialises the jinja2 template environment using the templates(.*)
- directory and the preseed directory (templates(.*)/preseeds-common).
- * Creates the database to support the testing in the configured CouchDB
- instance if it does not already exist
- * Extracts the kernel and initrd from the ISO image
- * Generates the preseed configuration for the test case
- * Injects the preseed configuration into the initrd
- * Deploys the preseed to the local tftp server (dnsmasq)
- * Injects the run_test script into the initrd
- * TODO (jibel): Does something clever with casper for desktop.
- * Re-compresses the initrd and deploys to local tftp server
- * Deploys the kernel to the local tftp server
- * Deploys pxelinux.0 to the local tftp server
- * Creates and deploys the pxelinux configuration file to the local tftp
- server
- * Pushes the test scripts into the CouchDB instance
- * Generates and deploys the libvirt configuration including creating #
- disks (qcow2)
- * The configuration references the local ISO image on disk to support
- the automated install
- * Generates the dnsmasq tftp/dhcp configuration for the test case virtual
- machine and deploys it to the local dnsmasq instance
- * dnsmasq is restarted using sudo; this needs some attention as it is
- not multi test-instance safe.
- * Starts the virtual machine using virsh
-
-The virtual machine is then built from the ISO image using the preseed; The
-virtual machine state is monitored every 30 seconds - at this point the
-install log is also downloaded from the virtual machine (an apache instance
-is started early in the debian installer process - see the preseed config for
-details of this).
-
-When the virtual machine has powered off the test case is considered complete.
-The test will also timeout after a configurable time limit.
-
-The script then:
-
- * Downloads all of the information stored in the CouchDB instance to the
- local file system
- * Destroys the virtual machine configuration and deletes the disks
- * Deletes the entry from the CouchDB instance
- * Removes the configuration for the virtual machine from dnsmasq
- * Deletes the items from the tftp server associated with the test case
-
-If the state of the test in the CouchDB instance was 'tested' i.e. the test script ran and completed in the virtual machine, the script returns exit code 0; otherwise exit code 1 is returned.
-
-unbsdtar-safelink
------------------
-
-bsdtar (and tar) cannot extract a harlink from an archive if the target is not extracted first. This is the case for kernel on ISOs.
-This helper script takes care of this and extract a file from an ISO or the target of the file if it is a hardlink.
-
-Ubuntu Server Templates
-=======================
-
-Foreword
---------
-
-Ideally these templates should be stored in a separate bzr branch; this
-would allow the test case templates to be changed outside of the codebase.
-
-At the moment any changes to the templates requires a re-publish of the
-ubuntu-server-iso-testing package in the testing PPA.
-
-OR
-
-we could setup a daily build recipe to automate this process - may work but
-might not be quick enough.
-
-Preseed Templating
-------------------
-
-The test framework uses Jinga2 (as used in Django) to generate test case
-preseeds; these are built from two template locations:
-
-templates/preseeds-common/base
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This is the base preseed configuration used by all test cases; it contains
-a number of extension points in the template to allow it to be specialised
-by the individual test cases:
-
- * partman_auto_method - allow configuration of the partitioning scheme for
- the install; this is by default 'regular' but could be specialised to use
- lvm or RAID configurations
- * kernel_flavour - allows the kernel image to be specified - useful when
- writing test cases for minimal virtual installs that use the -virtual
- kernel
- * anna_modules - TODO
- * tasksel_first - defaults to 'Basic Ubuntu Server' - allows override in test
- cases to support other task selection activities.
- * pkgsel_first - by default installs the packages required to execute the test
- case including subunit and some support libraries.
- * d_i_answers - empty by default bu allows additional debian-installer answers
- to be configured in the test cases
- * preseed_extra - again empty by default but allows further specialisation in
- test case
-
-There are also a number of template variables which are populated during
-generation:
-
- * hostname - hostname of the virtual machine (normally a UUID)
- * proxyurl - URL of proxy to use - the packaging installs apt-cacher-ng
- to allow local network caching of packages to improve performance
- * test_case_url - this is the URL of the test case in the CouchDB instance;
- generated by run-test.py based on parameters and environment variable
- configurations.
-
-templates/test_cases/*
-~~~~~~~~~~~~~~~~~~~~~~
-
-The directories in this location are the specific test cases; each test case
-contains:
-
- * preseed : extends 'base' (see above) and adds specific preseed
- specialisation to support the test case (normally a tasksel).
- * test : a python unittest which is executed in the virtual machine
- after it is installed; this should complete the tests required to
- validate that the install has worked correctly.
-
-Look in this directory for a list of current test cases and some examples.
-
-run_test
---------
-
-This script is injected into the initrd image used to boot the installation
-of the virtual machine. Its normally installed to /usr/local/bin (see the base
-preseed configuration) and is executed once the virtual machine has booted for
-the first time.
-
-It completed the following steps:
-
- * Grabs the test script from the CouchDB instance (this is the 'test' file
- from the test_case - see above).
- * Executes the test script using subunit and subunit2junitxml
- * Grabs the resuling output and stores it in the CouchDB instance
-
-The test is then marked as 'tested' in the CouchDB instance and the virtual
-machine is powered off which signals to the run-test.py script that testing
-has been completed.
-
-In theory this script could be specialised on a per test case basis - however that would require some minor changes in run-test.py in order to accomodate this
-requirement.
-
-THEORY: test states in couchdb could be used to control and multi-reboot test
-case in-conjunction with this script; each boot would detect the current phase
-and then execute specific test scripts - the results of each would be stored
-in the CouchDB instance.
-
-libvirt.xml
------------
-
-This template contains the libvirt configuration used to specify the virtual machine. It does
-some basic Jinja2 templating to plug in variables for the specific test case instance. It also
-accomodates the specification of mulitple virtual disks (could be used for RAID testing).
-
-dnsmasq.conf
-------------
-
-The template contains the dnsmasq configuration using to enable the tftp booting of the virtual
-machine from the dnsmsaq tftp server. Again is used some basic Jinja2 templating to specify
-the variables associated with the specific test case instance.
-
-
-Ubuntu Desktop Templates
-========================
-
-Desktop images uses ubiquity instead of debian-installer. The differences with
-debian-installer based testing are:
-* Location and name of kernel and initrd on ISO differs.
-* Disk size and memory required to install and run a desktop environment are
- higher.
-* casper hook and custom-installation feature are used to provision the target
- testing environment.
-* a wrapper is used to preload the environment after the installation (install
- additional packages and specific gconf keys to enable accessibility)
-* custom-installation can be overloaded for specific tests. That's what is done
- for example to test a livesession where a specific rc.local is installed on
- the live cd image.
-* kernel command line is customized with a configuration file for each test. It
- uses a ConfigParser syntax. An example for OEM testing is:
- =====
- [pxelinux]
- kernel_boot_args=oem-config/enable=true automatic-ubiquity
- =====
-
-
-Ubuntu Alternate Templates
-==========================
-
-See Ubuntu Server Templates. This is the exact same mechanism and these 2 templates should actually be merged.
-
=== removed file 'docs/TODO'
--- docs/TODO 2011-01-12 22:03:09 +0000
+++ docs/TODO 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-.. vim: set ft=rst tw=79:
-.. When a release is done move all the features/info to the NEWS file.
-
-Next
-====
-
-Later
-=====
- - replace dnsmasq sudo restart command with dhcp-optsfile option as dnsmasq
- will reload it when SIGHUP is received. This will be faster than a restart
- via dnsmasq init script.
- - move all test to checkbox.
- - Update documentation to follow `Python Style Guide`_.
- - Support for testing on physical hardware using wake-on-lan and appropriate
- DHCP/PXE/TFTP configuration (see also hardware certification projects).
- - Automate AMI/EC2/UEC testing (using Hudson Plugin).
- - Refactor into library to ease re-use of IP in setup and execution scripts.
- - Find a nicer way to follow VM state.
- - Simplify architecture:
- Get rid of couchdb by extending Hudson to provide necessary information.
- Or
- Get rid of Hudson and write a couchapp to provide a shiny interface to
- test results.
-
-.. _Python Style Guide: http://docs.python.org/documenting/index.html
=== renamed file 'download-latest-test-iso.py' => 'download-latest-test-iso.py.THIS'
=== renamed file 'templates/libvirt.xml' => 'libvirt.xml'
=== added directory 'post_reboot_test_cases'
=== added directory 'post_reboot_test_cases/check-running-services'
=== added file 'post_reboot_test_cases/check-running-services/test'
--- post_reboot_test_cases/check-running-services/test 1970-01-01 00:00:00 +0000
+++ post_reboot_test_cases/check-running-services/test 2012-08-13 17:07:21 +0000
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+import logging
+import os.path
+import unittest
+import subprocess
+import difflib
+
+from boottests import RECORDED_SERVICES_PATH, get_service_info, get_recorded_service_info
+
+logging.basicConfig(level=logging.INFO)
+
+RECORDED_SERVICES_PATH = '/.recorded_services'
+
+class DefaultTest(unittest.TestCase):
+
+ @unittest.skipUnless(os.path.exists(RECORDED_SERVICES_PATH),'services not yet recorded')
+ def test_recorded_state(self):
+ previous_services = get_recorded_service_info()
+ new_services = get_service_info()
+ self.assertEqual(previous_services, new_services)
+
+if __name__ == '__main__':
+ unittest.main()
=== added symlink 'post_reboot_test_cases/lamp-reboot'
=== target is u'check-running-services'
=== renamed directory 'templates/preseeds-common' => 'preseeds-common'
=== modified file 'preseeds-common/base'
--- templates/preseeds-common/base 2011-08-25 22:14:14 +0000
+++ preseeds-common/base 2012-08-13 17:07:21 +0000
@@ -110,7 +110,9 @@
# You can choose from any of the predefined partitioning recipes.
# Note: this must be preseeded with a localized (translated) value.
+{% block partman_auto_recipe %}
d-i partman-auto/choose_recipe select All files in one partition (recommended for new users)
+{% endblock %}
#d-i partman-auto/choose_recipe \
# select Separate /home partition
#d-i partman-auto/choose_recipe \
@@ -226,7 +228,7 @@
{% endblock %}
{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml python-paramiko
d-i pkgsel/update-policy select No automatic updates
{% endblock %}
@@ -306,7 +308,7 @@
# packages and run commands in the target system.
#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
-d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
+d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; cp /boottests.py /target/usr/local/bin ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --debug --sleep 30 {{ test_case_url }}' > /etc/rc.local"
{% block preseed_extra %}
{% endblock %}
=== renamed file 'templates/pxelinuxcfg.install' => 'pxelinuxcfg.install'
=== renamed file 'run-test.py' => 'run-test.py.THIS'
=== renamed file 'templates/run_test' => 'run_test'
--- templates/run_test 2010-12-01 17:48:05 +0000
+++ run_test 2012-08-13 17:07:21 +0000
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+# Copyright (C) 2010, 2012, Canonical Ltd (http://www.canonical.com/)
#
# This file is part of ubuntu-server-iso-testing.
#
@@ -32,6 +32,9 @@
import couchdb
+# Private module
+from boottests import record_service_info
+
parser = optparse.OptionParser()
parser.add_option("", "--sleep", type="float",
help="Sleep before starting (in seconds)")
@@ -96,23 +99,49 @@
db = server[db_name]
test_id = p.split('/')[2]
logger.debug("Test id: %s" % (test_id))
+test_doc = db[test_id]
test_scripts = filter(lambda n: n.startswith('tests/'),
db[test_id]['_attachments'].keys())
+post_reboot_test_scripts = filter(lambda n: n.startswith('post-reboot-tests/'),
+ db[test_id]['_attachments'].keys())
+after='poweroff'
+result_key='results'
+state_key='tested'
+if len(post_reboot_test_scripts) == 0 and not test_doc['states'].has_key('testing'):
+ pass
+elif test_doc['states'].has_key('testing') and len(post_reboot_test_scripts):
+ result_key='post-reboot-results'
+ test_scripts=post_reboot_test_scripts
+ state_key='tested'
+ after='poweroff'
+elif len(post_reboot_test_scripts):
+ state_key='rebooted'
+ after='reboot'
+
+test_doc[result_key] = {}
+
logger.debug("Test scripts: %s" % (test_scripts))
-test_doc = db[test_id]
-test_doc['results'] = {}
-if test_doc['states'].has_key('testing'):
+if test_doc['states'].has_key('testing') and test_doc['states'].has_key('post_reboot'):
logging.warning('Test already run. Aborting.')
sys.exit(0)
+
test_doc['states']['testing'] = datetime.datetime.utcnow().isoformat()
db[test_id] = test_doc
l_cwd = os.getcwd()
+extra_env=dict(os.environ)
+if extra_env.has_key('PYTHONPATH'):
+ ppath_now = str(extra_env['PYTHONPATH']).split(':')
+ ppath_now.prepend('/usr/local/bin')
+ extra_env['PYTHONPATH'] = ppath_now
+else:
+ extra_env['PYTHONPATH'] = '/usr/local/bin'
+
for t in test_scripts:
logger.info("Running test %s" % (t))
report = { "started": datetime.datetime.utcnow().isoformat() }
test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
+ test_doc[result_key][os.path.basename(t)] = report
db[test_id] = test_doc
t_url = "%s/%s" % (test_docname, t)
logger.debug("Retrieving test script %s" % (t_url))
@@ -133,7 +162,7 @@
logger.debug("Cmd: %s" % (cmd))
testrun = subprocess.Popen(cmd,stdout=subprocess.PIPE,
- stderr=test_stderr_fh)
+ stderr=test_stderr_fh, env=extra_env)
cmd2 = ['subunit2junitxml']
logger.debug("Cmd: %s" % (cmd2))
@@ -148,7 +177,7 @@
test_stdout_fh.seek(0)
test_stderr_fh.seek(0)
test_doc = db[test_id]
- report = test_doc['results'][os.path.basename(t)]
+ report = test_doc[result_key][os.path.basename(t)]
report["returncode"] = subjunit.returncode
report["script_stdout"] = test_stdout_fh.read()
report["script_stderr"] = test_stderr_fh.read()
@@ -158,13 +187,15 @@
json.dump(report, local_report_fh)
local_report_fh.close()
test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
+ test_doc[result_key][os.path.basename(t)] = report
db[test_id] = test_doc
+if after == 'reboot':
+ record_service_info()
+
test_doc = db[test_id]
-test_doc['states']['tested'] = datetime.datetime.utcnow().isoformat()
+test_doc['states'][state_key] = datetime.datetime.utcnow().isoformat()
db[test_id] = test_doc
-cmd = ["poweroff"]
-logger.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
+logger.debug("Cmd: %s" % (after))
+subprocess.check_call([after])
=== removed directory 'templates'
=== removed file 'templates.alternate/libvirt.xml'
--- templates.alternate/libvirt.xml 2011-08-25 22:14:14 +0000
+++ templates.alternate/libvirt.xml 1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-<!--
- Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-
- This file is part of ubuntu-server-iso-testing.
-
- ubuntu-server-iso-testing is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- ubuntu-server-iso-testing is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ubuntu-server-iso-testing. If not, see
- <http://www.gnu.org/licenses/>.
--->
-<domain type='kvm'>
- <name>{{ name }}</name>
- <uuid>{{ uuid }}</uuid>
- <memory>1024000</memory>
- <vcpu>1</vcpu>
- <features>
- <acpi/>
- </features>
- <os>
- <type>hvm</type>
- <boot dev='hd' />
- <boot dev='network' />
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
-{% for disk in disks %}
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='{{ disk.source }}'/>
- <target dev='{{ disk.target }}' bus='{{ disk.bus }}'/>
- </disk>
-{% endfor %}
- <disk type='file' device='cdrom'>
- <source file='{{ iso_file }}'/>
- <target dev='hdc'/><readonly/>
- </disk>
- <interface type='network'>
- <mac address='{{ mac }}'/>
- <source network='iso-testing' />
- <model type='virtio'/>
- </interface>
- <graphics type='vnc' listen='0.0.0.0'/>
- <video>
- <model type='vga' vram='12288' heads='1'>
- <acceleration accel3d='yes' accel2d='yes'/>
- </model>
- </video>
- <serial type="file">
- <source path="/tmp/{{ uuid }}.syslog.log"/>
- <target port="0"/>
- </serial>
- </devices>
-</domain>
=== renamed file 'templates.alternate/preseeds-common/base' => 'templates.alternate/preseeds-common/base.THIS'
=== removed file 'templates.alternate/pxelinuxcfg.install'
--- templates.alternate/pxelinuxcfg.install 2011-08-23 06:59:35 +0000
+++ templates.alternate/pxelinuxcfg.install 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-prompt 0
-timeout 10
-default install
-
-label install
-kernel kernel.{{ uuid }}
-initrd initrd.{{ uuid }}
-append DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us {{ kernel_boot_args }}
=== removed file 'templates.alternate/run_test'
--- templates.alternate/run_test 2011-03-04 13:50:04 +0000
+++ templates.alternate/run_test 1970-01-01 00:00:00 +0000
@@ -1,170 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import datetime
-import json
-import logging, logging.handlers
-import optparse
-import os, os.path
-import subprocess
-import sys
-import time
-import urllib
-import urlparse
-
-import couchdb
-
-parser = optparse.OptionParser()
-parser.add_option("", "--sleep", type="float",
- help="Sleep before starting (in seconds)")
-parser.add_option("", "--syslog",
- dest="syslog", default=False, action="store_true",
- help="Log to syslog")
-parser.add_option("", "--debug",
- dest="debug", default=False, action="store_true",
- help="Turn debugging on")
-parser.add_option("", "--test-dir",
- default="/var/lib/tests",
- help="Directory to store tests data")
-(options, args) = parser.parse_args()
-
-LOG_LEVEL = logging.INFO
-if options.debug:
- LOG_LEVEL = logging.DEBUG
-
-# set up logging to file by default
-TEST_DIR = options.test_dir
-if not os.path.exists(TEST_DIR):
- os.makedirs(TEST_DIR)
-
-logger = logging.getLogger(os.path.basename(sys.argv[0]))
-logger.setLevel(LOG_LEVEL)
-file_hdlr = logging.FileHandler(mode='a',
- filename=os.path.join(options.test_dir,
- 'run.log'))
-fmt = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
-file_hdlr.setFormatter(fmt)
-logger.addHandler(file_hdlr)
-if options.debug:
- logger.debug("Adding console logger")
- console_hdlr = logging.StreamHandler()
- fmt = logging.Formatter('%(levelname)s %(message)s')
- console_hdlr.setFormatter(fmt)
- logger.addHandler(console_hdlr)
-if options.syslog:
- logger.debug("Adding syslog logger")
- syslog_hdlr = logging.handlers.SysLogHandler(address='/dev/log',
- facility=logging.handlers.SysLogHandler.LOG_DAEMON)
- fmt = logging.Formatter('%(name)s %(levelname)s %(message)s')
- syslog_hdlr.setFormatter(fmt)
- logger.addHandler(syslog_hdlr)
-
-logger.debug("Options: %s" % (options))
-logger.debug("Args: %s" % (args))
-
-if options.sleep:
- logger.info("Sleeping %s" % (options.sleep))
- time.sleep(options.sleep)
-
-logger.info("Starting test run")
-test_docname = args[0]
-logger.debug("Getting test script from %s" % (test_docname))
-(s, n, p, q, f) = urlparse.urlsplit(test_docname)
-server_url = "%s://%s/" % (s, n)
-logger.debug("Testracker server: %s" % (server_url))
-server = couchdb.client.Server(server_url)
-db_name = p.split('/')[1]
-logger.debug("Testracker db: %s" % (db_name))
-db = server[db_name]
-test_id = p.split('/')[2]
-logger.debug("Test id: %s" % (test_id))
-test_scripts = filter(lambda n: n.startswith('tests/'),
- db[test_id]['_attachments'].keys())
-logger.debug("Test scripts: %s" % (test_scripts))
-test_doc = db[test_id]
-test_doc['results'] = {}
-if test_doc['states'].has_key('testing'):
- logging.warning('Test already run. Aborting.')
- sys.exit(0)
-test_doc['states']['testing'] = datetime.datetime.utcnow().isoformat()
-db[test_id] = test_doc
-l_cwd = os.getcwd()
-
-for t in test_scripts:
- logger.info("Running test %s" % (t))
- report = { "started": datetime.datetime.utcnow().isoformat() }
- test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
- db[test_id] = test_doc
- t_url = "%s/%s" % (test_docname, t)
- logger.debug("Retrieving test script %s" % (t_url))
- t_dir = os.path.join(TEST_DIR, t)
- if not os.path.exists(t_dir):
- os.makedirs(t_dir)
- filename = os.path.join(t_dir, 'test.py')
- (filename, headers) = urllib.urlretrieve(t_url, filename=filename)
- os.chmod(filename, 0755)
-
- logger.debug("Creating test stdout and stderr files")
- test_stdout_fh = open(os.path.join(t_dir, "log.out"), mode='w+')
- test_stderr_fh = open(os.path.join(t_dir, "log.err"), mode='w+')
-
- logger.debug("Running script")
- os.chdir(t_dir)
- cmd = ['python','-m','subunit.run','test']
- logger.debug("Cmd: %s" % (cmd))
-
- testrun = subprocess.Popen(cmd,stdout=subprocess.PIPE,
- stderr=test_stderr_fh)
-
- cmd2 = ['subunit2junitxml']
- logger.debug("Cmd: %s" % (cmd2))
- subjunit = subprocess.Popen(cmd2, stdin=testrun.stdout,
- stdout=test_stdout_fh)
- testrun.wait()
- subjunit.wait()
-
- os.chdir(l_cwd)
-
- logger.debug("Generating report")
- test_stdout_fh.seek(0)
- test_stderr_fh.seek(0)
- test_doc = db[test_id]
- report = test_doc['results'][os.path.basename(t)]
- report["returncode"] = subjunit.returncode
- report["script_stdout"] = test_stdout_fh.read()
- report["script_stderr"] = test_stderr_fh.read()
- report["finished"] = datetime.datetime.utcnow().isoformat()
- logger.debug("Report: %s" % (report))
- local_report_fh = open(os.path.join(t_dir, 'report'), 'w')
- json.dump(report, local_report_fh)
- local_report_fh.close()
- test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
- db[test_id] = test_doc
-
-test_doc = db[test_id]
-test_doc['states']['tested'] = datetime.datetime.utcnow().isoformat()
-db[test_id] = test_doc
-
-cmd = ["poweroff"]
-logger.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
=== removed directory 'templates.alternate/test_cases'
=== removed directory 'templates.alternate/test_cases/default'
=== removed file 'templates.alternate/test_cases/default/preseed'
--- templates.alternate/test_cases/default/preseed 2011-03-04 13:50:04 +0000
+++ templates.alternate/test_cases/default/preseed 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
=== removed file 'templates.alternate/test_cases/default/test'
--- templates.alternate/test_cases/default/test 2011-03-04 13:50:04 +0000
+++ templates.alternate/test_cases/default/test 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-
-logging.basicConfig(level=logging.INFO)
-
-class DefaultTest(unittest.TestCase):
-
- def testReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.alternate/test_cases/lvm'
=== removed file 'templates.alternate/test_cases/lvm/preseed'
--- templates.alternate/test_cases/lvm/preseed 2011-08-16 14:50:49 +0000
+++ templates.alternate/test_cases/lvm/preseed 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-{% block partman_auto_method %}
-d-i partman-auto/method string lvm
-{% endblock %}
-
-{% block user_account %}
-# To create a normal user account.
-d-i passwd/user-fullname string Ubuntu
-d-i passwd/username string ubuntu
-# Normal user's password, either in clear text
-d-i passwd/user-password password !ubuntu123
-d-i passwd/user-password-again password !ubuntu123
-
-# Encrypt home directory
-d-i user-setup/encrypt-home boolean true
-{% endblock %}
-
-
=== removed file 'templates.alternate/test_cases/lvm/test'
--- templates.alternate/test_cases/lvm/test 2011-08-16 14:50:49 +0000
+++ templates.alternate/test_cases/lvm/test 1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010-2011, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-
-import logging
-import os
-import socket
-import subprocess
-import unittest
-import stat
-
-logging.basicConfig(level=logging.INFO)
-
-class LvmTest(unittest.TestCase):
- """ LVM + Encrypted Home Unit Tests """
- test_user = 'ubuntu'
- test_homedir = os.path.join('/home', test_user)
-
- def testRootMount(self):
- """Check if /dev/mapper is active and mounted"""
- cmd = ["mount"]
- logging.debug("Cmd: %s", (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
- logging.debug("Cmd output: %s", (output))
- self.assertTrue(len(output.split("\n")) > 0)
- l = output.split("\n")[0]
- self.assertTrue(l.startswith('/dev/mapper/'), l)
-
- def testVgs(self):
- """Check if there are any Volume Group available"""
- cmd = ["vgs", "--noheadings"]
- logging.debug("Cmd: %s", (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
- logging.debug("Cmd output: %s", (output))
- self.assertTrue(len(output.split("\n")) > 0)
- l = output.split("\n")[0]
- self.assertTrue(socket.gethostname() in l, l)
-
- def testLvs(self):
- """Check if there are any Logical Volume available"""
- cmd = ["lvs", "--noheadings"]
- logging.debug("Cmd: %s", (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
- logging.debug("Cmd output: %s", (output))
- self.assertTrue(len(output.split("\n")) > 0)
- l = output.split("\n")[0]
- self.assertTrue('root' in l, l)
-
- def testEncryptedHomePermissions(self):
- """Test permissions of encrypted home directory
- Must be owned by ubuntu and
- mode set to 0500 if not mounted or 0700 if mounted
- """
-
- self.assertTrue(os.path.exists(self.test_homedir),
- "HomeDir doesn't exists")
- mode = stat.S_IMODE(os.stat(self.test_homedir).st_mode)
- if not os.path.ismount(self.test_homedir):
- self.assertEqual(mode, 0500, "HomeDir shoulb be mode 0500")
- else:
- self.assertEqual(mode, 0700, "HomeDir shoulb be mode 0700")
-
- def testEncryptedHomeContent(self):
- """Test content of encrypted home directory
- Requires root access to access these links
-
- If it is not mounted there are 2 symlinks:
- Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
- README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
-
- """
- access_desktop = os.path.join(self.test_homedir,
- 'Access-Your-Private-Data.desktop')
- readme_txt = os.path.join(self.test_homedir, 'README.txt')
- private_dir = os.path.join(self.test_homedir, '.Private')
- if not os.path.ismount(self.test_homedir):
- are_links = os.path.islink(access_desktop) & \
- os.path.islink(readme_txt)
- self.assertTrue(are_links, "Expected symlinks not found")
- else:
- self.assertTrue(os.path.islink(private_dir),
- ".Private directory link not found")
-
-
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.alternate/test_cases/netboot_ubuntudesktop'
=== removed file 'templates.alternate/test_cases/netboot_ubuntudesktop/preseed'
--- templates.alternate/test_cases/netboot_ubuntudesktop/preseed 2011-08-23 06:59:35 +0000
+++ templates.alternate/test_cases/netboot_ubuntudesktop/preseed 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block partman_auto_method %}
-d-i partman-auto/method string regular
-d-i partman-auto/init_automatically_partition select Guided - use entire disk
-#d-i partman/choose_partition select Finish partitioning and write changes to disk
-#d-i partman/confirm boolean true
-{% endblock %}
-
-{% block tasksel_first %}
-tasksel tasksel/first multiselect Ubuntu desktop
-{% endblock %}
-
=== removed file 'templates.alternate/test_cases/netboot_ubuntudesktop/test'
--- templates.alternate/test_cases/netboot_ubuntudesktop/test 2011-08-23 06:59:35 +0000
+++ templates.alternate/test_cases/netboot_ubuntudesktop/test 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-
-logging.basicConfig(level=logging.INFO)
-
-class DefaultTest(unittest.TestCase):
-
- def testReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.alternate/test_cases/netboot_ubuntuserver'
=== removed file 'templates.alternate/test_cases/netboot_ubuntuserver/preseed'
--- templates.alternate/test_cases/netboot_ubuntuserver/preseed 2011-08-23 06:59:35 +0000
+++ templates.alternate/test_cases/netboot_ubuntuserver/preseed 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block partman_auto_method %}
-d-i partman-auto/method string regular
-d-i partman-auto/init_automatically_partition select Guided - use entire disk
-#d-i partman/choose_partition select Finish partitioning and write changes to disk
-#d-i partman/confirm boolean true
-{% endblock %}
-
-{% block tasksel_first %}
-tasksel tasksel/first multiselect Basic Ubuntu server
-{% endblock %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-server
-{% endblock %}
-
=== removed file 'templates.alternate/test_cases/netboot_ubuntuserver/test'
--- templates.alternate/test_cases/netboot_ubuntuserver/test 2011-08-23 06:59:35 +0000
+++ templates.alternate/test_cases/netboot_ubuntuserver/test 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-
-logging.basicConfig(level=logging.INFO)
-
-class DefaultTest(unittest.TestCase):
-
- def testReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.alternate/test_cases/oem'
=== removed file 'templates.alternate/test_cases/oem/config'
--- templates.alternate/test_cases/oem/config 2011-08-09 16:37:30 +0000
+++ templates.alternate/test_cases/oem/config 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-# Test Case specific configuration file
-[pxelinux]
-kernel_boot_args=oem-config/enable=true
=== removed file 'templates.alternate/test_cases/oem/preseed'
--- templates.alternate/test_cases/oem/preseed 2011-08-09 16:37:30 +0000
+++ templates.alternate/test_cases/oem/preseed 1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block user_account %}
-# OEM Install
-d-i passwd/allow-password-empty boolean true
-d-i passwd/user-fullname string OEM Configuration (temporary user)
-d-i passwd/username string oem
-d-i passwd/user-password string !ubuntu123
-d-i passwd/user-password-again string !ubuntu123
-{% endblock %}
-
-{% block oem_mode %}
-# enable oem mode
-d-i oem-config/enable boolean true
-d-i oem-config/id string USIT_OEM
-{% endblock %}
=== removed file 'templates.alternate/test_cases/oem/test'
--- templates.alternate/test_cases/oem/test 2011-08-09 16:37:30 +0000
+++ templates.alternate/test_cases/oem/test 1970-01-01 00:00:00 +0000
@@ -1,77 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-import subprocess
-
-logging.basicConfig(level=logging.INFO)
-
-def cmd(command, input = None, stderr = subprocess.STDOUT, stdout = subprocess.PIPE, stdin = None):
- '''Try to execute given command (array) and return its stdout, or return
- a textual error if it failed.'''
- try:
- sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True)
- except OSError, e:
- return [127, str(e)]
-
- out, outerr = sp.communicate(input)
- # Handle redirection of stdout
- if out == None:
- out = ''
- # Handle redirection of stderr
- if outerr == None:
- outerr = ''
- return [sp.returncode,out+outerr]
-
-
-class OemTest(unittest.TestCase):
- # Only works on english installation since Desktop is localized
- desktop_shortcut_path = '/home/oem/Desktop/oem-config-prepare-gtk.desktop'
-
- # The following packages must be installed
- oem_pkglist = (
- 'oem-config',
- 'oem-config-gtk'
- )
-
- def test_01ReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
- def test_02DesktopShortcutExists(self):
- """Test if the desktop shortcut has been created successfully"""
- self.assertTrue(os.path.exists(self.desktop_shortcut_path))
-
- def test_03OEMPkgInstalled(self):
- """Verify that OEM packages are installed"""
- for pkg in self.oem_pkglist:
- rc, report = cmd(['dpkg-query', '-W', pkg])
- expected = 0
- result = 'Got exit code %d, expected %d\n' % (rc, expected)
- self.assertEquals(expected, rc, result + report)
-
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.desktop/custom-installation'
=== removed directory 'templates.desktop/custom-installation/hooks'
=== removed file 'templates.desktop/custom-installation/hooks/casper-bottom.sh'
--- templates.desktop/custom-installation/hooks/casper-bottom.sh 2011-11-29 21:57:18 +0000
+++ templates.desktop/custom-installation/hooks/casper-bottom.sh 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-PREREQ=""
-DESCRIPTION="Running custom script..."
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-. /scripts/casper-functions
-
-log_begin_msg "$DESCRIPTION"
-
-gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
-
-gct() {
- if [ "$gconf_version" ]; then
- chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
- fi
-}
-
-create_desktopfile() {
- AUTOSTART_DIR=/root/home/$USERNAME/.config/autostart
- DESKTOP_FILE=smoketest.desktop
- mkdir -p $AUTOSTART_DIR
- cat > ${AUTOSTART_DIR}/${DESKTOP_FILE}<<EOF
-
-[Desktop Entry]
-Name=ISO SmokeTest
-Comment=ISO SmokeTest
-Exec=/usr/local/bin/run_test.wrapper --syslog --sleep 30 --test-dir=/home/${USERNAME}/tests {{ test_case_url }}
-OnlyShowIn=GNOME;
-NoDisplay=true
-Type=Application
-AutostartCondition=GNOME /desktop/gnome/interface/accessibility
-X-GNOME-Autostart-Phase=Applications
-X-GNOME-AutoRestart=true
-Name[en_US]=ISO SmokeTest
-Comment[en_US]=ISO SmokeTest
-X-GNOME-Autostart-enabled=true
-EOF
-}
-
-override_target() {
- # Override livefs environment with what has been loaded
- # on the live cd
- if [ -d /custom-installation ]; then
- cp -af /custom-installation/target-override/* /root/ || true
- rm -rf /custom-installation/target-override* || true
- fi
-}
-#gct -s -t bool /desktop/gnome/interface/accessibility true
-#create_desktopfile
-
-# Copy the test script which is run from the desktop file
-#cp /run_test.wrapper /root/usr/local/bin/
-#cp /run_test /root/usr/local/bin/
-
-override_target
-
-sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /root/etc/sudoers
-
-log_end_msg
=== removed file 'templates.desktop/custom-installation/hooks/casper-premount.sh'
--- templates.desktop/custom-installation/hooks/casper-premount.sh 2011-06-10 09:54:52 +0000
+++ templates.desktop/custom-installation/hooks/casper-premount.sh 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-#Add casper-premount commands here
-
=== removed file 'templates.desktop/custom-installation/hooks/early-command.sh'
--- templates.desktop/custom-installation/hooks/early-command.sh 2011-06-10 09:54:52 +0000
+++ templates.desktop/custom-installation/hooks/early-command.sh 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-#!/bin/sh
-#Add early commands here
=== removed file 'templates.desktop/custom-installation/hooks/failure-command.sh'
--- templates.desktop/custom-installation/hooks/failure-command.sh 2011-06-10 09:54:52 +0000
+++ templates.desktop/custom-installation/hooks/failure-command.sh 1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
-#!/bin/sh
-set -x
-
-poweroff
=== removed file 'templates.desktop/custom-installation/hooks/success-command.sh'
--- templates.desktop/custom-installation/hooks/success-command.sh 2011-06-10 09:54:52 +0000
+++ templates.desktop/custom-installation/hooks/success-command.sh 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-#!/bin/sh
-set -x
-
-#Override target
-if [ -d /custom-installation ]; then
- cp -af /custom-installation/target-override/* /target/ || true
- rm -rf /custom-installation/target-override* || true
-fi
-
-#Execute post installation steps here
-#Install external packages
-if [ -d /custom-installation/packages ]; then
- cp -af /custom-installation/packages /target/tmp/custom-packages || true
- mount -o bind /proc /target/proc || true
- mount -o bind /dev /target/dev || true
- for package in $(ls /custom-installation/packages); do
- package=$(basename $package)
- chroot /target /usr/bin/dpkg -i /tmp/custom-packages/$package || true
- done
- umount /target/proc || true
- umount /target/dev || true
-fi
-
=== removed directory 'templates.desktop/custom-installation/packages'
=== removed directory 'templates.desktop/custom-installation/target-override'
=== removed directory 'templates.desktop/custom-installation/target-override/etc'
=== removed directory 'templates.desktop/custom-installation/target-override/etc/rsyslog.d'
=== removed file 'templates.desktop/custom-installation/target-override/etc/rsyslog.d/50-default.conf'
--- templates.desktop/custom-installation/target-override/etc/rsyslog.d/50-default.conf 2011-11-29 21:57:18 +0000
+++ templates.desktop/custom-installation/target-override/etc/rsyslog.d/50-default.conf 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-# Default rules for rsyslog.
-#
-# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
-
-#
-# First some standard log files. Log by facility.
-#
-auth,authpriv.* /var/log/auth.log
-*.*;auth,authpriv.none -/dev/ttyS0
-*.*;auth,authpriv.none -/var/log/syslog
-#cron.* /var/log/cron.log
-#daemon.* -/var/log/daemon.log
-kern.* -/var/log/kern.log
-#lpr.* -/var/log/lpr.log
-mail.* -/var/log/mail.log
-#user.* -/var/log/user.log
-
-#
-# Logging for the mail system. Split it up so that
-# it is easy to write scripts to parse these files.
-#
-#mail.info -/var/log/mail.info
-#mail.warn -/var/log/mail.warn
-mail.err /var/log/mail.err
-
-#
-# Logging for INN news system.
-#
-news.crit /var/log/news/news.crit
-news.err /var/log/news/news.err
-news.notice -/var/log/news/news.notice
-
-#
-# Some "catch-all" log files.
-#
-#*.=debug;\
-# auth,authpriv.none;\
-# news.none;mail.none -/var/log/debug
-#*.=info;*.=notice;*.=warn;\
-# auth,authpriv.none;\
-# cron,daemon.none;\
-# mail,news.none -/var/log/messages
-
-#
-# Emergencies are sent to everybody logged in.
-#
-*.emerg *
-
-#
-# I like to have messages displayed on the console, but only on a virtual
-# console I usually leave idle.
-#
-#daemon,mail.*;\
-# news.=crit;news.=err;news.=notice;\
-# *.=debug;*.=info;\
-# *.=notice;*.=warn /dev/ttyS0
-
-# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
-# you must invoke `xconsole' with the `-file' option:
-#
-# $ xconsole -file /dev/xconsole [...]
-#
-# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
-# busy site..
-#
-daemon.*;mail.*;\
- news.err;\
- *.=debug;*.=info;\
- *.=notice;*.=warn |/dev/xconsole
=== removed file 'templates.desktop/libvirt.xml'
--- templates.desktop/libvirt.xml 2011-08-25 22:14:14 +0000
+++ templates.desktop/libvirt.xml 1970-01-01 00:00:00 +0000
@@ -1,66 +0,0 @@
-<!--
- Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-
- This file is part of ubuntu-server-iso-testing.
-
- ubuntu-server-iso-testing is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- ubuntu-server-iso-testing is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ubuntu-server-iso-testing. If not, see
- <http://www.gnu.org/licenses/>.
--->
-<domain type='kvm'>
- <name>{{ name }}</name>
- <uuid>{{ uuid }}</uuid>
- <memory>1024000</memory>
- <vcpu>1</vcpu>
- <features>
- <acpi/>
- </features>
- <os>
- <type>hvm</type>
- <boot dev='hd' />
- <boot dev='network' />
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
-{% for disk in disks %}
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='{{ disk.source }}'/>
- <target dev='{{ disk.target }}' bus='{{ disk.bus }}'/>
- </disk>
-{% endfor %}
- <disk type='file' device='cdrom'>
- <source file='{{ iso_file }}'/>
- <target dev='hdc'/>
- <readonly/>
- </disk>
- <interface type='network'>
- <mac address='{{ mac }}'/>
- <source network='iso-testing' />
- <model type='virtio'/>
- </interface>
- <graphics type='vnc' listen='0.0.0.0'/>
- <video>
- <model type='vga' vram='12288' heads='1'>
- <acceleration accel3d='yes' accel2d='yes'/>
- </model>
- </video>
- <serial type="file">
- <source path="/tmp/{{ uuid }}.syslog.log"/>
- <target port="0"/>
- </serial>
- </devices>
-</domain>
=== renamed file 'templates.desktop/preseeds-common/base' => 'templates.desktop/preseeds-common/base.THIS'
=== removed file 'templates.desktop/pxelinuxcfg.install'
--- templates.desktop/pxelinuxcfg.install 2011-11-29 21:57:18 +0000
+++ templates.desktop/pxelinuxcfg.install 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-prompt 0
-timeout 10
-default install
-
-label install
-kernel kernel.{{ uuid }}
-initrd initrd.{{ uuid }}
-append boot=casper DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us keyboard-configuration/layoutcode=fr keyboard-configuration/variantcode=oss noprompt console=ttyS0 {{ kernel_boot_args }}
-
=== removed file 'templates.desktop/run_test'
--- templates.desktop/run_test 2011-03-09 21:10:39 +0000
+++ templates.desktop/run_test 1970-01-01 00:00:00 +0000
@@ -1,170 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import datetime
-import json
-import logging, logging.handlers
-import optparse
-import os, os.path
-import subprocess
-import sys
-import time
-import urllib
-import urlparse
-
-import couchdb
-
-parser = optparse.OptionParser()
-parser.add_option("", "--sleep", type="float",
- help="Sleep before starting (in seconds)")
-parser.add_option("", "--syslog",
- dest="syslog", default=False, action="store_true",
- help="Log to syslog")
-parser.add_option("", "--debug",
- dest="debug", default=False, action="store_true",
- help="Turn debugging on")
-parser.add_option("", "--test-dir",
- default="/var/lib/tests",
- help="Directory to store tests data")
-(options, args) = parser.parse_args()
-
-LOG_LEVEL = logging.INFO
-if options.debug:
- LOG_LEVEL = logging.DEBUG
-
-# set up logging to file by default
-TEST_DIR = options.test_dir
-if not os.path.exists(TEST_DIR):
- os.makedirs(TEST_DIR)
-
-logger = logging.getLogger(os.path.basename(sys.argv[0]))
-logger.setLevel(LOG_LEVEL)
-file_hdlr = logging.FileHandler(mode='a',
- filename=os.path.join(options.test_dir,
- 'run.log'))
-fmt = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
-file_hdlr.setFormatter(fmt)
-logger.addHandler(file_hdlr)
-if options.debug:
- logger.debug("Adding console logger")
- console_hdlr = logging.StreamHandler()
- fmt = logging.Formatter('%(levelname)s %(message)s')
- console_hdlr.setFormatter(fmt)
- logger.addHandler(console_hdlr)
-if options.syslog:
- logger.debug("Adding syslog logger")
- syslog_hdlr = logging.handlers.SysLogHandler(address='/dev/log',
- facility=logging.handlers.SysLogHandler.LOG_DAEMON)
- fmt = logging.Formatter('%(name)s %(levelname)s %(message)s')
- syslog_hdlr.setFormatter(fmt)
- logger.addHandler(syslog_hdlr)
-
-logger.debug("Options: %s" % (options))
-logger.debug("Args: %s" % (args))
-
-if options.sleep:
- logger.info("Sleeping %s" % (options.sleep))
- time.sleep(options.sleep)
-
-logger.info("Starting test run")
-test_docname = args[0]
-logger.debug("Getting test script from %s" % (test_docname))
-(s, n, p, q, f) = urlparse.urlsplit(test_docname)
-server_url = "%s://%s/" % (s, n)
-logger.debug("Testracker server: %s" % (server_url))
-server = couchdb.client.Server(server_url)
-db_name = p.split('/')[1]
-logger.debug("Testracker db: %s" % (db_name))
-db = server[db_name]
-test_id = p.split('/')[2]
-logger.debug("Test id: %s" % (test_id))
-test_scripts = filter(lambda n: n.startswith('tests/'),
- db[test_id]['_attachments'].keys())
-logger.debug("Test scripts: %s" % (test_scripts))
-test_doc = db[test_id]
-test_doc['results'] = {}
-if test_doc['states'].has_key('testing'):
- logging.warning('Test already run. Aborting.')
- sys.exit(0)
-test_doc['states']['testing'] = datetime.datetime.utcnow().isoformat()
-db[test_id] = test_doc
-l_cwd = os.getcwd()
-
-for t in test_scripts:
- logger.info("Running test %s" % (t))
- report = { "started": datetime.datetime.utcnow().isoformat() }
- test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
- db[test_id] = test_doc
- t_url = "%s/%s" % (test_docname, t)
- logger.debug("Retrieving test script %s" % (t_url))
- t_dir = os.path.join(TEST_DIR, t)
- if not os.path.exists(t_dir):
- os.makedirs(t_dir)
- filename = os.path.join(t_dir, 'test.py')
- (filename, headers) = urllib.urlretrieve(t_url, filename=filename)
- os.chmod(filename, 0755)
-
- logger.debug("Creating test stdout and stderr files")
- test_stdout_fh = open(os.path.join(t_dir, "log.out"), mode='w+')
- test_stderr_fh = open(os.path.join(t_dir, "log.err"), mode='w+')
-
- logger.debug("Running script")
- os.chdir(t_dir)
- cmd = ['python','-m','subunit.run','test']
- logger.debug("Cmd: %s" % (cmd))
-
- testrun = subprocess.Popen(cmd,stdout=subprocess.PIPE,
- stderr=test_stderr_fh)
-
- cmd2 = ['subunit2junitxml']
- logger.debug("Cmd: %s" % (cmd2))
- subjunit = subprocess.Popen(cmd2, stdin=testrun.stdout,
- stdout=test_stdout_fh)
- testrun.wait()
- subjunit.wait()
-
- os.chdir(l_cwd)
-
- logger.debug("Generating report")
- test_stdout_fh.seek(0)
- test_stderr_fh.seek(0)
- test_doc = db[test_id]
- report = test_doc['results'][os.path.basename(t)]
- report["returncode"] = subjunit.returncode
- report["script_stdout"] = test_stdout_fh.read()
- report["script_stderr"] = test_stderr_fh.read()
- report["finished"] = datetime.datetime.utcnow().isoformat()
- logger.debug("Report: %s" % (report))
- local_report_fh = open(os.path.join(t_dir, 'report'), 'w')
- json.dump(report, local_report_fh)
- local_report_fh.close()
- test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
- db[test_id] = test_doc
-
-test_doc = db[test_id]
-test_doc['states']['tested'] = datetime.datetime.utcnow().isoformat()
-db[test_id] = test_doc
-
-cmd = ["sudo poweroff"]
-logger.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
=== removed file 'templates.desktop/run_test.wrapper'
--- templates.desktop/run_test.wrapper 2011-08-19 10:49:45 +0000
+++ templates.desktop/run_test.wrapper 1970-01-01 00:00:00 +0000
@@ -1,70 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-# Description:
-# This script checks prerequisites before executing the main python script
-# Since we are installing packages from the network it requires a working network :-)
-#
-
-check_prerequisites() {
- # Required packages
- local packages="python-couchdb subunit python-subunit python-junitxml ldtp python-ldtp"
-
- MISSING=""
- for pkg in $packages; do
- if ! dpkg-query -W -f '${Status}' $pkg 2>/dev/null|grep -qw ^install 2>&1; then
- MISSING="$MISSING $pkg"
- fi
- done
-
- if [ ! -z "$MISSING" ]; then
- sudo sh -c "echo deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) universe > /etc/apt/sources.list.d/universe.list"
- sudo apt-get update
- sudo apt-get install -qy $MISSING
-
- # Free some space on the livecd
- sudo apt-get clean
- sudo rm /etc/apt/sources.list.d/universe.list
- sudo apt-get update
- fi
-
-}
-
-sleep 30
-check_prerequisites
-
-RUNTEST=/usr/local/bin/run_test
-
-if [ -x "$RUNTEST" ]; then
- # Start a local http server to grab the logs
- cd /var/log; sudo python -m SimpleHTTPServer 80 &
- sleep 5
- # Sometimes at-spi hangs with no reason, refresh it
- sudo pkill /usr/lib/at-spi/at-spi-registryd
- sleep 5
- # Run ubiquity installation
- $RUNTEST $@
-
- # Shouldn't reach that point since poweroff is done is run_test
- sleep 30
- sudo poweroff
-fi
-
-
=== removed directory 'templates.desktop/test_cases'
=== removed directory 'templates.desktop/test_cases/default'
=== removed file 'templates.desktop/test_cases/default/config'
--- templates.desktop/test_cases/default/config 2011-08-19 10:49:45 +0000
+++ templates.desktop/test_cases/default/config 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-# Test Case specific configuration file
-[pxelinux]
-kernel_boot_args=automatic-ubiquity
=== removed file 'templates.desktop/test_cases/default/preseed'
--- templates.desktop/test_cases/default/preseed 2010-12-21 13:22:51 +0000
+++ templates.desktop/test_cases/default/preseed 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
=== removed file 'templates.desktop/test_cases/default/test'
--- templates.desktop/test_cases/default/test 2011-10-12 15:26:21 +0000
+++ templates.desktop/test_cases/default/test 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-import time, datetime
-
-logging.basicConfig(level=logging.DEBUG)
-
-class DefaultTest(unittest.TestCase):
-
- def test_10ReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
- def test_20DBusMachineId(self):
- """Test that machine Id is there and freshly generated"""
- machine_id = '/var/lib/dbus/machine-id'
-
- self.assertTrue(os.path.exists(machine_id))
-
- mid_mtime = os.path.getmtime(machine_id)
- now = time.mktime(datetime.datetime.now().timetuple())
-
- # Check that the machine-id is less than 120seconds old
- self.assertTrue((now - mid_mtime ) < 120 )
-
-if __name__ == '__main__':
- unittest.main()
=== removed file 'templates.desktop/test_cases/default/test_apps'
--- templates.desktop/test_cases/default/test_apps 2011-10-25 13:51:09 +0000
+++ templates.desktop/test_cases/default/test_apps 1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-""" Basic Desktop Application tests """
-
-import logging
-import os.path
-import unittest
-import subprocess
-from time import sleep
-from tempfile import NamedTemporaryFile
-
-logging.basicConfig(level=logging.DEBUG)
-
-class ApplicationsTest(unittest.TestCase):
- """Main Test Class"""
-
- def test_empty_startupapp(self):
- """Test that startup application list is empty"""
-
- # Imagemagick required
- try:
- cmd = ['dpkg-query', '-W', '-f', '${Status}', 'imagemagick']
- output = subprocess.Popen(cmd, stdout = subprocess.PIPE
- ).communicate()[0]
- if not output.startswith('install'):
- raise Exception('imagemagick is not installed')
- except:
- raise Exception('imagemagick is not correctly installed.\
-Please check your setup')
-
- appname = "gnome-session-properties"
- wm_name = "Startup Applications Preferences"
- # Start gnome-session-properties
- proc = subprocess.Popen(appname)
- sleep(1)
-
- # Generate a bunch of temporary file names
- (imgxwd, imgpng, imgblank, imgdiff) = [
- NamedTemporaryFile().name+ '.' + ext
- for ext in ('xwd','png','blank.png','diff.png')
- ]
-
- # Take a screenshot of the window and crop the application list
- # don't bother with decorations that will changes depending on
- # designer's mood
- imgsize = '400x300'
- cmd = ['xwd', '-name', wm_name, '-out', imgxwd ]
- subprocess.check_call(cmd)
- cmd = ['convert', '-crop', imgsize + '+30+55', '-monochrome', imgxwd,
- imgpng]
- subprocess.check_call(cmd)
-
- # Compare to an empty image
- cmd = ['convert', '-size', imgsize, 'xc:white', imgblank]
- subprocess.check_call(cmd)
-
- output = None
- try:
- # Note: compare outputs to stderr
- cmd = ['compare', '-metric', 'AE', imgpng, imgblank, imgdiff]
- output = subprocess.Popen(cmd, stderr = subprocess.PIPE
- ).communicate()[1]
- self.assertEqual(output.strip(), '0')
- os.unlink(imgdiff)
- except:
- raise AssertionError("'compare' call failed: %s", output)
- finally:
- # Close gnome-session-properties and clean temp files
- proc.kill()
- os.unlink(imgxwd)
- os.unlink(imgpng)
- os.unlink(imgblank)
-
-if __name__ == '__main__':
- """ Main loop """
- unittest.main()
=== removed directory 'templates.desktop/test_cases/encryptedhome'
=== removed file 'templates.desktop/test_cases/encryptedhome/config'
--- templates.desktop/test_cases/encryptedhome/config 2011-08-19 10:49:45 +0000
+++ templates.desktop/test_cases/encryptedhome/config 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-# Test Case specific configuration file
-[pxelinux]
-kernel_boot_args=automatic-ubiquity
=== removed file 'templates.desktop/test_cases/encryptedhome/preseed'
--- templates.desktop/test_cases/encryptedhome/preseed 2011-08-16 16:10:01 +0000
+++ templates.desktop/test_cases/encryptedhome/preseed 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block user_account %}
-# To create a normal user account.
-d-i passwd/user-fullname string Ubuntu
-d-i passwd/username string ubuntu
-# Normal user's password, either in clear text
-d-i passwd/user-password password !ubuntu123
-d-i passwd/user-password-again password !ubuntu123
-
-# Encrypt home directory
-# Auto-login and encrypted home are exclusives
-d-i user-setup/encrypt-home boolean true
-d-i passwd/auto-login boolean false
-{% endblock %}
=== removed file 'templates.desktop/test_cases/encryptedhome/test'
--- templates.desktop/test_cases/encryptedhome/test 2011-08-16 16:10:01 +0000
+++ templates.desktop/test_cases/encryptedhome/test 1970-01-01 00:00:00 +0000
@@ -1,77 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os
-import unittest
-import stat
-
-logging.basicConfig(level=logging.DEBUG)
-
-class DefaultTest(unittest.TestCase):
- """ LVM + Encrypted Home Unit Tests """
- test_user = 'ubuntu'
- test_homedir = os.path.join('/home', test_user)
-
- def test_read_write(self):
- """Basic RW test to check FS state"""
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
- def test_encrypted_home_permissions(self):
- """Test permissions of encrypted home directory
- Must be owned by ubuntu and
- mode set to 0500 if not mounted or 0700 if mounted
- """
-
- self.assertTrue(os.path.exists(self.test_homedir),
- "HomeDir doesn't exists")
- mode = stat.S_IMODE(os.stat(self.test_homedir).st_mode)
- if not os.path.ismount(self.test_homedir):
- self.assertEqual(mode, 0500, "HomeDir shoulb be mode 0500")
- else:
- self.assertEqual(mode, 0700, "HomeDir shoulb be mode 0700")
-
- def test_encrypted_home_content(self):
- """Test content of encrypted home directory
- Requires root access to access these links
-
- If it is not mounted there are 2 symlinks:
- Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
- README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
-
- """
- access_desktop = os.path.join(self.test_homedir,
- 'Access-Your-Private-Data.desktop')
- readme_txt = os.path.join(self.test_homedir, 'README.txt')
- private_dir = os.path.join(self.test_homedir, '.Private')
- if not os.path.ismount(self.test_homedir):
- are_links = os.path.islink(access_desktop) & \
- os.path.islink(readme_txt)
- self.assertTrue(are_links, "Expected symlinks not found")
- else:
- self.assertTrue(os.path.islink(private_dir),
- ".Private directory link not found")
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.desktop/test_cases/livesession'
=== removed directory 'templates.desktop/test_cases/livesession/custom-installation'
=== removed directory 'templates.desktop/test_cases/livesession/custom-installation/hooks'
=== removed file 'templates.desktop/test_cases/livesession/custom-installation/hooks/casper-bottom.sh'
--- templates.desktop/test_cases/livesession/custom-installation/hooks/casper-bottom.sh 2011-08-19 20:43:16 +0000
+++ templates.desktop/test_cases/livesession/custom-installation/hooks/casper-bottom.sh 1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-PREREQ=""
-DESCRIPTION="Running custom script..."
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-. /scripts/casper-functions
-
-log_begin_msg "$DESCRIPTION"
-
-gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
-
-gct() {
- if [ "$gconf_version" ]; then
- chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
- fi
-}
-
-create_desktopfile() {
- AUTOSTART_DIR=/root/home/$USERNAME/.config/autostart
- DESKTOP_FILE=smoketest.desktop
- mkdir -p $AUTOSTART_DIR
- cat > ${AUTOSTART_DIR}/${DESKTOP_FILE}<<EOF
-
-[Desktop Entry]
-Name=ISO SmokeTest
-Comment=ISO SmokeTest
-Exec=/usr/local/bin/run_test.wrapper --syslog --sleep 30 --test-dir=/home/${USERNAME}/tests {{ test_case_url }}
-OnlyShowIn=GNOME;
-NoDisplay=true
-Type=Application
-AutostartCondition=GNOME /desktop/gnome/interface/accessibility
-X-GNOME-Autostart-Phase=Applications
-X-GNOME-AutoRestart=true
-Name[en_US]=ISO SmokeTest
-Comment[en_US]=ISO SmokeTest
-X-GNOME-Autostart-enabled=true
-EOF
-}
-
-override_target() {
- # Override livefs environment with what has been loaded
- # on the live cd
- if [ -d /custom-installation ]; then
- cp -af /custom-installation/target-override/* /root/ || true
- rm -rf /custom-installation/target-override* || true
- fi
-}
-#gct -s -t bool /desktop/gnome/interface/accessibility true
-#create_desktopfile
-
-# Copy the test script which is run from the desktop file
-cp /run_test.wrapper /root/usr/local/bin/
-cp /run_test /root/usr/local/bin/
-cp /test.id /root/
-
-override_target
-
-sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /root/etc/sudoers
-
-log_end_msg
=== removed file 'templates.desktop/test_cases/livesession/custom-installation/hooks/casper-premount.sh'
--- templates.desktop/test_cases/livesession/custom-installation/hooks/casper-premount.sh 2011-08-19 10:49:45 +0000
+++ templates.desktop/test_cases/livesession/custom-installation/hooks/casper-premount.sh 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-#Add casper-premount commands here
-
=== removed directory 'templates.desktop/test_cases/livesession/custom-installation/packages'
=== removed directory 'templates.desktop/test_cases/livesession/custom-installation/target-override'
=== removed directory 'templates.desktop/test_cases/livesession/custom-installation/target-override/etc'
=== removed file 'templates.desktop/test_cases/livesession/custom-installation/target-override/etc/rc.local'
--- templates.desktop/test_cases/livesession/custom-installation/target-override/etc/rc.local 2011-08-19 10:49:45 +0000
+++ templates.desktop/test_cases/livesession/custom-installation/target-override/etc/rc.local 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-#!/bin/sh -e
-#
-# rc.local
-#
-# This script is executed at the end of each multiuser runlevel.
-# Make sure that the script will "exit 0" on success or any other
-# value on error.
-#
-# In order to enable or disable this script just change the execution
-# bits.
-#
-# By default this script does nothing.
-
-[ -f "/test.id" ] && . /test.id
-
-TEST_CASE_URL="${TEST_TRACKER}/${TEST_DATABASE}/${TEST_UUID}"
-
-echo "/usr/local/bin/run_test.wrapper --syslog --sleep 60 $TEST_CASE_URL" > /run.cmd
-
-exit 0
=== removed file 'templates.desktop/test_cases/livesession/preseed'
--- templates.desktop/test_cases/livesession/preseed 2011-08-19 10:49:45 +0000
+++ templates.desktop/test_cases/livesession/preseed 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
=== removed file 'templates.desktop/test_cases/livesession/test'
--- templates.desktop/test_cases/livesession/test 2011-10-12 15:26:21 +0000
+++ templates.desktop/test_cases/livesession/test 1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-import time, datetime
-
-logging.basicConfig(level=logging.DEBUG)
-
-class DefaultTest(unittest.TestCase):
- machine_id = '/var/lib/dbus/machine-id'
-
- def test_10ReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
- def test_20DBusMachineId(self):
- """Test that machine Id is there and freshly generated"""
-
- self.assertTrue(os.path.exists(self.machine_id))
-
- mid_mtime = os.path.getmtime(self.machine_id)
- now = time.mktime(datetime.datetime.now().timetuple())
-
- # Check that the machine-id is less than 120seconds old
- self.assertTrue((now - mid_mtime ) < 120 )
-
- def test_30NoRofsMachineId(self):
- """ machine-id must not exists on the rofs"""
- rofs_machine_id = os.path.join('/rofs', self.machine_id)
- self.assertFalse(os.path.exists(rofs_machine_id))
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.desktop/test_cases/oem'
=== removed file 'templates.desktop/test_cases/oem/config'
--- templates.desktop/test_cases/oem/config 2011-08-19 10:49:45 +0000
+++ templates.desktop/test_cases/oem/config 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-# Test Case specific configuration file
-[pxelinux]
-kernel_boot_args=oem-config/enable=true automatic-ubiquity
=== removed file 'templates.desktop/test_cases/oem/preseed'
--- templates.desktop/test_cases/oem/preseed 2011-08-11 15:26:22 +0000
+++ templates.desktop/test_cases/oem/preseed 1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block user_account %}
-# OEM Install
-d-i passwd/allow-password-empty boolean true
-d-i passwd/user-fullname string OEM Configuration (temporary user)
-d-i passwd/username string oem
-d-i passwd/user-password string !ubuntu123
-d-i passwd/user-password-again string !ubuntu123
-{% endblock %}
-
-{% block oem_mode %}
-# enable oem mode
-d-i oem-config/enable boolean true
-d-i oem-config/id string USIT_OEM
-{% endblock %}
=== removed file 'templates.desktop/test_cases/oem/test'
--- templates.desktop/test_cases/oem/test 2011-08-11 15:26:22 +0000
+++ templates.desktop/test_cases/oem/test 1970-01-01 00:00:00 +0000
@@ -1,77 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-import subprocess
-
-logging.basicConfig(level=logging.INFO)
-
-def cmd(command, input = None, stderr = subprocess.STDOUT, stdout = subprocess.PIPE, stdin = None):
- '''Try to execute given command (array) and return its stdout, or return
- a textual error if it failed.'''
- try:
- sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True)
- except OSError, e:
- return [127, str(e)]
-
- out, outerr = sp.communicate(input)
- # Handle redirection of stdout
- if out == None:
- out = ''
- # Handle redirection of stderr
- if outerr == None:
- outerr = ''
- return [sp.returncode,out+outerr]
-
-
-class OemTest(unittest.TestCase):
- # Only works on english installation since Desktop is localized
- desktop_shortcut_path = '/home/oem/Desktop/oem-config-prepare-gtk.desktop'
-
- # The following packages must be installed
- oem_pkglist = (
- 'oem-config',
- 'oem-config-gtk'
- )
-
- def test_01ReadWrite(self):
- t_fh = open(os.path.join('/tmp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
- def test_02DesktopShortcutExists(self):
- """Test if the desktop shortcut has been created successfully"""
- self.assertTrue(os.path.exists(self.desktop_shortcut_path))
-
- def test_03OEMPkgInstalled(self):
- """Verify that OEM packages are installed"""
- for pkg in self.oem_pkglist:
- rc, report = cmd(['dpkg-query', '-W', pkg])
- expected = 0
- result = 'Got exit code %d, expected %d\n' % (rc, expected)
- self.assertEquals(expected, rc, result + report)
-
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.desktop/test_cases/ubiquity'
=== removed file 'templates.desktop/test_cases/ubiquity/preseed'
--- templates.desktop/test_cases/ubiquity/preseed 2011-03-09 21:10:39 +0000
+++ templates.desktop/test_cases/ubiquity/preseed 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
=== removed file 'templates.desktop/test_cases/ubiquity/test'
--- templates.desktop/test_cases/ubiquity/test 2011-04-19 09:22:41 +0000
+++ templates.desktop/test_cases/ubiquity/test 1970-01-01 00:00:00 +0000
@@ -1,150 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-import ldtp, ooldtp
-from time import sleep
-
-logging.basicConfig(level=logging.DEBUG)
-
-
-class DefaultTest(unittest.TestCase):
- main_window = 'frmlive_installer'
- btn_forward = 'btnnext'
- btn_installnow = 'btnnext'
- rbtn_useentiredisk = 'rbtnusedevice'
- rbtn_loginautomatically = 'rbtnloginauto'
-
- txt_location = 'txttimezonecityentry' # Timezone selector
- txt_fullname = 'txtfullname'
- txt_hostname = 'txthostname'
- txt_username = 'txtusername'
- txt_password1 = 'txtpassword' # Password
- txt_password2 = 'txtverifiedpassword' # Password confirmation
-
-
- def _waittillenabled(self, ui, component_name, timeout = 300):
- ldtp.wait(15) # UI is slow to react sometimes
- component = ui.getchild(component_name)
- while not component.stateenabled():
- logging.debug("SMOKETEST: Waiting for %s. Till %d to go" % (component_name, timeout))
- ldtp.wait(15)
- timeout -= 15
- if timeout < 0: return False
- #ldtp.wait(2)
- return True
-
- def test_01Ubiquity(self):
- # Content to fill the forms with
- data = {
- 'location':'London',
- 'fullname':'Ubuntu Smoke Test User',
- 'hostname':'smoketest',
- 'username':'ubuntu',
- 'password1':'ubuntu',
- 'password2':'ubuntu'
- }
-
-
- # Give time for LDTP to start up
- logging.info("SMOKETEST: Sleeping for 5s")
- sleep(5)
-
- logging.info("SMOKETEST: Launching Ubiquity")
- ldtp.launchapp('ubiquity', ['gtk_ui'])
- ldtp.waittillguiexist(self.main_window)
- ldtp.wait(30) # Ubiquity in a VM is sooo sloooow
- ui = ooldtp.context(self.main_window)
-
- # First Screen
- logging.info("SMOKETEST: Welcome Screen")
- ldtp.wait(30)
- ui.click(self.btn_forward)
- self._waittillenabled(ui, self.btn_forward)
-
- # Choose here if you want to install stuff from network
- logging.info("SMOKETEST: Preparing to install Ubuntu")
- logging.info("SMOKETEST: Leave defaults")
- ui.click(self.btn_forward)
- self._waittillenabled(ui, self.btn_forward)
-
- # Drive setup
- logging.info("SMOKETEST: Allocate Disk Drive")
- logging.info("SMOKETEST: Use entire partition")
- ui.click(self.rbtn_useentiredisk)
- ui.click(self.btn_forward)
- ldtp.wait(30)
- ui.remap()
- ldtp.wait(30)
- self._waittillenabled(ui, self.btn_installnow)
-
- logging.info("SMOKETEST: Allocate Drive Space")
- logging.info("SMOKETEST: Leave defaults")
- ui.click(self.btn_installnow)
- ui.remap()
- ldtp.wait(30)
-
- # Location
- logging.info("SMOKETEST: Where are you")
- #self._waittillenabled(ui, self.btn_forward)
- ui.settextvalue(self.txt_location, data['location'])
- ui.click(self.btn_forward)
- self._waittillenabled(ui, self.btn_forward)
-
- # Keyboard
- logging.info("SMOKETEST: Keyboard Layout")
- ui.click(self.btn_forward)
- self._waittillenabled(ui, self.btn_forward)
-
- # User Identity
- logging.debug("SMOKETEST: Who are you?")
- ui.settextvalue(self.txt_fullname, data['fullname'])
- ui.settextvalue(self.txt_hostname, data['hostname'])
- ui.settextvalue(self.txt_username, data['username'])
- ui.settextvalue(self.txt_password1, data['password1'])
- ui.settextvalue(self.txt_password2, data['password2'])
- ui.click(self.rbtn_loginautomatically)
- ldtp.wait(30)
- ui.click(self.btn_forward)
-
- ldtp.wait(30)
- #if ui.guiexist(self.btn_forward):
- # component = ui.getchild(self.btn_forward)
- # if component.stateenabled():
- # ui.click(self.btn_forward)
-
- ldtp.waittillguiexist('dlgfinished_dialog', guiTimeOut = 60 * 20)
-
- ldtp.wait(30)
-
- # Don't reboot just verify that ubiquity is done
- self.assertTrue(ldtp.guiexist('dlgfinished_dialog', 'btnrebootbutton'))
-
- # TODO:
- # Execute here steps to setup pan boot tests
- # Do not reboot here otherwise, the parent script will be interupted
- if ldtp.guiexist('dlgfinished_dialog', 'btnrebootbutton'):
- ldtp.click('dlgfinished_dialog', 'btnquitbutton')
-
-if __name__ == '__main__':
- unittest.main()
=== removed file 'templates.kernel/libvirt.xml'
--- templates.kernel/libvirt.xml 2011-08-25 22:14:14 +0000
+++ templates.kernel/libvirt.xml 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
-<!--
- Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-
- This file is part of ubuntu-server-iso-testing.
-
- ubuntu-server-iso-testing is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- ubuntu-server-iso-testing is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ubuntu-server-iso-testing. If not, see
- <http://www.gnu.org/licenses/>.
--->
-<domain type='kvm'>
- <name>{{ name }}</name>
- <uuid>{{ uuid }}</uuid>
- <memory>450000</memory>
- <vcpu>1</vcpu>
- <features>
- <acpi/>
- </features>
- <os>
- <type>hvm</type>
- <boot dev='hd' />
- <boot dev='network' />
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
-{% for disk in disks %}
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='{{ disk.source }}'/>
- <target dev='{{ disk.target }}' bus='{{ disk.bus }}'/>
- </disk>
-{% endfor %}
- <disk type='file' device='cdrom'>
- <source file='{{ iso_file }}'/>
- <target dev='hdc'/><readonly/>
- </disk>
- <interface type='network'>
- <mac address='{{ mac }}'/>
- <source network='iso-testing' />
- <model type='virtio'/>
- </interface>
- <graphics type='vnc' listen='0.0.0.0'/>
- <serial type="file">
- <source path="/tmp/{{ uuid }}.syslog.log"/>
- <target port="0"/>
- </serial>
- </devices>
-</domain>
=== removed file 'templates.kernel/ltp2junitxml.py'
--- templates.kernel/ltp2junitxml.py 2011-06-14 14:29:26 +0000
+++ templates.kernel/ltp2junitxml.py 1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
-#!/usr/bin/python
-
-import optparse
-import logging
-import os
-import re
-
-JUNIT_HEADER='<testsuite errors="0" failures="%s" name="autotest" tests="%s" time="0">'
-JUNIT_FOOTER='</testsuite>'
-JUNIT_TEST_ENTRY='<testcase classname="%s" name="%s" time="0"/>'
-JUNIT_TEST_FAILED_ENTRY='<testcase classname="%s" name="%s" time="0">'
-JUNIT_TEST_FAILED_ENTRY_FOOTER='</testcase>'
-JUNIT_FAILURE_START='<failure><![CDATA['
-JUNIT_FAILURE_END=']]></failure>'
-PASS_RE='(.*) (\d) TPASS : (.*)'
-FAIL_RE='(.*) (\d) TFAIL : (.*)'
-
-usage="usage: %prog [options] preseed1"
-parser = optparse.OptionParser(usage=usage)
-parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False,
- help="enable debugging")
-(options, args) = parser.parse_args()
-if options.debug:
- logging.basicConfig(level=logging.DEBUG)
-else:
- logging.basicConfig(level=logging.INFO)
-
-f = open(args[0])
-
-parent = False
-in_test_case = False
-start_timestamp = None
-test_name = ""
-test_status = ""
-test_count = 0
-test_failures_count = 0
-error = ""
-
-tests = []
-
-contents = f.read()
-
-#print contents
-
-passes = re.findall(PASS_RE,contents)
-fails = re.findall(FAIL_RE,contents)
-
-print JUNIT_HEADER % (len(fails),len(fails)+len(passes))
-
-for x in passes:
- name = x[0].strip()
- iteration = x[1]
- print JUNIT_TEST_ENTRY % (name,name+iteration)
-
-for x in fails:
- name = x[0].strip()
- iteration = x[1]
- print JUNIT_TEST_FAILED_ENTRY % (name,name+iteration)
- print JUNIT_FAILURE_START
- print x[2]
- print JUNIT_FAILURE_END
- print JUNIT_TEST_FAILED_ENTRY_FOOTER
-
-print JUNIT_FOOTER
-
-
-
-
=== removed directory 'templates.kernel/preseeds-common'
=== removed file 'templates.kernel/preseeds-common/base'
--- templates.kernel/preseeds-common/base 2011-08-25 22:14:14 +0000
+++ templates.kernel/preseeds-common/base 1970-01-01 00:00:00 +0000
@@ -1,315 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-### Localization
-# Locale sets language and country.
-d-i debian-installer/locale string en_US.UTF-8
-
-# Keyboard selection.
-# Disable automatic (interactive) keymap detection.
-d-i console-setup/ask_detect boolean false
-#d-i console-setup/modelcode string pc105
-d-i console-setup/layoutcode string us
-# To select a variant of the selected layout (if you leave this out, the
-# basic form of the layout will be used):
-#d-i console-setup/variantcode string dvorak
-
-# start the HTTP server early, so that we can grab the d-i log
-# # will be executed after network initialisation is completed.
-#d-i preseed/early_command string httpd
-
-### Network configuration
-# netcfg will choose an interface that has link if possible. This makes it
-# skip displaying a list if there is more than one interface.
-d-i netcfg/choose_interface select auto
-
-# To pick a particular interface instead:
-#d-i netcfg/choose_interface select eth1
-
-# If you have a slow dhcp server and the installer times out waiting for
-# it, this might be useful.
-d-i netcfg/dhcp_timeout string 180
-
-# If you prefer to configure the network manually, uncomment this line and
-# the static network configuration below.
-#d-i netcfg/disable_dhcp boolean true
-
-# If you want the preconfiguration file to work on systems both with and
-# without a dhcp server, uncomment these lines and the static network
-# configuration below.
-#d-i netcfg/dhcp_failed note
-#d-i netcfg/dhcp_options select Configure network manually
-
-# Static network configuration.
-#d-i netcfg/get_nameservers string 192.168.1.1
-#d-i netcfg/get_ipaddress string 192.168.1.42
-#d-i netcfg/get_netmask string 255.255.255.0
-#d-i netcfg/get_gateway string 192.168.1.1
-#d-i netcfg/confirm_static boolean true
-
-# Any hostname and domain names assigned from dhcp take precedence over
-# values set here. However, setting the values still prevents the questions
-# from being shown, even if values come from dhcp.
-d-i netcfg/get_hostname string {{ hostname }}
-d-i netcfg/get_domain string unassigned-domain
-
-# Disable that annoying WEP key dialog.
-d-i netcfg/wireless_wep string
-# The wacky dhcp hostname that some ISPs use as a password of sorts.
-#d-i netcfg/dhcp_hostname string radish
-
-
-### Mirror settings
-#d-i mirror/country string enter information manually
-#d-i mirror/http/hostname string mirror:3142
-#d-i mirror/http/directory string /ubuntu
-d-i mirror/http/proxy string {{ proxyurl }}
-
-# Suite to install.
-#d-i mirror/suite string feisty
-# Suite to use for loading installer components (optional).
-#d-i mirror/udeb/suite string feisty
-
-### Partitioning
-# If the system has free space you can choose to only partition that space.
-# Note: this must be preseeded with a localized (translated) value.
-#d-i partman-auto/init_automatically_partition \
-# select Use the largest continuous free space
-
-# Alternatively, you can specify a disk to partition. The device name must
-# be given in traditional non-devfs format.
-# For example, to use the first SCSI hard disk:
-d-i partman-auto/disk string /dev/vda
-{% block partman_auto_method %}
-d-i partman-auto/method string regular
-{% endblock %}
-
-# If one of the disks that are going to be automatically partitioned
-# contains an old LVM configuration, the user will normally receive a
-# warning. This can be preseeded away...
-d-i partman-lvm/device_remove_lvm boolean true
-# And the same goes for the confirmation to write the lvm partitions.
-d-i partman-lvm/confirm boolean true
-
-# You can choose from any of the predefined partitioning recipes.
-# Note: this must be preseeded with a localized (translated) value.
-d-i partman-auto/choose_recipe select All files in one partition (recommended for new users)
-#d-i partman-auto/choose_recipe \
-# select Separate /home partition
-#d-i partman-auto/choose_recipe \
-# select Separate /home, /usr, /var, and /tmp partitions
-
-# Or provide a recipe of your own...
-# The recipe format is documented in the file devel/partman-auto-recipe.txt.
-# If you have a way to get a recipe file into the d-i environment, you can
-# just point at it.
-#d-i partman-auto/expert_recipe_file string /hd-media/recipe
-
-# This makes partman automatically partition without confirmation.
-d-i partman-partitioning/choose_label string msdos
-d-i partman/confirm_write_new_label boolean true
-d-i partman/choose_partition select Finish partitioning and write changes to disk
-d-i partman/confirm boolean true
-d-i partman/confirm_nooverwrite boolean true
-d-i partman-lvm/confirm_nooverwrite boolean true
-
-### Clock and time zone setup
-# Controls whether or not the hardware clock is set to UTC.
-d-i clock-setup/utc boolean true
-
-# Only ask the UTC question if there are other operating systems installed.
-d-i clock-setup/utc-auto boolean true
-
-# You may set this to any valid setting for $TZ; see the contents of
-# /usr/share/zoneinfo/ for valid values.
-d-i time/zone string US/Eastern
-
-
-### Apt setup
-# You can choose to install restricted and universe software, or to install
-# software from the backports repository.
-#d-i apt-setup/restricted boolean true
-#d-i apt-setup/universe boolean true
-#d-i apt-setup/backports boolean true
-# Uncomment this to avoid adding security sources, or
-# add a hostname to use a different server than security.ubuntu.com.
-d-i apt-setup/security_host string
-
-{% block additional_repositories %}
-{% endblock %}
-
-# Additional repositories, local[0-9] available
-#d-i apt-setup/local0/repository string http://server/localrep/ ./
-#d-i apt-setup/local0/comment string Comment
-# Enable deb-src lines
-#d-i apt-setup/local0/source boolean true
-# URL to the public key of the local repository
-#d-i apt-setup/local0/key string http://server/localrep/key
-
-
-### Account setup
-# Skip creation of a root account (normal user account will be able to
-# use sudo). The default is false; preseed this to true if you want to set
-# a root password.
-#d-i passwd/root-login boolean false
-# Alternatively, to skip creation of a normal user account.
-#d-i passwd/make-user boolean false
-
-# Root password, either in clear text
-#d-i passwd/root-password password r00tme
-#d-i passwd/root-password-again password r00tme
-# or encrypted using an MD5 hash.
-#d-i passwd/root-password-crypted password [MD5 hash]
-
-# To create a normal user account.
-d-i passwd/user-fullname string Ubuntu
-d-i passwd/username string ubuntu
-# Normal user's password, either in clear text
-d-i passwd/user-password password !ubuntu123
-d-i passwd/user-password-again password !ubuntu123
-
-# No boot splash screen.
-d-i debian-installer/splash boolean false
-
-### Base system installation
-# Select the initramfs generator used to generate the initrd for 2.6 kernels.
-#d-i base-installer/kernel/linux/initramfs-generators string yaird
-
-# Install the different kernel flavor.
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-generic-pae
-{% endblock %}
-
-{% block anna_modules %}
-{% endblock %}
-
-### Boot loader installation
-# Grub is the default boot loader (for x86). If you want lilo installed
-# instead, uncomment this:
-#d-i grub-installer/skip boolean true
-
-# This is fairly safe to set, it makes grub install automatically to the MBR
-# if no other operating system is detected on the machine.
-d-i grub-installer/only_debian boolean true
-
-# This one makes grub-installer install to the MBR if if finds some other OS
-# too, which is less safe as it might not be able to boot that other OS.
-d-i grub-installer/with_other_os boolean true
-
-# Alternatively, if you want to install to a location other than the mbr,
-# uncomment and edit these lines:
-#d-i grub-installer/bootdev string (hd0,0)
-#d-i grub-installer/only_debian boolean false
-#d-i grub-installer/with_other_os boolean false
-
-# Wait for two seconds in grub
-d-i grub-installer/timeout string 2
-
-### Package selection
-
-{% block tasksel_first %}
-tasksel tasksel/first multiselect Basic Ubuntu server
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-# debian-installer preseeded answers should be in this block
-{% endblock %}
-
-# Only install basic language packs. Let tasksel ask about tasks.
-d-i pkgsel/language-pack-patterns string
-# No language support packages.
-d-i pkgsel/install-language-support boolean false
-
-# Some versions of the installer can report back on what software you have
-# installed, and what software you use. The default is not to report back,
-# but sending reports helps the project determine what software is most
-# popular and include it on CDs.
-#popularity-contest popularity-contest/participate boolean false
-
-### Finishing up the first stage install
-# Avoid that last message about the install being complete.
-d-i finish-install/reboot_in_progress note
-
-# This will prevent the installer from ejecting the CD during the reboot,
-# which is useful in some situations.
-#d-i cdrom-detect/eject boolean false
-
-
-### X configuration
-# X can detect the right driver for some cards, but if you're preseeding,
-# you override whatever it chooses. Still, vesa will work most places.
-#xserver-xorg xserver-xorg/config/device/driver select vesa
-
-# A caveat with mouse autodetection is that if it fails, X will retry it
-# over and over. So if it's preseeded to be done, there is a possibility of
-# an infinite loop if the mouse is not autodetected.
-#xserver-xorg xserver-xorg/autodetect_mouse boolean true
-
-# Monitor autodetection is recommended.
-#xserver-xorg xserver-xorg/autodetect_monitor boolean true
-# Uncomment if you have an LCD display.
-#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
-# X has three configuration paths for the monitor. Here's how to preseed
-# the "medium" path, which is always available. The "simple" path may not
-# be available, and the "advanced" path asks too many questions.
-#xserver-xorg xserver-xorg/config/monitor/selection-method \
-# select medium
-#xserver-xorg xserver-xorg/config/monitor/mode-list \
-# select 800x600 @ 60 Hz
-
-
-### Preseeding other packages
-# Depending on what software you choose to install, or if things go wrong
-# during the installation process, it's possible that other questions may
-# be asked. You can preseed those too, of course. To get a list of every
-# possible question that could be asked during an install, do an
-# installation, and then run these commands:
-# debconf-get-selections --installer > file
-# debconf-get-selections >> file
-
-
-
-### Shell commands
-# d-i preseeding is inherently not secure. Nothing in the installer checks
-# for attempts at buffer overflows or other exploits of the values of a
-# preconfiguration file like this one. Only use preconfiguration files from
-# trusted locations! To drive that home, and because it's generally useful,
-# here's a way to run any shell command you'd like inside the installer,
-# automatically.
-
-# This first command is run as early as possible, just after
-# preseeding is read.
-#d-i preseed/early_command string /cdrom/early_command
-
-# This command is run just before the install finishes, but when there is
-# still a usable /target directory. You can chroot to /target and use it
-# directly, or use the apt-install and in-target commands to easily install
-# packages and run commands in the target system.
-#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
-
-d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
-
-{% block preseed_extra %}
-{% endblock %}
=== removed file 'templates.kernel/pxelinuxcfg.install'
--- templates.kernel/pxelinuxcfg.install 2011-06-15 12:06:07 +0000
+++ templates.kernel/pxelinuxcfg.install 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-prompt 0
-timeout 10
-default install
-
-label install
-kernel kernel.{{ uuid }}
-initrd initrd.{{ uuid }}
-append file=/preseed DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us
-
=== removed file 'templates.kernel/run_test'
--- templates.kernel/run_test 2011-06-14 10:07:22 +0000
+++ templates.kernel/run_test 1970-01-01 00:00:00 +0000
@@ -1,170 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import datetime
-import json
-import logging, logging.handlers
-import optparse
-import os, os.path
-import subprocess
-import sys
-import time
-import urllib
-import urlparse
-
-import couchdb
-
-parser = optparse.OptionParser()
-parser.add_option("", "--sleep", type="float",
- help="Sleep before starting (in seconds)")
-parser.add_option("", "--syslog",
- dest="syslog", default=False, action="store_true",
- help="Log to syslog")
-parser.add_option("", "--debug",
- dest="debug", default=False, action="store_true",
- help="Turn debugging on")
-parser.add_option("", "--test-dir",
- default="/var/lib/tests",
- help="Directory to store tests data")
-(options, args) = parser.parse_args()
-
-LOG_LEVEL = logging.INFO
-if options.debug:
- LOG_LEVEL = logging.DEBUG
-
-# set up logging to file by default
-TEST_DIR = options.test_dir
-if not os.path.exists(TEST_DIR):
- os.makedirs(TEST_DIR)
-
-logger = logging.getLogger(os.path.basename(sys.argv[0]))
-logger.setLevel(LOG_LEVEL)
-file_hdlr = logging.FileHandler(mode='a',
- filename=os.path.join(options.test_dir,
- 'run.log'))
-fmt = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
-file_hdlr.setFormatter(fmt)
-logger.addHandler(file_hdlr)
-if options.debug:
- logger.debug("Adding console logger")
- console_hdlr = logging.StreamHandler()
- fmt = logging.Formatter('%(levelname)s %(message)s')
- console_hdlr.setFormatter(fmt)
- logger.addHandler(console_hdlr)
-if options.syslog:
- logger.debug("Adding syslog logger")
- syslog_hdlr = logging.handlers.SysLogHandler(address='/dev/log',
- facility=logging.handlers.SysLogHandler.LOG_DAEMON)
- fmt = logging.Formatter('%(name)s %(levelname)s %(message)s')
- syslog_hdlr.setFormatter(fmt)
- logger.addHandler(syslog_hdlr)
-
-logger.debug("Options: %s" % (options))
-logger.debug("Args: %s" % (args))
-
-if options.sleep:
- logger.info("Sleeping %s" % (options.sleep))
- time.sleep(options.sleep)
-
-logger.info("Starting test run")
-test_docname = args[0]
-logger.debug("Getting test script from %s" % (test_docname))
-(s, n, p, q, f) = urlparse.urlsplit(test_docname)
-server_url = "%s://%s/" % (s, n)
-logger.debug("Testracker server: %s" % (server_url))
-server = couchdb.client.Server(server_url)
-db_name = p.split('/')[1]
-logger.debug("Testracker db: %s" % (db_name))
-db = server[db_name]
-test_id = p.split('/')[2]
-logger.debug("Test id: %s" % (test_id))
-test_scripts = filter(lambda n: n.startswith('tests/'),
- db[test_id]['_attachments'].keys())
-logger.debug("Test scripts: %s" % (test_scripts))
-test_doc = db[test_id]
-test_doc['results'] = {}
-if test_doc['states'].has_key('testing'):
- logging.warning('Test already run. Aborting.')
- sys.exit(0)
-test_doc['states']['testing'] = datetime.datetime.utcnow().isoformat()
-db[test_id] = test_doc
-l_cwd = os.getcwd()
-
-for t in test_scripts:
- logger.info("Running test %s" % (t))
- report = { "started": datetime.datetime.utcnow().isoformat() }
- test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
- db[test_id] = test_doc
- t_url = "%s/%s" % (test_docname, t)
- logger.debug("Retrieving test script %s" % (t_url))
- t_dir = os.path.join(TEST_DIR, t)
- if not os.path.exists(t_dir):
- os.makedirs(t_dir)
- filename = os.path.join(t_dir, 'test.py')
- (filename, headers) = urllib.urlretrieve(t_url, filename=filename)
- os.chmod(filename, 0755)
-
- logger.debug("Creating test stdout and stderr files")
- test_stdout_fh = open(os.path.join(t_dir, "log.out"), mode='w+')
- test_stderr_fh = open(os.path.join(t_dir, "log.err"), mode='w+')
-
- logger.debug("Running script")
- os.chdir(t_dir)
- cmd = ['python','-m','subunit.run','test']
- logger.debug("Cmd: %s" % (cmd))
-
- testrun = subprocess.Popen(cmd,stdout=subprocess.PIPE,
- stderr=test_stderr_fh)
-
- cmd2 = ['subunit2junitxml']
- logger.debug("Cmd: %s" % (cmd2))
- subjunit = subprocess.Popen(cmd2, stdin=testrun.stdout,
- stdout=test_stdout_fh)
- testrun.wait()
- subjunit.wait()
-
- os.chdir(l_cwd)
-
- logger.debug("Generating report")
- test_stdout_fh.seek(0)
- test_stderr_fh.seek(0)
- test_doc = db[test_id]
- report = test_doc['results'][os.path.basename(t)]
- report["returncode"] = subjunit.returncode
- report["script_stdout"] = test_stdout_fh.read()
- report["script_stderr"] = test_stderr_fh.read()
- report["finished"] = datetime.datetime.utcnow().isoformat()
- logger.debug("Report: %s" % (report))
- local_report_fh = open(os.path.join(t_dir, 'report'), 'w')
- json.dump(report, local_report_fh)
- local_report_fh.close()
- test_doc = db[test_id]
- test_doc['results'][os.path.basename(t)] = report
- db[test_id] = test_doc
-
-test_doc = db[test_id]
-test_doc['states']['tested'] = datetime.datetime.utcnow().isoformat()
-db[test_id] = test_doc
-
-cmd = ["poweroff"]
-logger.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
=== removed directory 'templates.kernel/test_cases/akt-dbench'
=== removed file 'templates.kernel/test_cases/akt-dbench/preseed'
--- templates.kernel/test_cases/akt-dbench/preseed 2011-08-11 12:40:13 +0000
+++ templates.kernel/test_cases/akt-dbench/preseed 1970-01-01 00:00:00 +0000
@@ -1,287 +0,0 @@
-### Localization
-# Locale sets language and country.
-d-i debian-installer/locale string en_US.UTF-8
-
-# Keyboard selection.
-# Disable automatic (interactive) keymap detection.
-d-i console-setup/ask_detect boolean false
-#d-i console-setup/modelcode string pc105
-d-i console-setup/layoutcode string us
-# To select a variant of the selected layout (if you leave this out, the
-# basic form of the layout will be used):
-#d-i console-setup/variantcode string dvorak
-
-# start the HTTP server early, so that we can grab the d-i log
-# will be executed after network initialisation is completed.
-d-i preseed/early_command string httpd
-
-### Network configuration
-# netcfg will choose an interface that has link if possible. This makes it
-# skip displaying a list if there is more than one interface.
-d-i netcfg/choose_interface select auto
-
-# To pick a particular interface instead:
-#d-i netcfg/choose_interface select eth1
-
-# If you have a slow dhcp server and the installer times out waiting for
-# it, this might be useful.
-d-i netcfg/dhcp_timeout string 180
-
-# If you prefer to configure the network manually, uncomment this line and
-# the static network configuration below.
-#d-i netcfg/disable_dhcp boolean true
-
-# If you want the preconfiguration file to work on systems both with and
-# without a dhcp server, uncomment these lines and the static network
-# configuration below.
-#d-i netcfg/dhcp_failed note
-#d-i netcfg/dhcp_options select Configure network manually
-
-# Static network configuration.
-#d-i netcfg/get_nameservers string 192.168.1.1
-#d-i netcfg/get_ipaddress string 192.168.1.42
-#d-i netcfg/get_netmask string 255.255.255.0
-#d-i netcfg/get_gateway string 192.168.1.1
-#d-i netcfg/confirm_static boolean true
-
-# Any hostname and domain names assigned from dhcp take precedence over
-# values set here. However, setting the values still prevents the questions
-# from being shown, even if values come from dhcp.
-d-i netcfg/get_hostname string {{ hostname }}
-d-i netcfg/get_domain string unassigned-domain
-
-# Disable that annoying WEP key dialog.
-d-i netcfg/wireless_wep string
-# The wacky dhcp hostname that some ISPs use as a password of sorts.
-#d-i netcfg/dhcp_hostname string radish
-
-
-### Mirror settings
-d-i mirror/country string enter information manually
-d-i mirror/http/hostname string mirror:3142
-d-i mirror/http/directory string /ubuntu
-d-i mirror/http/proxy string
-
-# Suite to install.
-#d-i mirror/suite string feisty
-# Suite to use for loading installer components (optional).
-#d-i mirror/udeb/suite string feisty
-
-### Partitioning
-# If the system has free space you can choose to only partition that space.
-# Note: this must be preseeded with a localized (translated) value.
-#d-i partman-auto/init_automatically_partition \
-# select Use the largest continuous free space
-
-# Alternatively, you can specify a disk to partition. The device name must
-# be given in traditional non-devfs format.
-# For example, to use the first SCSI hard disk:
-d-i partman-auto/disk string /dev/vda
-{% block partman_auto_method %}
-d-i partman-auto/method string regular
-{% endblock %}
-
-# If one of the disks that are going to be automatically partitioned
-# contains an old LVM configuration, the user will normally receive a
-# warning. This can be preseeded away...
-d-i partman-lvm/device_remove_lvm boolean true
-# And the same goes for the confirmation to write the lvm partitions.
-d-i partman-lvm/confirm boolean true
-
-# You can choose from any of the predefined partitioning recipes.
-# Note: this must be preseeded with a localized (translated) value.
-d-i partman-auto/choose_recipe select All files in one partition (recommended for new users)
-#d-i partman-auto/choose_recipe \
-# select Separate /home partition
-#d-i partman-auto/choose_recipe \
-# select Separate /home, /usr, /var, and /tmp partitions
-
-# Or provide a recipe of your own...
-# The recipe format is documented in the file devel/partman-auto-recipe.txt.
-# If you have a way to get a recipe file into the d-i environment, you can
-# just point at it.
-#d-i partman-auto/expert_recipe_file string /hd-media/recipe
-
-# This makes partman automatically partition without confirmation.
-d-i partman/confirm_write_new_label boolean true
-d-i partman/choose_partition select Finish partitioning and write changes to disk
-d-i partman/confirm boolean true
-d-i partman/confirm_nooverwrite boolean true
-d-i partman-lvm/confirm_nooverwrite boolean true
-
-### Clock and time zone setup
-# Controls whether or not the hardware clock is set to UTC.
-d-i clock-setup/utc boolean true
-
-# Only ask the UTC question if there are other operating systems installed.
-d-i clock-setup/utc-auto boolean true
-
-# You may set this to any valid setting for $TZ; see the contents of
-# /usr/share/zoneinfo/ for valid values.
-d-i time/zone string US/Eastern
-
-
-### Apt setup
-# You can choose to install restricted and universe software, or to install
-# software from the backports repository.
-#d-i apt-setup/restricted boolean true
-#d-i apt-setup/universe boolean true
-#d-i apt-setup/backports boolean true
-# Uncomment this to avoid adding security sources, or
-# add a hostname to use a different server than security.ubuntu.com.
-d-i apt-setup/security_host string
-
-# Additional repositories, local[0-9] available
-#d-i apt-setup/local0/repository string http://server/localrep/ ./
-#d-i apt-setup/local0/comment string Comment
-# Enable deb-src lines
-#d-i apt-setup/local0/source boolean true
-# URL to the public key of the local repository
-#d-i apt-setup/local0/key string http://server/localrep/key
-
-
-### Account setup
-# Skip creation of a root account (normal user account will be able to
-# use sudo). The default is false; preseed this to true if you want to set
-# a root password.
-#d-i passwd/root-login boolean false
-# Alternatively, to skip creation of a normal user account.
-#d-i passwd/make-user boolean false
-
-# Root password, either in clear text
-#d-i passwd/root-password password r00tme
-#d-i passwd/root-password-again password r00tme
-# or encrypted using an MD5 hash.
-#d-i passwd/root-password-crypted password [MD5 hash]
-
-# To create a normal user account.
-d-i passwd/user-fullname string Ubuntu
-d-i passwd/username string ubuntu
-# Normal user's password, either in clear text
-d-i passwd/user-password password !ubuntu123
-d-i passwd/user-password-again password !ubuntu123
-
-
-### Base system installation
-# Select the initramfs generator used to generate the initrd for 2.6 kernels.
-#d-i base-installer/kernel/linux/initramfs-generators string yaird
-
-# Install the different kernel flavor.
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-server
-{% endblock %}
-
-{% block anna_modules %}
-{% endblock %}
-
-### Boot loader installation
-# Grub is the default boot loader (for x86). If you want lilo installed
-# instead, uncomment this:
-#d-i grub-installer/skip boolean true
-
-# This is fairly safe to set, it makes grub install automatically to the MBR
-# if no other operating system is detected on the machine.
-d-i grub-installer/only_debian boolean true
-
-# This one makes grub-installer install to the MBR if if finds some other OS
-# too, which is less safe as it might not be able to boot that other OS.
-d-i grub-installer/with_other_os boolean true
-
-# Alternatively, if you want to install to a location other than the mbr,
-# uncomment and edit these lines:
-#d-i grub-installer/bootdev string (hd0,0)
-#d-i grub-installer/only_debian boolean false
-#d-i grub-installer/with_other_os boolean false
-
-
-### Package selection
-
-{% block tasksel_first %}
-tasksel tasksel/first multiselect Basic Ubuntu server
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-# debian-installer preseeded answers should be in this block
-{% endblock %}
-
-# Only install basic language packs. Let tasksel ask about tasks.
-d-i pkgsel/language-pack-patterns string
-# No language support packages.
-d-i pkgsel/install-language-support boolean false
-
-# Some versions of the installer can report back on what software you have
-# installed, and what software you use. The default is not to report back,
-# but sending reports helps the project determine what software is most
-# popular and include it on CDs.
-#popularity-contest popularity-contest/participate boolean false
-
-### Finishing up the first stage install
-# Avoid that last message about the install being complete.
-d-i finish-install/reboot_in_progress note
-
-# This will prevent the installer from ejecting the CD during the reboot,
-# which is useful in some situations.
-#d-i cdrom-detect/eject boolean false
-
-
-### X configuration
-# X can detect the right driver for some cards, but if you're preseeding,
-# you override whatever it chooses. Still, vesa will work most places.
-#xserver-xorg xserver-xorg/config/device/driver select vesa
-
-# A caveat with mouse autodetection is that if it fails, X will retry it
-# over and over. So if it's preseeded to be done, there is a possibility of
-# an infinite loop if the mouse is not autodetected.
-#xserver-xorg xserver-xorg/autodetect_mouse boolean true
-
-# Monitor autodetection is recommended.
-#xserver-xorg xserver-xorg/autodetect_monitor boolean true
-# Uncomment if you have an LCD display.
-#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
-# X has three configuration paths for the monitor. Here's how to preseed
-# the "medium" path, which is always available. The "simple" path may not
-# be available, and the "advanced" path asks too many questions.
-#xserver-xorg xserver-xorg/config/monitor/selection-method \
-# select medium
-#xserver-xorg xserver-xorg/config/monitor/mode-list \
-# select 800x600 @ 60 Hz
-
-
-### Preseeding other packages
-# Depending on what software you choose to install, or if things go wrong
-# during the installation process, it's possible that other questions may
-# be asked. You can preseed those too, of course. To get a list of every
-# possible question that could be asked during an install, do an
-# installation, and then run these commands:
-# debconf-get-selections --installer > file
-# debconf-get-selections >> file
-
-
-
-### Shell commands
-# d-i preseeding is inherently not secure. Nothing in the installer checks
-# for attempts at buffer overflows or other exploits of the values of a
-# preconfiguration file like this one. Only use preconfiguration files from
-# trusted locations! To drive that home, and because it's generally useful,
-# here's a way to run any shell command you'd like inside the installer,
-# automatically.
-
-# This first command is run as early as possible, just after
-# preseeding is read.
-#d-i preseed/early_command string /cdrom/early_command
-
-# This command is run just before the install finishes, but when there is
-# still a usable /target directory. You can chroot to /target and use it
-# directly, or use the apt-install and in-target commands to easily install
-# packages and run commands in the target system.
-#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
-
-d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
-
-{% block preseed_extra %}
-{% endblock %}
=== removed file 'templates.kernel/test_cases/akt-dbench/test'
--- templates.kernel/test_cases/akt-dbench/test 2011-06-14 10:00:59 +0000
+++ templates.kernel/test_cases/akt-dbench/test 1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import sys
-from os import path
-
-logging.basicConfig(level=logging.DEBUG)
-AKT_Release = '0.12.0'
-AKT_Client = 'autotest-client-%s' % AKT_Release
-AKT_ClientTar = '%s.tar.bz2' % AKT_Client
-#AKT = 'http://test.kernel.org/releases/%s/%s' % (AKT_Release, AKT_ClientTar)
-# need to use internal copy of autotest 0.12.0 -- tests/dbench/dbench_startup.patch
-# had to be, er, patched ;-)
-AKT = 'http://people.canonical.com/~cerdea/%s' % (AKT_ClientTar)
-
-def logLines(buffer, logProc):
- for line in buffer.splitlines():
- logProc ('%s', line)
-
-def downloadAutotestClient():
- RC = 0
- if not path.isfile (AKT_ClientTar):
- logging.debug('running wget for %s' % AKT)
- akt = subprocess.Popen (['wget',
- '-nv',
- AKT],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = akt.communicate()
- logLines (stdout, logging.debug)
- sys.stderr.write ('%s' % stderr)
- RC = akt.returncode
- if RC == 0:
- logging.debug ('running tar -xjf %s:' % AKT_ClientTar)
- tar = subprocess.Popen (['tar',
- '-xjf',
- AKT_ClientTar],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = tar.communicate ()
- logLines (stdout, logging.debug)
- sys.stderr.write ('%s' % stderr)
- if tar.returncode == 0:
- return True
- else:
- return False
-
-class aktDBenchTest(unittest.TestCase):
-
- def testDBench(self):
- if downloadAutotestClient():
- logging.debug ('running %s/bin/autotest tests/dbench/control' % AKT_Client)
- Test = subprocess.Popen (['%s/bin/autotest' % AKT_Client,
- '%s/tests/dbench/control' % AKT_Client],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- sys.stderr.write ('%s' % stderr)
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.kernel/test_cases/akt-tbench'
=== removed file 'templates.kernel/test_cases/akt-tbench/preseed'
--- templates.kernel/test_cases/akt-tbench/preseed 2011-08-11 12:40:13 +0000
+++ templates.kernel/test_cases/akt-tbench/preseed 1970-01-01 00:00:00 +0000
@@ -1,287 +0,0 @@
-### Localization
-# Locale sets language and country.
-d-i debian-installer/locale string en_US.UTF-8
-
-# Keyboard selection.
-# Disable automatic (interactive) keymap detection.
-d-i console-setup/ask_detect boolean false
-#d-i console-setup/modelcode string pc105
-d-i console-setup/layoutcode string us
-# To select a variant of the selected layout (if you leave this out, the
-# basic form of the layout will be used):
-#d-i console-setup/variantcode string dvorak
-
-# start the HTTP server early, so that we can grab the d-i log
-# # will be executed after network initialisation is completed.
-d-i preseed/early_command string httpd
-
-### Network configuration
-# netcfg will choose an interface that has link if possible. This makes it
-# skip displaying a list if there is more than one interface.
-d-i netcfg/choose_interface select auto
-
-# To pick a particular interface instead:
-#d-i netcfg/choose_interface select eth1
-
-# If you have a slow dhcp server and the installer times out waiting for
-# it, this might be useful.
-d-i netcfg/dhcp_timeout string 180
-
-# If you prefer to configure the network manually, uncomment this line and
-# the static network configuration below.
-#d-i netcfg/disable_dhcp boolean true
-
-# If you want the preconfiguration file to work on systems both with and
-# without a dhcp server, uncomment these lines and the static network
-# configuration below.
-#d-i netcfg/dhcp_failed note
-#d-i netcfg/dhcp_options select Configure network manually
-
-# Static network configuration.
-#d-i netcfg/get_nameservers string 192.168.1.1
-#d-i netcfg/get_ipaddress string 192.168.1.42
-#d-i netcfg/get_netmask string 255.255.255.0
-#d-i netcfg/get_gateway string 192.168.1.1
-#d-i netcfg/confirm_static boolean true
-
-# Any hostname and domain names assigned from dhcp take precedence over
-# values set here. However, setting the values still prevents the questions
-# from being shown, even if values come from dhcp.
-d-i netcfg/get_hostname string {{ hostname }}
-d-i netcfg/get_domain string unassigned-domain
-
-# Disable that annoying WEP key dialog.
-d-i netcfg/wireless_wep string
-# The wacky dhcp hostname that some ISPs use as a password of sorts.
-#d-i netcfg/dhcp_hostname string radish
-
-
-### Mirror settings
-d-i mirror/country string enter information manually
-d-i mirror/http/hostname string mirror:3142
-d-i mirror/http/directory string /ubuntu
-d-i mirror/http/proxy string
-
-# Suite to install.
-#d-i mirror/suite string feisty
-# Suite to use for loading installer components (optional).
-#d-i mirror/udeb/suite string feisty
-
-### Partitioning
-# If the system has free space you can choose to only partition that space.
-# Note: this must be preseeded with a localized (translated) value.
-#d-i partman-auto/init_automatically_partition \
-# select Use the largest continuous free space
-
-# Alternatively, you can specify a disk to partition. The device name must
-# be given in traditional non-devfs format.
-# For example, to use the first SCSI hard disk:
-d-i partman-auto/disk string /dev/vda
-{% block partman_auto_method %}
-d-i partman-auto/method string regular
-{% endblock %}
-
-# If one of the disks that are going to be automatically partitioned
-# contains an old LVM configuration, the user will normally receive a
-# warning. This can be preseeded away...
-d-i partman-lvm/device_remove_lvm boolean true
-# And the same goes for the confirmation to write the lvm partitions.
-d-i partman-lvm/confirm boolean true
-
-# You can choose from any of the predefined partitioning recipes.
-# Note: this must be preseeded with a localized (translated) value.
-d-i partman-auto/choose_recipe select All files in one partition (recommended for new users)
-#d-i partman-auto/choose_recipe \
-# select Separate /home partition
-#d-i partman-auto/choose_recipe \
-# select Separate /home, /usr, /var, and /tmp partitions
-
-# Or provide a recipe of your own...
-# The recipe format is documented in the file devel/partman-auto-recipe.txt.
-# If you have a way to get a recipe file into the d-i environment, you can
-# just point at it.
-#d-i partman-auto/expert_recipe_file string /hd-media/recipe
-
-# This makes partman automatically partition without confirmation.
-d-i partman/confirm_write_new_label boolean true
-d-i partman/choose_partition select Finish partitioning and write changes to disk
-d-i partman/confirm boolean true
-d-i partman/confirm_nooverwrite boolean true
-d-i partman-lvm/confirm_nooverwrite boolean true
-
-### Clock and time zone setup
-# Controls whether or not the hardware clock is set to UTC.
-d-i clock-setup/utc boolean true
-
-# Only ask the UTC question if there are other operating systems installed.
-d-i clock-setup/utc-auto boolean true
-
-# You may set this to any valid setting for $TZ; see the contents of
-# /usr/share/zoneinfo/ for valid values.
-d-i time/zone string US/Eastern
-
-
-### Apt setup
-# You can choose to install restricted and universe software, or to install
-# software from the backports repository.
-#d-i apt-setup/restricted boolean true
-#d-i apt-setup/universe boolean true
-#d-i apt-setup/backports boolean true
-# Uncomment this to avoid adding security sources, or
-# add a hostname to use a different server than security.ubuntu.com.
-d-i apt-setup/security_host string
-
-# Additional repositories, local[0-9] available
-#d-i apt-setup/local0/repository string http://server/localrep/ ./
-#d-i apt-setup/local0/comment string Comment
-# Enable deb-src lines
-#d-i apt-setup/local0/source boolean true
-# URL to the public key of the local repository
-#d-i apt-setup/local0/key string http://server/localrep/key
-
-
-### Account setup
-# Skip creation of a root account (normal user account will be able to
-# use sudo). The default is false; preseed this to true if you want to set
-# a root password.
-#d-i passwd/root-login boolean false
-# Alternatively, to skip creation of a normal user account.
-#d-i passwd/make-user boolean false
-
-# Root password, either in clear text
-#d-i passwd/root-password password r00tme
-#d-i passwd/root-password-again password r00tme
-# or encrypted using an MD5 hash.
-#d-i passwd/root-password-crypted password [MD5 hash]
-
-# To create a normal user account.
-d-i passwd/user-fullname string Ubuntu
-d-i passwd/username string ubuntu
-# Normal user's password, either in clear text
-d-i passwd/user-password password !ubuntu123
-d-i passwd/user-password-again password !ubuntu123
-
-
-### Base system installation
-# Select the initramfs generator used to generate the initrd for 2.6 kernels.
-#d-i base-installer/kernel/linux/initramfs-generators string yaird
-
-# Install the different kernel flavor.
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-server
-{% endblock %}
-
-{% block anna_modules %}
-{% endblock %}
-
-### Boot loader installation
-# Grub is the default boot loader (for x86). If you want lilo installed
-# instead, uncomment this:
-#d-i grub-installer/skip boolean true
-
-# This is fairly safe to set, it makes grub install automatically to the MBR
-# if no other operating system is detected on the machine.
-d-i grub-installer/only_debian boolean true
-
-# This one makes grub-installer install to the MBR if if finds some other OS
-# too, which is less safe as it might not be able to boot that other OS.
-d-i grub-installer/with_other_os boolean true
-
-# Alternatively, if you want to install to a location other than the mbr,
-# uncomment and edit these lines:
-#d-i grub-installer/bootdev string (hd0,0)
-#d-i grub-installer/only_debian boolean false
-#d-i grub-installer/with_other_os boolean false
-
-
-### Package selection
-
-{% block tasksel_first %}
-tasksel tasksel/first multiselect Basic Ubuntu server
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-# debian-installer preseeded answers should be in this block
-{% endblock %}
-
-# Only install basic language packs. Let tasksel ask about tasks.
-d-i pkgsel/language-pack-patterns string
-# No language support packages.
-d-i pkgsel/install-language-support boolean false
-
-# Some versions of the installer can report back on what software you have
-# installed, and what software you use. The default is not to report back,
-# but sending reports helps the project determine what software is most
-# popular and include it on CDs.
-#popularity-contest popularity-contest/participate boolean false
-
-### Finishing up the first stage install
-# Avoid that last message about the install being complete.
-d-i finish-install/reboot_in_progress note
-
-# This will prevent the installer from ejecting the CD during the reboot,
-# which is useful in some situations.
-#d-i cdrom-detect/eject boolean false
-
-
-### X configuration
-# X can detect the right driver for some cards, but if you're preseeding,
-# you override whatever it chooses. Still, vesa will work most places.
-#xserver-xorg xserver-xorg/config/device/driver select vesa
-
-# A caveat with mouse autodetection is that if it fails, X will retry it
-# over and over. So if it's preseeded to be done, there is a possibility of
-# an infinite loop if the mouse is not autodetected.
-#xserver-xorg xserver-xorg/autodetect_mouse boolean true
-
-# Monitor autodetection is recommended.
-#xserver-xorg xserver-xorg/autodetect_monitor boolean true
-# Uncomment if you have an LCD display.
-#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
-# X has three configuration paths for the monitor. Here's how to preseed
-# the "medium" path, which is always available. The "simple" path may not
-# be available, and the "advanced" path asks too many questions.
-#xserver-xorg xserver-xorg/config/monitor/selection-method \
-# select medium
-#xserver-xorg xserver-xorg/config/monitor/mode-list \
-# select 800x600 @ 60 Hz
-
-
-### Preseeding other packages
-# Depending on what software you choose to install, or if things go wrong
-# during the installation process, it's possible that other questions may
-# be asked. You can preseed those too, of course. To get a list of every
-# possible question that could be asked during an install, do an
-# installation, and then run these commands:
-# debconf-get-selections --installer > file
-# debconf-get-selections >> file
-
-
-
-### Shell commands
-# d-i preseeding is inherently not secure. Nothing in the installer checks
-# for attempts at buffer overflows or other exploits of the values of a
-# preconfiguration file like this one. Only use preconfiguration files from
-# trusted locations! To drive that home, and because it's generally useful,
-# here's a way to run any shell command you'd like inside the installer,
-# automatically.
-
-# This first command is run as early as possible, just after
-# preseeding is read.
-#d-i preseed/early_command string /cdrom/early_command
-
-# This command is run just before the install finishes, but when there is
-# still a usable /target directory. You can chroot to /target and use it
-# directly, or use the apt-install and in-target commands to easily install
-# packages and run commands in the target system.
-#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
-
-d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
-
-{% block preseed_extra %}
-{% endblock %}
=== removed file 'templates.kernel/test_cases/akt-tbench/test'
--- templates.kernel/test_cases/akt-tbench/test 2011-06-14 10:00:59 +0000
+++ templates.kernel/test_cases/akt-tbench/test 1970-01-01 00:00:00 +0000
@@ -1,67 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import sys
-import time
-from os import path
-
-logging.basicConfig(level=logging.DEBUG)
-AKT_Release = '0.12.0'
-AKT_Client = 'autotest-client-%s' % AKT_Release
-AKT_ClientTar = '%s.tar.bz2' % AKT_Client
-#AKT = 'http://test.kernel.org/releases/%s/%s' % (AKT_Release, AKT_ClientTar)
-# need to use internal copy of autotest 0.12.0 -- tests/dbench/dbench_startup.patch
-# had to be, er, patched ;-)
-AKT = 'http://people.canonical.com/~cerdea/%s' % (AKT_ClientTar)
-
-def logLines(buffer, logProc):
- for line in buffer.splitlines():
- logProc ('%s', line)
-
-def downloadAutotestClient():
- RC = 0
- if not path.isfile (AKT_ClientTar):
- logging.debug('running wget for %s' % AKT)
- akt = subprocess.Popen (['wget',
- '-nv',
- AKT],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = akt.communicate()
- logLines (stdout, logging.debug)
- sys.stderr.write ('%s' % stderr)
- RC = akt.returncode
- if RC == 0:
- logging.debug ('running tar -xjf %s:' % AKT_ClientTar)
- tar = subprocess.Popen (['tar',
- '-xjf',
- AKT_ClientTar],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = tar.communicate ()
- logLines (stdout, logging.debug)
- sys.stderr.write ('%s' % stderr)
- if tar.returncode == 0:
- return True
- else:
- return False
-
-class aktTBenchTest(unittest.TestCase):
-
- def testTBench(self):
- if downloadAutotestClient():
- logging.debug ('running %s/bin/autotest tests/tbench/control' % AKT_Client)
- Test = subprocess.Popen (['%s/bin/autotest' % AKT_Client,
- '%s/tests/tbench/control' % AKT_Client],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- logging.info ('%s' % stderr)
- #time.sleep (1200)
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.kernel/test_cases/generic-proposed'
=== removed file 'templates.kernel/test_cases/generic-proposed/preseed'
--- templates.kernel/test_cases/generic-proposed/preseed 2011-08-01 16:56:27 +0000
+++ templates.kernel/test_cases/generic-proposed/preseed 1970-01-01 00:00:00 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-generic
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-postfix postfix/mailname string {{ hostname }}
-postfix postfix/tlsmgr_upgrade_warning boolean
-postfix postfix/recipient_delim string +
-postfix postfix/main_mailer_type select Internet Site
-postfix postfix/retry_upgrade_warning boolean
-# Install postfix despite an unsupported kernel?
-postfix postfix/kernel_version_warning boolean
-postfix postfix/relayhost string
-postfix postfix/procmail boolean false
-postfix postfix/bad_recipient_delimiter error
-postfix postfix/chattr boolean false
-postfix postfix/root_address string
-postfix postfix/rfc1035_violation boolean false
-postfix postfix/mydomain_warning boolean
-postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
-postfix postfix/destinations string {{ hostname }}, localhost.localdomain, localhost
-postfix postfix/not_configured error
-postfix postfix/mailbox_limit string 0
-postfix postfix/protocols select all
-{% endblock %}
-
-{% block additional_repositories %}
-d-i apt-setup/proposed boolean true
-{% endblock %}
=== removed file 'templates.kernel/test_cases/generic-proposed/test'
--- templates.kernel/test_cases/generic-proposed/test 2011-07-28 18:11:51 +0000
+++ templates.kernel/test_cases/generic-proposed/test 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import os
-
-logging.basicConfig(level=logging.DEBUG)
-
-class ltpTest(unittest.TestCase):
-
- def runcmd(self, cmdargs):
- logging.debug ('running %s' % cmdargs)
- Test = subprocess.Popen (cmdargs,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- logging.info ('%s' % stderr)
- return Test
-
- def setUp(self):
- self.runcmd(['apt-get', 'update'])
- self.runcmd(['apt-get', 'dist-upgrade','-y'])
- self.runcmd(['apt-get', 'install', 'ltp', '-y'])
- # hack: at least for ltp-lite:
- os.makedirs ('/usr/lib/ltp/results/')
- os.makedirs ('/usr/lib/ltp/tools/pan')
- os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
- # end hack
-
- def testLTPlite(self):
- Test = self.runcmd(['/usr/lib/ltp/tools/runltp', '-f ltplite'])
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== removed file 'templates.kernel/test_cases/generic/preseed'
--- templates.kernel/test_cases/generic/preseed 2011-08-01 16:56:27 +0000
+++ templates.kernel/test_cases/generic/preseed 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-generic
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-postfix postfix/mailname string {{ hostname }}
-postfix postfix/tlsmgr_upgrade_warning boolean
-postfix postfix/recipient_delim string +
-postfix postfix/main_mailer_type select Internet Site
-postfix postfix/retry_upgrade_warning boolean
-# Install postfix despite an unsupported kernel?
-postfix postfix/kernel_version_warning boolean
-postfix postfix/relayhost string
-postfix postfix/procmail boolean false
-postfix postfix/bad_recipient_delimiter error
-postfix postfix/chattr boolean false
-postfix postfix/root_address string
-postfix postfix/rfc1035_violation boolean false
-postfix postfix/mydomain_warning boolean
-postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
-postfix postfix/destinations string {{ hostname }}, localhost.localdomain, localhost
-postfix postfix/not_configured error
-postfix postfix/mailbox_limit string 0
-postfix postfix/protocols select all
-{% endblock %}
-
-
=== renamed file 'templates.kernel/test_cases/generic/test' => 'templates.kernel/test_cases/generic/test.THIS'
=== removed directory 'templates.kernel/test_cases/server'
=== removed directory 'templates.kernel/test_cases/server-proposed'
=== removed file 'templates.kernel/test_cases/server-proposed/preseed'
--- templates.kernel/test_cases/server-proposed/preseed 2011-08-01 16:56:27 +0000
+++ templates.kernel/test_cases/server-proposed/preseed 1970-01-01 00:00:00 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-server
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-postfix postfix/mailname string {{ hostname }}
-postfix postfix/tlsmgr_upgrade_warning boolean
-postfix postfix/recipient_delim string +
-postfix postfix/main_mailer_type select Internet Site
-postfix postfix/retry_upgrade_warning boolean
-# Install postfix despite an unsupported kernel?
-postfix postfix/kernel_version_warning boolean
-postfix postfix/relayhost string
-postfix postfix/procmail boolean false
-postfix postfix/bad_recipient_delimiter error
-postfix postfix/chattr boolean false
-postfix postfix/root_address string
-postfix postfix/rfc1035_violation boolean false
-postfix postfix/mydomain_warning boolean
-postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
-postfix postfix/destinations string {{ hostname }}, localhost.localdomain, localhost
-postfix postfix/not_configured error
-postfix postfix/mailbox_limit string 0
-postfix postfix/protocols select all
-{% endblock %}
-
-{% block additional_repositories %}
-d-i apt-setup/proposed boolean true
-{% endblock %}
=== removed file 'templates.kernel/test_cases/server-proposed/test'
--- templates.kernel/test_cases/server-proposed/test 2011-07-28 18:11:51 +0000
+++ templates.kernel/test_cases/server-proposed/test 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import os
-
-logging.basicConfig(level=logging.DEBUG)
-
-class ltpTest(unittest.TestCase):
-
- def runcmd(self, cmdargs):
- logging.debug ('running %s' % cmdargs)
- Test = subprocess.Popen (cmdargs,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- logging.info ('%s' % stderr)
- return Test
-
- def setUp(self):
- self.runcmd(['apt-get', 'update'])
- self.runcmd(['apt-get', 'dist-upgrade','-y'])
- self.runcmd(['apt-get', 'install', 'ltp', '-y'])
- # hack: at least for ltp-lite:
- os.makedirs ('/usr/lib/ltp/results/')
- os.makedirs ('/usr/lib/ltp/tools/pan')
- os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
- # end hack
-
- def testLTPlite(self):
- Test = self.runcmd(['/usr/lib/ltp/tools/runltp', '-f ltplite'])
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== removed file 'templates.kernel/test_cases/server/preseed'
--- templates.kernel/test_cases/server/preseed 2011-08-01 16:56:27 +0000
+++ templates.kernel/test_cases/server/preseed 1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-server
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-postfix postfix/mailname string {{ hostname }}
-postfix postfix/tlsmgr_upgrade_warning boolean
-postfix postfix/recipient_delim string +
-postfix postfix/main_mailer_type select Internet Site
-postfix postfix/retry_upgrade_warning boolean
-# Install postfix despite an unsupported kernel?
-postfix postfix/kernel_version_warning boolean
-postfix postfix/relayhost string
-postfix postfix/procmail boolean false
-postfix postfix/bad_recipient_delimiter error
-postfix postfix/chattr boolean false
-postfix postfix/root_address string
-postfix postfix/rfc1035_violation boolean false
-postfix postfix/mydomain_warning boolean
-postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
-postfix postfix/destinations string {{ hostname }}, localhost.localdomain, localhost
-postfix postfix/not_configured error
-postfix postfix/mailbox_limit string 0
-postfix postfix/protocols select all
-{% endblock %}
=== removed file 'templates.kernel/test_cases/server/test'
--- templates.kernel/test_cases/server/test 2011-07-28 18:11:51 +0000
+++ templates.kernel/test_cases/server/test 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import os
-
-logging.basicConfig(level=logging.DEBUG)
-
-class ltpTest(unittest.TestCase):
-
- def runcmd(self, cmdargs):
- logging.debug ('running %s' % cmdargs)
- Test = subprocess.Popen (cmdargs,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- logging.info ('%s' % stderr)
- return Test
-
- def setUp(self):
- self.runcmd(['apt-get', 'install', 'ltp', '-y'])
- # hack: at least for ltp-lite:
- os.makedirs ('/usr/lib/ltp/results/')
- os.makedirs ('/usr/lib/ltp/tools/pan')
- os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
- # end hack
-
- def testLTPlite(self):
- Test = self.runcmd(['/usr/lib/ltp/tools/runltp', '-f ltplite'])
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== removed directory 'templates.kernel/test_cases/virtual'
=== removed directory 'templates.kernel/test_cases/virtual-proposed'
=== removed file 'templates.kernel/test_cases/virtual-proposed/preseed'
--- templates.kernel/test_cases/virtual-proposed/preseed 2011-08-01 16:56:27 +0000
+++ templates.kernel/test_cases/virtual-proposed/preseed 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block tasksel_first %}
-tasksel tasksel/skip-tasks string standard
-{% endblock %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-virtual
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-d-i base-installer/kernel/headers boolean false
-postfix postfix/mailname string {{ hostname }}
-postfix postfix/tlsmgr_upgrade_warning boolean
-postfix postfix/recipient_delim string +
-postfix postfix/main_mailer_type select Internet Site
-postfix postfix/retry_upgrade_warning boolean
-# Install postfix despite an unsupported kernel?
-postfix postfix/kernel_version_warning boolean
-postfix postfix/relayhost string
-postfix postfix/procmail boolean false
-postfix postfix/bad_recipient_delimiter error
-postfix postfix/chattr boolean false
-postfix postfix/root_address string
-postfix postfix/rfc1035_violation boolean false
-postfix postfix/mydomain_warning boolean
-postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
-postfix postfix/destinations string {{ hostname }}, localhost.localdomain, localhost
-postfix postfix/not_configured error
-postfix postfix/mailbox_limit string 0
-postfix postfix/protocols select all
-{% endblock %}
-
-{% block additional_repositories %}
-d-i apt-setup/proposed boolean true
-{% endblock %}
-
=== removed file 'templates.kernel/test_cases/virtual-proposed/test'
--- templates.kernel/test_cases/virtual-proposed/test 2011-07-28 18:11:51 +0000
+++ templates.kernel/test_cases/virtual-proposed/test 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import os
-
-logging.basicConfig(level=logging.DEBUG)
-
-class ltpTest(unittest.TestCase):
-
- def runcmd(self, cmdargs):
- logging.debug ('running %s' % cmdargs)
- Test = subprocess.Popen (cmdargs,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- logging.info ('%s' % stderr)
- return Test
-
- def setUp(self):
- self.runcmd(['apt-get', 'update'])
- self.runcmd(['apt-get', 'dist-upgrade','-y'])
- self.runcmd(['apt-get', 'install', 'ltp', '-y'])
- # hack: at least for ltp-lite:
- os.makedirs ('/usr/lib/ltp/results/')
- os.makedirs ('/usr/lib/ltp/tools/pan')
- os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
- # end hack
-
- def testLTPlite(self):
- Test = self.runcmd(['/usr/lib/ltp/tools/runltp', '-f ltplite'])
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== removed file 'templates.kernel/test_cases/virtual/preseed'
--- templates.kernel/test_cases/virtual/preseed 2011-08-01 16:56:27 +0000
+++ templates.kernel/test_cases/virtual/preseed 1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-{% extends "base" %}
-
-{% block tasksel_first %}
-tasksel tasksel/skip-tasks string standard
-{% endblock %}
-
-{% block kernel_flavor %}
-d-i base-installer/kernel/override-image string linux-virtual
-{% endblock %}
-
-{% block pkgsel_first %}
-d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
-d-i pkgsel/update-policy select No automatic updates
-{% endblock %}
-
-{% block d_i_answers %}
-d-i base-installer/kernel/headers boolean false
-postfix postfix/mailname string {{ hostname }}
-postfix postfix/tlsmgr_upgrade_warning boolean
-postfix postfix/recipient_delim string +
-postfix postfix/main_mailer_type select Internet Site
-postfix postfix/retry_upgrade_warning boolean
-# Install postfix despite an unsupported kernel?
-postfix postfix/kernel_version_warning boolean
-postfix postfix/relayhost string
-postfix postfix/procmail boolean false
-postfix postfix/bad_recipient_delimiter error
-postfix postfix/chattr boolean false
-postfix postfix/root_address string
-postfix postfix/rfc1035_violation boolean false
-postfix postfix/mydomain_warning boolean
-postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
-postfix postfix/destinations string {{ hostname }}, localhost.localdomain, localhost
-postfix postfix/not_configured error
-postfix postfix/mailbox_limit string 0
-postfix postfix/protocols select all
-{% endblock %}
-
=== removed file 'templates.kernel/test_cases/virtual/test'
--- templates.kernel/test_cases/virtual/test 2011-07-28 18:11:51 +0000
+++ templates.kernel/test_cases/virtual/test 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import unittest
-import subprocess
-import os
-
-logging.basicConfig(level=logging.DEBUG)
-
-class ltpTest(unittest.TestCase):
-
- def runcmd(self, cmdargs):
- logging.debug ('running %s' % cmdargs)
- Test = subprocess.Popen (cmdargs,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = Test.communicate ()
- logging.info ('%s' % stdout)
- logging.info ('%s' % stderr)
- return Test
-
- def setUp(self):
- self.runcmd(['apt-get', 'install', 'ltp', '-y'])
- # hack: at least for ltp-lite:
- os.makedirs ('/usr/lib/ltp/results/')
- os.makedirs ('/usr/lib/ltp/tools/pan')
- os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
- # end hack
-
- def testLTPlite(self):
- Test = self.runcmd(['/usr/lib/ltp/tools/runltp', '-f ltplite'])
- self.assertEqual(Test.returncode, 0)
-
-if __name__ == '__main__':
- unittest.main()
=== renamed directory 'templates/test_cases' => 'test_cases'
=== modified file 'test_cases/dns-server/test'
--- templates/test_cases/dns-server/test 2011-11-16 17:00:07 +0000
+++ test_cases/dns-server/test 2012-08-13 17:07:21 +0000
@@ -30,60 +30,50 @@
class DnsServerTest(unittest.TestCase):
def testBindDaemon(self):
- cmd = ["pgrep", "named"]
+ cmd = ["pgrep named"]
logging.debug("Cmd: %s" % (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ output = subprocess.call(cmd, shell=True)
logging.debug("Cmd output: %s" % (output))
- self.assertNotEquals(output, "")
+ self.assertEquals(output, 0)
def testOpenPorts(self):
- cmd = ["netstat", "-ltnp"]
+ cmd = ["netstat -ltnp | grep 127.0.0.1:53"]
logging.debug("Cmd: %s" % (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ output = subprocess.call(cmd, shell=True)
logging.debug("Cmd output: %s" % (output))
- output2 = filter(lambda l: l.split()[6].split('/')[1] == 'named',
- output.strip().split('\n')[2:])
- self.assertEquals(len(output2), 5, output2)
+ self.assertEquals(output, 0)
+ #@unittest.skip("Unable to perform external DNS resolution from the QA Lab")
def testResolveUdp(self):
- cmd = ["host", "www.ubuntu.com", "localhost"]
+ cmd = ["host www.ubuntu.com localhost"]
logging.debug("Cmd: %s" % (cmd))
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- output = proc.communicate()[0]
+ output = subprocess.call(cmd, shell=True)
logging.debug("Cmd output: %s" % (output))
- ret = proc.returncode
- self.assertEquals(ret, 0)
+ self.assertEquals(output, 0)
+ #@unittest.skip("Unable to perform external DNS resolution from the QA Lab")
def testResolveUdp6(self):
- cmd = ["host", "-6", "www.ubuntu.com", "ip6-localhost"]
+ cmd = ["host -6 www.ubuntu.com ip6-localhost"]
logging.debug("Cmd: %s" % (cmd))
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- output = proc.communicate()[0]
+ output = subprocess.call(cmd, shell=True)
logging.debug("Cmd output: %s" % (output))
- ret = proc.returncode
- self.assertEquals(ret, 0)
+ self.assertEquals(output, 0)
+ #@unittest.skip("Unable to perform external DNS resolution from the QA Lab")
def testResolveTcp(self):
- cmd = ["host", "-T", "www.ubuntu.com", "localhost"]
+ cmd = ["host -T www.ubuntu.com localhost"]
logging.debug("Cmd: %s" % (cmd))
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- output = proc.communicate()[0]
+ output = subprocess.call(cmd, shell=True)
logging.debug("Cmd output: %s" % (output))
- ret = proc.returncode
- self.assertEquals(ret, 0)
+ self.assertEquals(output, 0)
+ #@unittest.skip("Unable to perform external DNS resolution from the QA Lab")
def testResolveTcp6(self):
- cmd = ["host", "-T", "-6", "www.ubuntu.com", "ip6-localhost"]
+ cmd = ["host -T -6 www.ubuntu.com ip6-localhost"]
logging.debug("Cmd: %s" % (cmd))
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- output = proc.communicate()[0]
+ output = subprocess.call(cmd, shell=True)
logging.debug("Cmd output: %s" % (output))
- ret = proc.returncode
- self.assertEquals(ret, 0)
+ self.assertEquals(output, 0)
if __name__ == '__main__':
# give the system some time to finish startup
=== added directory 'test_cases/lamp-reboot'
=== added file 'test_cases/lamp-reboot/preseed'
--- test_cases/lamp-reboot/preseed 1970-01-01 00:00:00 +0000
+++ test_cases/lamp-reboot/preseed 2012-08-13 17:07:21 +0000
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+{% extends "base" %}
+{% block kernel_flavor %}
+d-i base-installer/kernel/override-image string linux-server
+{% endblock %}
=== added file 'test_cases/lamp-reboot/test'
--- test_cases/lamp-reboot/test 1970-01-01 00:00:00 +0000
+++ test_cases/lamp-reboot/test 2012-08-13 17:07:21 +0000
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+
+import logging
+import os.path
+import subprocess
+import unittest
+import urllib2
+
+logging.basicConfig(level=logging.INFO)
+
+class LampRebootTest(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ env = dict(os.environ)
+ env['DEBIAN_FRONTEND']='noninteractive'
+ subprocess.check_call(['tasksel','install','lamp-server'],env=env)
+
+ def testApache(self):
+ fh = urllib2.urlopen('http://localhost:80')
+ self.assertNotEquals(fh, None)
+ output = fh.read()
+ logging.debug("Output: %s" % (output))
+ self.assertTrue('It works!' in output, output)
+
+ def testMysqlShowDatabases(self):
+ cmd = ["mysql", "-u", "root", "-e", "show databases", "--silent",
+ "--silent"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertEquals(output.strip().split("\n"),
+ ["information_schema", "mysql", "performance_schema", "test"])
+
+ def testMysqlShowTables(self):
+ cmd = ["mysql", "-u", "root", "-e", "show tables",
+ "--silent", "--silent", "mysql"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertEquals(len(output.strip().split("\n")), 24)
+
+ def testMysqlSelectFromUsers(self):
+ cmd = ["mysql", "-u", "root", "-e", "select * from user",
+ "--silent", "--silent", "mysql"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertEquals(len(output.strip().split("\n")), 7)
+
+ def testModPhp(self):
+ php_fh = open("/var/www/test.php", "w")
+ php_fh.write("<? $world=\"Hello World!\"; echo $world; ?>")
+ php_fh.close()
+ fh = urllib2.urlopen('http://localhost:80/test.php')
+ self.assertNotEquals(fh, None)
+ output = fh.read()
+ logging.debug("Output: %s" % (output))
+ self.assertEquals('Hello World!', output)
+
+if __name__ == '__main__':
+ unittest.main()
=== modified file 'test_cases/lamp/test'
--- templates/test_cases/lamp/test 2010-12-01 17:48:05 +0000
+++ test_cases/lamp/test 2012-08-13 17:07:21 +0000
@@ -44,7 +44,7 @@
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
logging.debug("Cmd output: %s" % (output))
self.assertEquals(output.strip().split("\n"),
- ["information_schema", "mysql"])
+ ["information_schema", "mysql", "performance_schema", "test"])
def testMysqlShowTables(self):
cmd = ["mysql", "-u", "root", "-e", "show tables",
@@ -52,7 +52,7 @@
logging.debug("Cmd: %s" % (cmd))
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
logging.debug("Cmd output: %s" % (output))
- self.assertEquals(len(output.strip().split("\n")), 23)
+ self.assertEquals(len(output.strip().split("\n")), 24)
def testMysqlSelectFromUsers(self):
cmd = ["mysql", "-u", "root", "-e", "select * from user",
@@ -60,7 +60,7 @@
logging.debug("Cmd: %s" % (cmd))
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
logging.debug("Cmd output: %s" % (output))
- self.assertEquals(len(output.strip().split("\n")), 4)
+ self.assertEquals(len(output.strip().split("\n")), 7)
def testModPhp(self):
php_fh = open("/var/www/test.php", "w")
=== modified file 'test_cases/minimal-virtual/test'
--- templates/test_cases/minimal-virtual/test 2011-10-06 14:23:04 +0000
+++ test_cases/minimal-virtual/test 2012-08-13 17:07:21 +0000
@@ -24,6 +24,7 @@
import os.path
import subprocess
import unittest
+import platform
logging.basicConfig(level=logging.INFO)
@@ -71,7 +72,11 @@
self.assertEqual(len(lines), 3)
used = int(lines[1].split()[2])
# Increased +25MB to accomodate test overlay
- self.assertTrue( used < 590000, "Used: %s" % (used))
+ max_install_size = 590000
+ # Add overhead for multiarch package lists on amd64
+ if platform.machine() == "x86_64":
+ max_install_size += 32256
+ self.assertTrue( used < max_install_size, "Used: %s" % (used))
if __name__ == '__main__':
unittest.main()
=== added directory 'test_cases/multi-lvm'
=== added file 'test_cases/multi-lvm/config'
--- test_cases/multi-lvm/config 1970-01-01 00:00:00 +0000
+++ test_cases/multi-lvm/config 2012-08-13 17:07:21 +0000
@@ -0,0 +1,2 @@
+[vm]
+disk_size=4G
=== added file 'test_cases/multi-lvm/preseed'
--- test_cases/multi-lvm/preseed 1970-01-01 00:00:00 +0000
+++ test_cases/multi-lvm/preseed 2012-08-13 17:07:21 +0000
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+{% extends "base" %}
+{% block partman_auto_method %}
+d-i partman-auto/method string lvm
+{% endblock %}
+{% block partman_auto_recipe %}
+d-i partman-auto/choose_recipe \
+ select Separate /home, /usr, /var, and /tmp partitions
+{% endblock %}
+#{% block kernel_flavor %}
+#d-i base-installer/kernel/override-image string linux-server
+#{% endblock %}
=== added file 'test_cases/multi-lvm/test'
--- test_cases/multi-lvm/test 1970-01-01 00:00:00 +0000
+++ test_cases/multi-lvm/test 2012-08-13 17:07:21 +0000
@@ -0,0 +1,127 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+
+import logging
+import os.path
+import socket
+import subprocess
+import unittest
+
+logging.basicConfig(level=logging.INFO)
+
+class MultiLvmTest(unittest.TestCase):
+
+ def testRootMount(self):
+ cmd = ["mount"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue(len(output.split("\n")) > 0)
+ l = output.split("\n")[0]
+ self.assertTrue(l.startswith('/dev/mapper/'), l)
+
+ def testVgs(self):
+ cmd = ["vgs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue(len(output.strip().split("\n")) == 1)
+ l = output.split("\n")[0]
+ self.assertTrue(socket.gethostname() in l, l)
+
+ def testLvs(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ # root home usr var tmp swap
+ num_lvs = len(output.strip().split("\n"))
+ self.assertTrue(num_lvs == 6, "Not able to find 6 logical volumes - found %s" % num_lvs)
+
+ def testRootLv(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ lv_names = []
+ for lv in output.split("\n"):
+ lv_names.append(lv.strip().split(" ")[0])
+ logging.debug("Logical volumes found: %s", lv_names)
+ self.assertTrue("root" in lv_names, "Logical volume root not found")
+
+ def testHomeLv(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ lv_names = []
+ for lv in output.split("\n"):
+ lv_names.append(lv.strip().split(" ")[0])
+ logging.debug("Logical volumes found: %s", lv_names)
+ self.assertTrue("home" in lv_names, "Logical volume home not found")
+
+ def testVarLv(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ lv_names = []
+ for lv in output.split("\n"):
+ lv_names.append(lv.strip().split(" ")[0])
+ logging.debug("Logical volumes found: %s", lv_names)
+ self.assertTrue("var" in lv_names, "Logical volume var not found")
+
+ def testTmpLv(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ lv_names = []
+ for lv in output.split("\n"):
+ lv_names.append(lv.strip().split(" ")[0])
+ logging.debug("Logical volumes found: %s", lv_names)
+ self.assertTrue("tmp" in lv_names, "Logical volume tmp not found")
+
+ def testSwapLv(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ lv_names = []
+ for lv in output.split("\n"):
+ lv_names.append(lv.strip().split(" ")[0])
+ logging.debug("Logical volumes found: %s", lv_names)
+ self.assertTrue("swap_1" in lv_names, "Logical volume swap_1 not found")
+
+ def testUsrLv(self):
+ cmd = ["lvs", "--noheadings"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ lv_names = []
+ for lv in output.split("\n"):
+ lv_names.append(lv.strip().split(" ")[0])
+ logging.debug("Logical volumes found: %s", lv_names)
+ self.assertTrue("usr" in lv_names, "Logical volume usr not found")
+
+if __name__ == '__main__':
+ unittest.main()
=== modified file 'test_cases/openssh-server/test'
--- templates/test_cases/openssh-server/test 2010-12-01 17:48:05 +0000
+++ test_cases/openssh-server/test 2012-08-13 17:07:21 +0000
@@ -30,20 +30,19 @@
class OpenSSHServerTest(unittest.TestCase):
def testOpenSSHDaemon(self):
- cmd = ["pgrep", "sshd"]
+ cmd = ["pgrep sshd"]
logging.debug("Cmd: %s" % (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
- logging.debug("Cmd output: %s" % (output))
- self.assertNotEquals(output, "")
+ status = subprocess.call(cmd, shell=True)
+ logging.debug("Cmd output: %s" % (status))
+ self.assertEquals(status, 0)
def testOpenPorts(self):
- cmd = ["netstat", "-atuvpn"]
+ cmd = ["netstat -atuvpn | grep -E '(0.0.0.0|::):22'"]
logging.debug("Cmd: %s" % (cmd))
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
- logging.debug("Cmd output: %s" % (output))
- output2 = filter(lambda l: int(l.split()[3].split(':')[-1]) == 22,
- output.strip().split('\n')[2:])
- self.assertEquals(len(output2), 2, output2)
+ status = subprocess.call(cmd, shell=True)
+ logging.debug("Cmd output: %s" % (status))
+ self.assertEquals(status, 0)
if __name__ == '__main__':
unittest.main()
+
=== added directory 'test_cases/raid1'
=== added file 'test_cases/raid1/config'
--- test_cases/raid1/config 1970-01-01 00:00:00 +0000
+++ test_cases/raid1/config 2012-08-13 17:07:21 +0000
@@ -0,0 +1,3 @@
+[vm]
+disk_size=4G
+disk_number=2
=== added file 'test_cases/raid1/preseed'
--- test_cases/raid1/preseed 1970-01-01 00:00:00 +0000
+++ test_cases/raid1/preseed 2012-08-13 17:07:21 +0000
@@ -0,0 +1,72 @@
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+{% extends "base" %}
+{% block partman_auto_method %}
+d-i partman-auto/method string raid
+{% endblock %}
+{% block partman_auto_recipe %}
+# Specify the disks to be partitioned. They will all get the same layout,
+# so this will only work if the disks are the same size.
+d-i partman-auto/disk string /dev/vda /dev/vdb
+
+# Next you need to specify the physical partitions that will be used.
+d-i partman-auto/expert_recipe string \
+ multiraid :: \
+ 1000 5000 4000 raid \
+ $primary{ } method{ raid } \
+ . \
+ 64 512 300% raid \
+ method{ raid } \
+ . \
+ 500 10000 1000000000 raid \
+ method{ raid } \
+ .
+
+# Last you need to specify how the previously defined partitions will be
+# used in the RAID setup. Remember to use the correct partition numbers
+# for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported;
+# devices are separated using "#".
+# Parameters are:
+# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
+# <devices> <sparedevices>
+
+d-i partman-auto-raid/recipe string \
+ 1 2 0 ext3 / \
+ /dev/vda1#/dev/vdb1 \
+ . \
+ 1 2 0 swap - \
+ /dev/vda5#/dev/vdb5 \
+ . \
+ 1 2 0 ext3 /home \
+ /dev/vda6#/dev/vdb6 \
+ .
+
+# This makes partman automatically partition without confirmation.
+d-i partman-md/confirm boolean true
+d-i partman-md/confirm_nooverwrite boolean true
+# Install to both disks
+d-i grub-installer/bootdev string /dev/vda /dev/vdb
+# Boot degraded - yes please
+d-i mdadm/boot_degraded boolean true
+{% endblock %}
+{% block kernel_flavor %}
+d-i base-installer/kernel/override-image string linux-server
+{% endblock %}
=== added file 'test_cases/raid1/test'
--- test_cases/raid1/test 1970-01-01 00:00:00 +0000
+++ test_cases/raid1/test 2012-08-13 17:07:21 +0000
@@ -0,0 +1,98 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+#
+# ubuntu-server-iso-testing is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ubuntu-server-iso-testing is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+
+import logging
+import os.path
+import socket
+import subprocess
+import unittest
+
+logging.basicConfig(level=logging.DEBUG)
+
+class RAID1Test(unittest.TestCase):
+
+ def testRootMount(self):
+ cmd = ["df", "-h", "/"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue(len(output.split("\n")) > 0)
+ l = output.split("\n")[1]
+ self.assertTrue(l.startswith("/dev/md") and l.endswith("/"),
+ "/ partition not in raid device")
+
+ def testHomeMount(self):
+ cmd = ["df", "-h", "/home"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue(len(output.split("\n")) > 0)
+ l = output.split("\n")[1]
+ self.assertTrue(l.startswith("/dev/md") and l.endswith("/home"),
+ "/home partition not on raid device")
+
+ def testSwapMount(self):
+ cmd = ["cat", "/proc/swaps"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ l = output.split("\n")[1]
+ self.assertTrue(l.startswith("/dev/md"),
+ "swap partition not on raid device")
+
+ def testRaidStatus(self):
+ cmd = ["cat", "/proc/mdstat"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue("_" not in output,
+ "RAID status is not good:\n%s" % output)
+
+ def testDegradedBoot(self):
+ cmd = ["cat", "/proc/mdstat"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue("BOOT_DEGRADED=true" not in output,
+ "Degraded boot not enabled")
+
+ def testCheckGrub(self):
+ test_command = """
+#!/bin/sh
+apt-get install -y binutils
+for i in $(mdadm -Q --detail $(df -P /boot | grep ^/dev/ | cut -d" " -f1) | grep " /dev/" | awk '{print $NF}' | sed -e 's/[0-9]$//')
+do
+ sudo dd if=$i bs=512 count=1 2>/dev/null | strings -a | grep -q GRUB && echo $i: ok || echo $i: FAIL
+done
+"""
+ f = open("/tmp/check_grub","w")
+ f.write(test_command)
+ f.close()
+ cmd = ["sh", "/tmp/check_grub"]
+ logging.debug("Cmd: %s" % (cmd))
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+ logging.debug("Cmd output: %s" % (output))
+ self.assertTrue("FAILED" not in output,
+ "Grub not installed correctly:\n%s" %output)
+
+if __name__ == "__main__":
+ unittest.main()
=== modified file 'test_cases/samba-server/test'
--- templates/test_cases/samba-server/test 2010-12-02 15:01:31 +0000
+++ test_cases/samba-server/test 2012-08-13 17:07:21 +0000
@@ -25,6 +25,7 @@
import subprocess
import time
import unittest
+import paramiko
logging.basicConfig(level=logging.INFO)
@@ -59,6 +60,11 @@
self.assertTrue("SID for domain" in output)
def testWbinfoMinusU(self):
+ # Login using SSH to ensure user account is created
+ ssh = paramiko.SSHClient()
+ ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ ssh.connect('localhost',username='ubuntu', password='!ubuntu123')
+ ssh.close()
# Replaces net usersidlist as this sigsevs
cmd = ["wbinfo", "-u"]
logging.debug("Cmd: %s" % (cmd))
=== removed file 'unbsdtar-safelink'
--- unbsdtar-safelink 2011-11-15 15:51:03 +0000
+++ unbsdtar-safelink 1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-iso-testing.
-#
-# ubuntu-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-set -e
-
-usage() {
- cat<<EOF
-Usage: $(basename $0) [FILE]...
-Extract files from an archive taking care of links
-
- -C directory
- Change directories after opening the archive but before extracting
- entries from the archive.
- -f file
- Read the archive from the specified file.
- -h This help
-EOF
- exit 1
-}
-
-
-DIRECTORY=""
-ARCHIVE=""
-
-TEMP=$(getopt -o hC:f:x -- "$@")
-eval set -- "$TEMP"
-
-while true ; do
- case "$1" in
- -h)
- usage;;
- -C)
- DIRECTORY=$2
- shift 2 ;;
- -f)
- ARCHIVE=$2
- shift 2 ;;
- -x) # Does nothing just here for compatibility with bsdtar
- shift ;;
- --) shift ; break ;;
- *) usage;;
- esac
-done
-
-BSDTAROPTS=""
-
-[ ! -z "$ARCHIVE" ] && BSDTAROPTS="$BSDTAROPTS -f $ARCHIVE"
-#[ ! -z "$DIRECTORY" ] && BSDTAROPTS="$BSDTAROPTS -C $DIRECTORY"
-
-BSDTARCMD="bsdtar -x $BSDTAROPTS"
-LISTCMD="bsdtar -tv $BSDTAROPTS"
-
-TEMPDIR=$(mktemp -d)
-trap "rm -Rf $TEMPDIR" EXIT QUIT
-
-
-for f in $@; do
- # Last component of list. This file always exists
- TARGETFILE=$( $LISTCMD $f|sed -e 's/.* //')
- [ -z "$TARGETFILE" ] && exit 1
- $BSDTARCMD -C $TEMPDIR $TARGETFILE
-
- [ "$(echo $f|cut -c1)" = "/" ] && f=".$f"
-
- TARGETDIR="."
- if [ ! -z "$DIRECTORY" ];then
- mkdir -p "$DIRECTORY"
- TARGETDIR="$DIRECTORY"
- fi
- mkdir -p $TARGETDIR/$(dirname $f)
- mv -f $TEMPDIR/$TARGETFILE $TARGETDIR/$f
-done
=== removed directory 'wubi'
=== removed file 'wubi/README'
--- wubi/README 2011-07-25 16:42:56 +0000
+++ wubi/README 1970-01-01 00:00:00 +0000
@@ -1,118 +0,0 @@
-= Introduction =
-This document describes automated wubi testing
-
-= Setup =
-The test is installed on the Windows side.
-The general process is:
-1. Trigger the test if
- - A new version of wubi is available
- or
- - A new Ubuntu Desktop ISO (i386|mad64) is available
-
-2. Download Wubi if needed
-3. Download the required ISO if needed.
-4. Run Wubi
-5. Reboot and install Ubuntu
-6. Reboot to Ubuntu, run the tests and report the results
-7. Restore the system and boot back to Windows for next run.
-
-Directory Structure
-./bin
-./bin/functions General purpose functions
-./bin/run-test.sh Main test script
-./data Data Directory
-./data/custom-installation Contains the scripts to be run by casper
-./data/custom-installation/packages Packages in this directory are installed on the target
-./data/custom-installation/target-override Content is copied as-is to target
-./data/custom-installation/target-override/etc
-./data/custom-installation/target-override/etc/rc.local Setup the target and launch the tests
-./data/custom-installation/target-override/usr
-./data/custom-installation/target-override/usr/local
-./data/custom-installation/target-override/usr/local/bin
-./data/custom-installation/target-override/usr/local/bin/run_test The test runner
-./data/custom-installation/target-override/usr/local/tests Contains the tests to run on target
-./data/iso Download directory (ISOs and wubi.exe) Wubi and the ISO must be in the same directory to use --isopath
-./data/wubi.list The expected content of DRIVE/ubuntu on the host after wubi installation. Used to check the integrity of the installation
-./log Log directory
-./results Results to push to jenkins
-
-
-= Run Test Script =
-== Preliminary steps ==
-On the test system:
-- Download ISO
-- Download wubi.exe
-Both tasks should be done by a separate jenkins task (as we do for the other iso tests)
-
-== Step 1: Windows side ==
-Execute run-test.sh with the name of the ISO or the architecture to test.
-Without argument it will install the latest ISO for the architecture the test runs on.
-wubi.exe and the ISO must be in the same directory (TODO: File a bug)
-
-=== wubi-test.sh ===
-1. Uninstall Wubi if a previous installation exists
-2. Install Wubi non-interactively with the ISO passed on the command line or download a new iso if required.
-3. Copy the testing material from ./data/custom-installation to C:/ubuntu/install/custom-installation
- This files will be copied to /root/custom-installatio on the target.
-4. Restart system and proceed with step 2
-== Step 2: Ubuntu site ==
-1. Boots directly to linux
-2. Installs Ubuntu
- At the end of the installation the content of /root/custom-installation is copied to /target/
- rc.local will start the tests on next reboot.
-3. Reboot to Ubuntu
-4. Run rc.local script:
- 4.1 Install the prerequisites and setup the system for the test
- 4.2 Execute /usr/local/bin/run_test which will run the tests in /usr/local/tests/ (python unittests)
- 4.3 Write the results to the run directory in xUnit format
-
-= Master Script - run-test.sh =
- * For each $RELEASE $FLAVOR $ARCH
- * If test has not started:
- * Trigger remote build on phad
- * sync logs
- * Sync the image
- * Extract wubi.exe
- * chmod +x wubi.exe
- * sync logs
- * run test phase 1 (sync logs before reboot)
- * else if phase 2 as not started
- * run test phase 2 (sync logs before reboot)
- * else
- * sync the log on more time excepted result.xml
- * sync result.xml
-* List of tests to run in $RUNDIR/job.list
-* Maintain job state in a file in $RUNDIR/job.state
-
-= Integration with Jenkins =
- * Trigger a remote build on run start.
- * Jenkins job
- * Wait until timeout is reached or job is completed
- * Job is completed if a specific file is on the Jenkins slave (wazn)
- * Wubi job
- * At start, trigger the remote job
- * At each step of the test, sync the current run directory to wazn
- * At the end of the run do a last sync + copy a flag to indicate the end of the run
-
-= General Notes =
-== Resources ==
-https://wiki.ubuntu.com/WubiGuide
-https://launchpad.net/ubuntu/+spec/foundations-o-wubi
-https://launchpad.net/wubi
-=== Remote Access to the Wubi machine ===
- How to run the OpenSSH SSHD server on Windows using Cygwin
-Install the following Cygwin packages (rerun setup if necessary -- you can add packages after you have already installed Cygwin).
-
- Admin --> cygrunsrv
- Net --> openssh
-Open a new bash shell window and run the SSH configure stuff.
-
-ssh-host-config -y
-This step will create necessary configuration files, a priviledge separation user and necessary directories.
-When prompted with "CYGWIN=" type for following:
-
-tty ntsec
-Now you are ready to start the service.
-
-cygrunsrv -S sshd
-
=== removed directory 'wubi/bin'
=== removed file 'wubi/bin/Wubi Test.bat'
--- wubi/bin/Wubi Test.bat 2011-07-25 16:42:56 +0000
+++ wubi/bin/Wubi Test.bat 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-@echo off
-
-C:
-chdir C:\cygwin\home\ubuntu\wubitest
-
-\cygwin\bin\bash.exe --login -c "cd ~/wubitest/; ./bin/test-wubi.sh -r --isopath=data/iso/oneiric-desktop-amd64.iso "
=== removed file 'wubi/bin/bcdedit.exe'
Binary files wubi/bin/bcdedit.exe 2011-07-25 16:42:56 +0000 and wubi/bin/bcdedit.exe 1970-01-01 00:00:00 +0000 differ
=== removed file 'wubi/bin/config'
--- wubi/bin/config 2011-07-28 08:56:53 +0000
+++ wubi/bin/config 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-# Wubi Testing configuration file
-#
-# Must be valid shell script
-JENKINS_MASTER="Master hostname"
-JENKINS_SLAVE="Slave hostname "
-JENKINS_TOKEN="Token to trigger remote build"
-JENKINS_URL="Jenkins address"
-
=== removed file 'wubi/bin/functions'
--- wubi/bin/functions 2011-07-25 16:42:56 +0000
+++ wubi/bin/functions 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-# #!/bin/sh
-#
-# Utility functions
-
-log_msg() {
- printf "$(date '+%F %X'): $@"
-}
-
-log_info_msg() {
- log_msg "Info: $@\n"
-}
-
-log_success_msg() {
- log_msg "Success: $@\n"
-}
-
-log_failure_msg() {
- log_msg "Failure: $@\n"
-}
-
-log_warning_msg() {
- log_msg "Warning: $@\n"
-}
-
-log_begin_msg() {
- log_msg "Begin: $@ ... "
-}
-
-log_end_msg() {
- printf "done.\n"
-}
-
-log_start_job() {
- log_msg "Starting Job: $@\n"
-}
-
-log_end_job() {
- log_msg "Job Finished: $@\n"
-}
=== removed file 'wubi/bin/poll-wubi-results.sh'
--- wubi/bin/poll-wubi-results.sh 2011-07-28 08:56:53 +0000
+++ wubi/bin/poll-wubi-results.sh 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# This job wait for wubi test to finish
-# It is triggered remotely by a remote build call from the wubi host
-#
-# An xml file in RESULTPATH is the condition to end the job
-# Otherwise it ends at when TIMEOUT is reached.
-#
-echo "Test Start"
-env
-
-START=$(date +%s)
-TIMEOUT=3600
-SLEEPTIME=5
-
-BASERESULTDIR=/tmp/${FLAVOR}_${RELEASE}_${ARCH}_${PRESEED}
-TESTRESULTDIR=test-results
-RESULTPATH=$WORKSPACE/$BUILD_NUMBER
-
-if [ -d "$BASERESULTDIR/$TESTRESULTDIR" ]; then
- rm -Rf $BASERESULTDIR/$TESTRESULTDIR
-fi
-
-mkdir -p $RESULTPATH
-mkdir -p $BASERESULTDIR/$TESTRESULTDIR
-
-chmod og+w $BASERESULTDIR
-chmod og+w $BASERESULTDIR/$TESTRESULTDIR
-
-while true; do
- NOW=$(date +%s)
-
- echo "Syncing results"
- rsync -r $BASERESULTDIR/$TESTRESULTDIR $RESULTPATH
-
- if ls $RESULTPATH/$TESTRESULTDIR/ | grep -q 'xml$'; then
- echo "Results found"
- break
- fi
- if [ $(( $NOW - $START )) -gt $TIMEOUT ]; then
- echo "Time out!"
- break
- fi
- sleep $SLEEPTIME
-done
-
-echo "Test End"
=== removed file 'wubi/bin/run-test.sh'
--- wubi/bin/run-test.sh 2011-07-28 08:56:53 +0000
+++ wubi/bin/run-test.sh 1970-01-01 00:00:00 +0000
@@ -1,188 +0,0 @@
-#/bin/sh
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# Automated Wubi installation testing
-#
-# This software is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this software. If not, see <http://www.gnu.org/licenses/>.
-#
-
-JOBNAME="Wubi Test"
-
-BASEDIR="$(dirname $0)/.."
-BINDIR="$BASEDIR/bin"
-DATADIR="$BASEDIR/data"
-CUSTOMDIR="$DATADIR/custom-installation"
-RUNDIR=$BASEDIR/run
-LOGFILE=$RUNDIR/latest/$(basename $0 .sh).log
-STATEFILE=$RUNDIR/job.state
-STATE=""
-
-. $BINDIR/functions
-. $BINDIR/config
-
-mkdir -p $( dirname $LOGFILE)
-
-WUBIEXE="wubi.exe"
-
-# Default Values
-FLAVOR="ubuntu"
-RELEASE="oneiric"
-ARCH="i386"
-TEST="default"
-VARIANT="desktop" # Always desktop for Wubi
-
-# Default values are overridden by those in statefile
-# if a job is already running
-# Then args passed on commandline
-[ -f "$STATEFILE" ] && . $STATEFILE
-
-usage() {
- cat<<EOF
-Usage: $(basename $0) [OPTIONS...]
-
- -f, --flavor FLAVOR Select specific flavor to test ($FLAVOR)
- -r, --release RELEASE Select release to test ($RELEASE)
- -a, --arch ARCH Select architecture to test ($ARCH)
- -t, --test TEST Select test to run ($TEST)
- -h, --help This help
-EOF
- exit 1
-}
-
-run_test () {
- # Run the test
- log_info_msg "Running test for $1"
- $BINDIR/wubi-test.sh -r --isopath=$1
-}
-
-write_state() {
- STATE=$1
- cat<<EOF>${STATEFILE}
-RELEASE=$RELEASE
-FLAVOR=$FLAVOR
-ARCH=$ARCH
-TEST=$TEST
-LOGFILE=$LOGFILE
-STATE=$1
-EOF
-
-}
-
-sync_results() {
- rsync -rvz --del run/latest/ $RESULTDEST
-}
-
-TEMP=$(getopt -o f:r:a:t:h --long help,flavor:,release:,arch:,test: -- "$@")
-eval set -- "$TEMP"
-
-while true ; do
- case "$1" in
- -h|--help)
- usage;;
- -f|--flavor)
- FLAVOR=$2
- shift 2;;
- -r|--release)
- RELEASE=$2
- shift 2 ;;
- -a|--arch)
- ARCH=$2
- shift 2 ;;
- -t|--test)
- TEST=$2
- shift 2 ;;
- --) shift ; break ;;
- *) usage;;
- esac
-done
-
-
-exec 2>&1
-
-
-# Log rotation on first start
-if [ ! -f "$STATEFILE" ]; then
- if [ -d $RUNDIR/latest ]; then
- log_begin_msg "Backup previous log dir to $RUNDIR/$(date '+%Y%m%d-%H%M%S')"
- mv $RUNDIR/latest $RUNDIR/$(date '+%Y%m%d-%H%M%S')
- log_end_msg
- fi
- mkdir -p $RUNDIR/latest
-fi
-
-log_info_msg "Log saved to $LOGFILE"
-
-exec 1>>$LOGFILE
-
-log_start_job "$JOBNAME"
-trap "log_end_job \"$JOBNAME\"" EXIT QUIT
-
-JENKINS_JOB=${RELEASE}-${VARIANT}-${ARCH}_wubi-${TEST}
-ISODIR=$DATADIR/iso/${FLAVOR}
-
-FLAVORPART="${FLAVOR}/"
-[ $FLAVOR == "ubuntu" ] && FLAVORPART=""
-
-ISONAME="${RELEASE}-${VARIANT}-${ARCH}.iso"
-ISOPATH=$ISODIR/$ISONAME
-ZSYNCURL=http://cdimage.ubuntu.com/${FLAVORPART}daily-live/current/${ISONAME}.zsync
-RESULTDEST=$JENKINS_SLAVE:/tmp/${FLAVOR}_${RELEASE}_${ARCH}_${TEST}/test-results
-
-if [ ! -f "$STATEFILE" ]; then
- log_info_msg "State file $STATEFILE not found. Starting new job"
- # No state file, create a new job
- # Start remote jenkins task
- write_state "start-build"
- JOBURL="http://${JENKINS_URL}/job/$JENKINS_JOB/buildWithParameters?token=$JENKINS_TOKEN"
- log_info_msg "Starting remote build $JOBURL"
- ssh $JENKINS_MASTER wget "$JOBURL" -o /dev/null
-
- # Write state change
- # Sync result to notify start
- # Download image from cdimage.u.c
- write_state "sync"
- mkdir -p $ISODIR
- cd $ISODIR
- log_info_msg "Syncing $ZSYNCURL to $ISODIR"
- zsync $ZSYNCURL
-
- # Extract wubi.exe
- log_info_msg "Extracting $WUBIEXE from $ISONAME"
- bsdtar.exe xf $ISONAME $WUBIEXE
- chmod +x $WUBIEXE
- cd -
-
- write_state "running"
-
- log_info_msg "Starting Stage 1"
- # This command will restart the system, so nothing can be done after this.
- run_test $ISOPATH
-elif [ "$STATE" == "running" ]; then
- log_info_msg "Starting Stage 2"
- write_state "report"
- rsync -rvz --del run/latest/ $RESULTDEST
- run_test $ISOPATH
-elif [ "$STATE" == "report" ]; then
- log_info_msg "Syncing results"
- # Last step report slave and remove state file for next run
- # Sync the files
- rsync -rvz --del run/latest/ $RESULTDEST
- rm $STATEFILE
-else
- log_warning_msg "Unknown state: $STATE"
- log_warning_msg "Aborting!"
- exit 1
-fi
-
-log_end_msg
=== removed file 'wubi/bin/ubuntu.ico'
Binary files wubi/bin/ubuntu.ico 2011-07-25 16:42:56 +0000 and wubi/bin/ubuntu.ico 1970-01-01 00:00:00 +0000 differ
=== removed file 'wubi/bin/wubi-diskimage.sh'
--- wubi/bin/wubi-diskimage.sh 2011-10-21 22:51:48 +0000
+++ wubi/bin/wubi-diskimage.sh 1970-01-01 00:00:00 +0000
@@ -1,109 +0,0 @@
-#!/bin/sh
-# Requirements
-# * Add the default user to sudoers without password and to group sudo
-# * Remember to set GRUB_DEFAULT to saved
-
-datadir=../data
-bindir=../bin
-isodir=$datadir/iso/ubuntu
-customdir=$datadir/custom-installation
-diskimage=$isodir/i386.tar.xz
-wubiexe=$isodir/wubi.exe
-hostdev=/dev/sda3
-mntdir=/tmp/wubi/target
-rootdir=/tmp/wubi/rootdisk
-wubidir=$mntdir/wubi
-wubibin=$wubidir/bin
-wubidata=$wubidir/data/iso/ubuntu
-wubirun=$wubidir/run/latest
-
-usage() {
- cat <<EOF
-Usage: $(basename $0) COMMAND [OPTIONS]
-Commands:
- * start [i386|amd64] : Start the test
- * updateroot : Modify root.disk
- * report : Report the final results to Jenkins
-EOF
-
-exit 0
-}
-
-start() {
- # Init the test and copy the files to be tested to the target
-
- diskimage=$isodir/$1.tar.xz
-
- if [ ! -f "$diskimage" ]; then
- echo "Disk image doesn't exist: $diskimage"
- exit 1
- fi
- mount_target
- #sudo mkdir -p $wubidir
- sudo mkdir -p $wubibin $wubirun $wubidata
-
- sudo cp -af $diskimage $wubiexe $wubidata
- sudo cp -af $bindir/functions $bindir/wubi-test.sh $wubibin
-
- #sudo echo "
- # --dimagepath=C:\\wubi\\$(basename $diskimage) --skipmd5check --noninteractive" >$wubidir/wubi.bat
- sudo echo "@echo off
-
-C:
-chdir C:\wubi
-
-\\cygwin\\bin\\bash.exe --login -c \"cd /cygdrive/c/wubi/; ./bin/wubi-test.sh -r --dimagepath=data/iso/ubuntu/$(basename $diskimage)\"
- " | todos > $wubibin/wubi.bat
-
- reboot_once
-}
-
-update_root() {
- # update the root disk
- mount_target
-
- mkdir -p $rootdir
- mountpoint -q $rootdir || sudo mount -t ext3 -o loop $mntdir/ubuntu/disks/root.disk $rootdir
-
- # Copy the content of custom-installation directory
- sudo cp -af $customdir/target-override/* $rootdir/
- sudo umount $rootdir
- reboot_once
-}
-
-report_results() {
- # Report the results to jenkins
- echo "reporting to jenkins"
- mountpoint -q $rootdir || sudo mount -t ext3 -o loop $mntdir/ubuntu/disks/root.disk $rootdir
-
- # Retrieve the results from the host
- # TODO: Change the test script to copy the results on the host
-
- sudo umount $rootdir
-}
-
-reboot_once() {
- # Reboot once to windows
- winentry="$(grep Window /boot/grub/grub.cfg |cut -d\" -f2)"
- sudo grub-set-default 0
- sudo grub-reboot "$winentry"
-}
-
-mount_target() {
- # TODO Check that it is not already mounted
- # If it is reuse the mount point
- mkdir -p $mntdir
- mountpoint -q $mntdir || sudo mount -t ntfs $hostdev $mntdir
-}
-
-
-case "$1" in
- start)
- start $2;;
- updateroot)
- update_root;;
- report)
- report_results;;
- *) usage;;
-esac
-
=== removed file 'wubi/bin/wubi-test.sh'
--- wubi/bin/wubi-test.sh 2011-10-21 22:51:48 +0000
+++ wubi/bin/wubi-test.sh 1970-01-01 00:00:00 +0000
@@ -1,249 +0,0 @@
-#/bin/sh
-# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
-#
-# Automated Wubi installation testing
-#
-# This software is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this software. If not, see <http://www.gnu.org/licenses/>.
-#
-
-# TODO:
-# - Verify that Windows stage is complete and write results somewhere (Use unittest ?)
-# - The following files are on C:/ : wubildr and wubildr.mbr
-# - TARGET_DRIVE/ubuntu is a directory
-# - Verify the content of $TARGET_DRIVE/ubuntu
-# - Add other releases
-
-
-JOBNAME="Wubi Test"
-
-BASEDIR="$(dirname $0)/.."
-BINDIR="$BASEDIR/bin"
-DATADIR="$BASEDIR/data"
-CUSTOMDIR="$DATADIR/custom-installation"
-RUNDIR=$BASEDIR/run
-LOGFILE=$RUNDIR/latest/$(basename $0 .sh).log
-
-. $BINDIR/functions
-
-DRIVE="c"
-I386=""
-ISOPATH=""
-DIMAGEPATH=""
-REBOOT=""
-USERNAME="ubuntu"
-PASSWORD="ubuntu"
-WUBIEXE="$DATADIR/iso/ubuntu/wubi.exe"
-
-TIMEOUT=3600 # Wubi run asynchronously. Need to wait to it to finish and download takes time
-
-usage() {
- cat<<EOF
-Usage: $(basename $0) [OPTIONS...]
-
- -d, --dimagepath=FILE Use specified diskimage (Downloaded if unspecified)
- -i, --isopath=FILE Use specified ISO (Downloaded if unspecified)
- -r, --reboot Reboot after installation
- -t, --drive=TARGET_DRIVE Target drive (Default ${DRIVE}:)
- -x, --32bit Force installation of 32bit version
- -h, --help This help
-EOF
- exit 1
-}
-
-get_bootid() {
- # Return Window's bootid for the boot entry with 'name'
-
- name=$1
- if [ -z "$name" ]; then
- return
- fi
- bootid=$( $BINDIR/bcdedit.exe |grep -B3 "$name" |grep identifier|awk '{print $2}' )
- echo $bootid
-}
-
-TEMP=$(getopt -o hd:i:rt:x --long help,dimagepath:,drive:,reboot,isopath:,32bit -- "$@")
-eval set -- "$TEMP"
-
-while true ; do
- case "$1" in
- -h|--help)
- usage;;
- -t|--drive)
- DRIVE=$2
- shift 2 ;;
- -d|--dimagepath)
- DIMAGEPATH=$2
- shift 2 ;;
- -i|--isopath)
- ISOPATH=$2
- shift 2 ;;
- -r|--reboot)
- REBOOT="Y"
- shift;;
- -x|--32bit)
- I386="--32bit"
- shift;;
- --) shift ; break ;;
- *) usage;;
- esac
-done
-
-#exec 2>&1
-
-if [ -f "$RUNDIR/latest/stage2" ]; then
- #exec 1>>$LOGFILE
- log_start_job "$JOBNAME : Stage 2"
-
- # Just grep 'buntu' to catch derivatives as well
- # It will be used to set default boot entry for stage 2 of the test
- bootid=$(get_bootid "buntu")
-
- if [ -z "$bootid" ]; then
- log_failure_msg "Boot entry for Ubuntu not found. Aborting."
- exit 3
- fi
-
- log_info_msg "Setting $bootid entry as default for next reboot"
- $BINDIR/bcdedit.exe /bootsequence $bootid
-
- if [ "$REBOOT" == "Y" ]; then
- # Reboot
- log_info_msg "Rebooting"
- shutdown.exe /r /f /t 5
- fi
- log_end_msg
- exit 0
-fi
-
-#if [ -d $RUNDIR/latest ]; then
-# log_begin_msg "Backup previous log dir to $RUNDIR/$(date '+%Y%m%d-%H%M%S')"
-# mv $RUNDIR/latest $RUNDIR/$(date '+%Y%m%d-%H%M%S')
-# log_end_msg
-#fi
-#mkdir -p $RUNDIR/latest
-
-#log_info_msg "Log saved to $LOGFILE"
-
-#exec 1>>$LOGFILE
-
-log_start_job "$JOBNAME"
-trap "log_end_job \"$JOBNAME\"" EXIT QUIT
-
-if [ ! -x "$WUBIEXE" ]; then
- log_failure_msg "'$WUBIEXE' not found"
- exit 1
-fi
-
-#WUBIARGS="--password=$PASSWORD --username=$USERNAME --noninteractive --skipmd5check --log-file=$WUBILOG"
-WUBIARGS="--password=$PASSWORD --username=$USERNAME --noninteractive --skipmd5check"
-if [ ! -z "$DIMAGEPATH" ]; then
- if [ ! -f "$DIMAGEPATH" ]; then
- log_failure_msg "File doesn't exist '$DIMAGEPATH'"
- exit 1
- fi
-
- # If an image and 32bit are specified on the command line then check that the image is not 64bit
- if basename "$DIMAGEPATH" | grep -q "amd64"; then
- if [ ! -z "$I386" ]; then
- log_failure_msg "You forced installation of 32bit version but the image is 64bit"
- exit 1
- fi
- else
- I386="--32bit"
- fi
-elif [ ! -z "$ISOPATH" ]; then
- if [ ! -f "$ISOPATH" ]; then
- log_failure_msg "File doesn't exist '$ISOPATH'"
- exit 1
- fi
-
- MIMETYPE=$( file -bi "$ISOPATH" )
- if ! echo "$MIMETYPE" | grep -q iso9660; then
- log_failure_msg "'$ISOPATH' is not a valid ISO (mimetype: $MIMETYPE)"
- exit 1
- fi
-
- # If an image and 32bit are specified on the command line then check that the image is not 64bit
- if basename "$ISOPATH" | grep -q "amd64"; then
- if [ ! -z "$I386" ]; then
- log_failure_msg "You forced installation of 32bit version but the image is 64bit"
- exit 1
- fi
- else
- I386="--32bit"
- fi
-fi
-
-if [ ! -z "$DIMAGEPATH" ]; then
- DIMAGEPATH="--dimagepath=$(cygpath -aw $DIMAGEPATH)"
- WUBIARGS="$WUBIARGS $I386 $DIMAGEPATH"
-elif [ ! -z "$ISOPATH" ]; then
- ISOPATH="--isopath=$(cygpath -aw $ISOPATH)"
- WUBIARGS="$WUBIARGS $I386 $ISOPATH"
-fi
-
-
-log_begin_msg "Uninstalling previous install"
-$WUBIEXE --uninstall --noninteractive
-
-# Take some breath
-sleep 5
-log_end_msg
-
-log_info_msg "Running $(basename $WUBIEXE) $WUBIARGS"
-$WUBIEXE $WUBIARGS
-
-STARTTIME=$(date +%s)
-while true; do
- currtime=$(date +%s)
- timediff=$(( $currtime - $STARTTIME ))
-
- if [ $timediff -gt $TIMEOUT ]; then
- log_failure_msg "Wubi still running after $TIMEOUT seconds. Aborting!"
- exit 2
- fi
- if ! ps -W | grep -q "pyrun.exe"; then
- log_info_msg "Wubi installation done (took ${timediff}s)"
- break
- fi
- log_info_msg "Waiting for wubi to finish. running for ${timediff}s"
- sleep 1
-done
-
-# Only ISO based installation (which uses casper) supports the
-# custom-installation facility
-if [ ! -z "$ISOPATH" ]; then
- TARGET_CUSTOMDIR=/cygdrive/${DRIVE}/ubuntu/install/custom-installation
-
- # Load casper custome-installation directory with tests
- log_begin_msg "Copying $(basename $CUSTOMDIR) to $TARGET_CUSTOMDIR"
- cp -af $CUSTOMDIR/* $TARGET_CUSTOMDIR || true
- log_end_msg
-fi
-
-log_begin_msg "Saving Wubi log file"
-mv /tmp/wubi*.log $RUNDIR/latest/
-log_end_msg
-
-log_begin_msg "Preparing for stage 2"
-touch $RUNDIR/latest/stage2
-log_end_msg
-
-if [ "$REBOOT" == "Y" ]; then
- # Reboot
- log_info_msg "Rebooting"
- shutdown.exe /r /f /t 5
-fi
-
-log_end_msg
=== removed directory 'wubi/data'
=== removed directory 'wubi/data/custom-installation'
=== removed directory 'wubi/data/custom-installation/packages'
=== removed directory 'wubi/data/custom-installation/target-override'
=== removed directory 'wubi/data/custom-installation/target-override/etc'
=== removed file 'wubi/data/custom-installation/target-override/etc/rc.local'
--- wubi/data/custom-installation/target-override/etc/rc.local 2011-10-21 22:51:48 +0000
+++ wubi/data/custom-installation/target-override/etc/rc.local 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-#!/bin/sh -e
-#
-# rc.local
-#
-# This script is executed at the end of each multiuser runlevel.
-# Make sure that the script will "exit 0" on success or any other
-# value on error.
-#
-# In order to enable or disable this script just change the execution
-# bits.
-#
-# By default this script does nothing.
-
-JOBNAME="wubitest"
-logger -t $JOBNAME "Installing prerequisites"
-apt-get update
-apt-get install -y openssh-server python-couchdb subunit python-subunit python-junitxml|logger -t $JOBNAME
-
-RUNTEST=/usr/local/bin/run_test
-if [ -x "$RUNTEST" ]; then
- logger -t $JOBNAME "Starting $RUNTEST"
- sudo $RUNTEST|logger -t $JOBNAME
-else
- logger -t $JOBNAME "Error: File not found '$RUNTEST'"
-fi
=== removed directory 'wubi/data/custom-installation/target-override/usr'
=== removed directory 'wubi/data/custom-installation/target-override/usr/local'
=== removed directory 'wubi/data/custom-installation/target-override/usr/local/bin'
=== removed file 'wubi/data/custom-installation/target-override/usr/local/bin/run_test'
--- wubi/data/custom-installation/target-override/usr/local/bin/run_test 2011-10-21 22:51:48 +0000
+++ wubi/data/custom-installation/target-override/usr/local/bin/run_test 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-# This script must be executed with admin privileges
-
-BASEDIR=$(dirname $0)/..
-TESTDIR=$BASEDIR/tests
-
-# Don't hardcode this, it will break if wubi is not installed on C:
-#LOGDIR=/host/cygwin/home/ubuntu/wubi/wubi/run/latest
-#if [ ! -d "$LOGDIR" ]; then
-# echo "Logdir not found. Aborting!"
-# exit 1
-#fi
-
-LOGDIR=/home/ubuntu/wubirun
-mkdir -p $LOGDIR
-
-cd $TESTDIR
-for t in test_*.py; do
- tbasename=$(basename $t .py)
- echo "Running test: $tbasename"
- python -m subunit.run $tbasename | subunit2junitxml > $LOGDIR/results.${tbasename}.log
-done
-cd -
-
-# Save the installer file
-echo "Saving log files"
-cp -r /var/log/installer $LOGDIR/
-dmesg > $LOGDIR/dmesg
-cp /var/log/syslog $LOGDIR
-
-# Stage 2 is done
-rm -f $LOGDIR/stage2
-
-# Reboot to Ubuntu Host
-reboot
-
-
=== removed directory 'wubi/data/custom-installation/target-override/usr/local/tests'
=== removed file 'wubi/data/custom-installation/target-override/usr/local/tests/test_default.py'
--- wubi/data/custom-installation/target-override/usr/local/tests/test_default.py 2011-07-25 16:42:56 +0000
+++ wubi/data/custom-installation/target-override/usr/local/tests/test_default.py 1970-01-01 00:00:00 +0000
@@ -1,108 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import os.path
-import unittest
-import lsb_release
-import subprocess
-
-logging.basicConfig(level=logging.INFO)
-
-def cmd(command, input = None, stderr = subprocess.STDOUT, stdout = subprocess.PIPE, stdin = None):
- '''Try to execute given command (array) and return its stdout, or return
- a textual error if it failed.'''
-
- try:
- sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True)
- except OSError, e:
- return [127, str(e)]
-
- out, outerr = sp.communicate(input)
- # Handle redirection of stdout
- if out == None:
- out = ''
- # Handle redirection of stderr
- if outerr == None:
- outerr = ''
- return [sp.returncode,out+outerr]
-
-class DefaultTest(unittest.TestCase):
-
- mount_point = "/host"
- wubidir = os.path.join(mount_point, 'ubuntu')
- distinfo = lsb_release.get_distro_information()
- pkg_test = 'hello' # Example package used by the apt test
-
- def test_01_host_is_mounted(self):
- self.assertTrue(os.path.ismount(self.mount_point))
-
- def test_02_read_write(self):
- t_fh = open(os.path.join(self.mount_point, 'Temp', 'a'), 'w')
- self.assertNotEqual(t_fh, None)
- self.assertEqual(t_fh.write('a'), None)
- self.assertEqual(t_fh.close(), None)
-
- def test_03_wubi_dir_structure(self):
- wubi_filelist = (
- '/host/ubuntu/',
- '/host/ubuntu/disks',
- '/host/ubuntu/disks/boot',
- '/host/ubuntu/disks/boot/grub',
- '/host/ubuntu/disks/root.disk',
- '/host/ubuntu/disks/swap.disk',
- '/host/ubuntu/install',
- '/host/ubuntu/Ubuntu.ico',
- '/host/ubuntu/uninstall-wubi.exe',
- '/host/ubuntu/winboot',
- '/host/ubuntu/winboot/wubildr',
- '/host/ubuntu/winboot/wubildr-bootstrap.cfg',
- '/host/ubuntu/winboot/wubildr.cfg',
- '/host/ubuntu/winboot/wubildr.mbr',
- '/host/ubuntu/winboot/wubildr.tar'
- )
-
- for f in wubi_filelist:
- self.assertTrue(os.path.exists(f), "File not found: '%s'" % f)
-
- def test_04_apt_update(self):
- '''apt-get update'''
- rc, report = cmd(['apt-get', 'update'])
- expected = 0
- result = 'Got exit code %d, expected %d\n' % (rc, expected)
- self.assertEquals(expected, rc, result + report)
-
- def test_05_apt_install_remove(self):
- '''apt-get install'''
- rc, report = cmd(['apt-get', 'install', '-y', self.pkg_test])
- expected = 0
- result = 'Got exit code %d, expected %d\n' % (rc, expected)
- self.assertEquals(expected, rc, result + report)
-
- rc, report = cmd(['apt-get', 'remove', '-y', '--purge', self.pkg_test])
- expected = 0
- result = 'Got exit code %d, expected %d\n' % (rc, expected)
- self.assertEquals(expected, rc, result + report)
-
-
-if __name__ == '__main__':
- unittest.main()
-
=== removed directory 'wubi/data/iso'
=== removed directory 'wubi/run'