summaryrefslogtreecommitdiff
path: root/check
Commit message (Collapse)AuthorAgeFilesLines
* Convert last cmdtests to yarnsTiago Gomes2015-12-021-37/+1
| | | | | | | The conversion was made so that the build command was used instead of the build-morphology command. Change-Id: I67c43d765ed603ecdd806bc649815526243b7b87
* Remove tests for branch-and-merge pluginTiago Gomes2015-11-241-16/+0
| | | | Change-Id: Ie66b543eb67282c08a2651062727a4583057ee2d
* Add support for Baserock definitions version 7Sam Thursfield2015-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | This adds a new 'Defaults' class to represent definitions defaults The Python 'jsonschema' module is used to validate the contents of the Defaults file. This module is already included in Baserock 'build' and 'devel' reference systems by way of the 'openstack-common' stratum. This commit embeds a copy of the JSON-Schema schema for the DEFAULTS file. I think the canonical location of this schema should be in the reference definitions.git, for now. In future, the schemas should maybe have their own repos. Either way, Morph should embed a copy for the time being so that we are sure the schema matches how Morph expects to parse the file. Morph's automated tests are all updated to use definitions version 7. I removed most of the tests for built-in build systems, because the built-ins themselves are no longer part of Morph. Only the mechanism for defining them needs to be tested now. Change-Id: I65f8f1c967683ef605852bfae5c68518e53f9981
* Force test suite to observe morph.conf tempdirMike Williams2015-09-171-1/+27
| | | | | | | | | This change, suggested in story #16, causes the testing suite to use the user-defined tempdir in /etc/morph.conf if it exists or continue using /tmp if not. This will prevent the test suite from filling drives that are not intended to be used for development work. Change-Id: I94edabe4ea1eca7a55ece7424ece7bbd4b68c513
* check: Allow yarns to be run with --snapshotAdam Coldrick2015-05-201-1/+9
| | | | | | | | It's sometimes useful to use --snapshot when debugging the yarn tests, and `./check --yarns --snapshot` is far easier to type and remember than the required yarn command. Change-Id: I3f9c9599dd8418f28e572e484f3515c6ab004572
* Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-161-3/+2
| | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* Remove remaining test.as-root cmdtestsRichard Maw2014-10-011-16/+0
| | | | | | The repo-alias is indirectly tested by branch-from-image, and checking the --version is part of the release process, so we're not going to miss these tests.
* Remove unused cmdtestsRichard Maw2014-10-011-14/+0
| | | | | | | | | | | | tests.deploy is gone since we have yarn coverage instead. tests/setup had unnecessary setup in it, since the remaining tests require custom setup anyway. A bunch of tests were disabled anyway, so they're gone. Also, there was still code in ./check to run tests.merging, which have been gone for a while.
* Exit check as soon as we have an errorRichard Ipsum2014-04-251-6/+2
|
* style check: Include newly added files in checksRichard Maw2014-03-191-2/+3
|
* check script: allow fine-grained control of which tests are runRichard Maw2014-03-141-17/+82
| | | | | | | | | | ./check with no arguments is as-before, similarly ./check --full, but now you may also specify individual tests to run. So just the style check is `./check --style`. Everything but style is `./check --full --no-style`. I found this convenient when working on the test suite.
* Pass in user's PYTHONPATH to morph when run from yarnsLars Wirzenius2014-03-061-2/+13
| | | | | | | | | | | | | We carefully _add_ to PYTHONPATH in ./check, if it was set by the user. However, yarn cleans the environment when it runs tests, so we tell it to add PYTHONPATH from ./check to the test environment. Additionally, we change yarns/morph.shell-lib so it doesn't override PYTHONPATH, but adds to it. All of this is necessary to get morph, when run by yarn steps, to have the right PYTHONPATH, which can be (and currently is) to allow the user to specify un-installed versions of dependencies, such as cliapp.
* tests: Run style check before slower testsRichard Maw2013-11-211-59/+22
| | | | | | | | | | It turns out that only the check-copyright-year script was exiting properly, but it was not doing the deferred exit that other tests were doing. Other tests would set errors=1, then later check the result and exit if it's non-zero, however the errors variable was set in a sub-shell, since it was on the right-hand side of a pipe.
* Exlcuding yarn files when checking the lenght of linesPedro Alvarez2013-10-281-0/+3
|
* Disable merge testsLars Wirzenius2013-08-141-1/+1
| | | | | morph merge works badly enough that we don't really support it right now, and I don't have time to tweak "morph edit" to make the tests pass.
* Add scenario (yarn) tests for most of branching and mergingLars Wirzenius2013-07-301-0/+9
| | | | | | | | | | | | | | | | | | | | | These scenarios test the basics of most of the subcommands the branch and merge plugin provides. They don't purport to be complete, but give some indication that things work, and form a basis upon which further things can be built. Yarn also isn't included in a Baserock release yet, so we need to keep the cmdtests until Baserock 10 has been released. The existing cmdtest tests are not modified by this: they are left intact, until they can analysed in detail for things to be added to the scenarios. After that, the cmdtest tests will start to go away. Merging is not covered by these tests: it is not clear how merge should work, and the current code is known to do the wrong thing in many cases. Scenarios for merge will be added later. Building is also not covered. Testing builds well needs some additional, careful thinking, and that isn't ready for this patch series. It will be added later.
* Merge branch 'liw/kill-bare-except'Lars Wirzenius2013-05-281-0/+5
|\ | | | | | | | | | | | | Reviewed-by: Richard Maw I, Lars, note that we have an old version of CoverageTestRunner in Baserock. The new version hides the spurious logging messages.
| * Stop using bare except: statementsLars Wirzenius2013-04-161-0/+5
| | | | | | | | | | | | | | | | | | It is almost never a good idea to catch all exceptions, and then do nothing about them. This patch logs all caught exceptions so that the user has some possibilty to debug what is happening. Also, make ./check check for bare excepts and fail the test suite if it finds anything.
* | Add check for executable *.py filesLars Wirzenius2013-05-281-0/+8
|/
* check now uses git config file in morph/scriptsRic Holland2013-03-201-0/+2
| | | | | To remove need of configuring git to check new system .gitconfig file added to morph/scripts and check set to use this file.
* Remove old bootstrap mechanismsSam Thursfield2013-03-131-2/+0
| | | | | | That means that bootstrapping Baserock is currently not possible with this branch of Morph, but there's no reason it cannot be bootstrapped using an older version of Morph instead.
* Skip some tests in ./check by defaultLars Wirzenius2013-03-131-3/+38
| | | | | | | Running all the checks takes over 20 minutes for me. This makes it likely that ./check doesn't get run very often. Dropping the slowest tests by default makes ./check more usefull. Add the --full option to enable the full test suite again.
* Fix ./check on SqueezeSam Thursfield2013-02-211-2/+11
|
* Merge branch 'samthursfield/only-build-systems' of ↵Richard Maw2013-02-211-1/+2
|\ | | | | | | | | | | | | git://git.baserock.org/baserock/baserock/morph This includes a merge fixup in ./check, so that it does not complain about build-system-autotools' test's tabs.
| * Separate out build tests from general Morph testsSam Thursfield2013-02-201-0/+1
|/
* Set PYTHONPATH during testsLars Wirzenius2013-02-061-0/+6
| | | | | | This is necessary so that the write extension run by cmdtest finds the morphlib of the source tree we're running ./check in, rather than the system installed one.
* Add cmdtest for "morph deploy" and rawdisk.writeLars Wirzenius2013-02-061-0/+1
|
* Merge branch 'liw/soft-pyyaml-dep'Sam Thursfield2013-01-291-2/+9
|\ | | | | | | Merge commit fixes up a copyright year and removes EOL whitespace
| * Make yaml be an optional dependencyLars Wirzenius2013-01-291-1/+8
|/ | | | | This can go away when we have made a release with yaml in it, and its staging filler.
* Split merge tests out from the other branching testsSam Thursfield2012-10-291-0/+1
| | | | Merge is by far the most complex of the branching and merging commands.
* Add check for #! in *.py filesLars Wirzenius2012-08-021-0/+10
| | | | | We don't want to have any *.py files as executable scripts, so hashbangs never make sense.
* check: print lines that are too longRichard Maw2012-06-131-0/+1
|
* check: if tabs are encountered, print the linesRichard Maw2012-06-131-0/+1
|
* Exclude script with valid TABs from silliness checkingLars Wirzenius2012-04-231-0/+1
|
* bootstrap: remove wget-listRichard Maw2012-04-201-1/+1
| | | | Pass 1 is done through morph now, so it doesn't need this any more
* Exclude cmdtest test output files from source silliness checksLars Wirzenius2012-03-271-0/+1
|
* Add rudimentary branch+merge supportLars Wirzenius2012-03-261-0/+1
|\
| * Run tests.branching tests with checkLars Wirzenius2012-03-231-0/+1
| |
* | Separate tests that need to be run as root in their own directoryLars Wirzenius2012-03-261-0/+4
|/
* Remove now-unnecessar -c option from cmdtest callLars Wirzenius2012-03-221-1/+1
|
* check: remove fakerootRichard Maw2012-03-071-1/+1
| | | | | It is possible to run the script as root if needed We don't have fakeroot in baserock devel yet
* Make ./check check for long lines (with excptions); fix long linesLars Wirzenius2012-02-271-1/+13
|
* Expand TAB characters and make check check for themLars Wirzenius2012-02-271-0/+13
|
* Add checking of years in copyright statments to ./checkLars Wirzenius2012-02-271-1/+7
|
* add ldconfig location(s) to PATH before running itLars Wirzenius2012-01-111-2/+1
| | | | | | | | Previously, we required the caller to add /usr/sbin (or other possible locations for ldconfig) to PATH before invoking morph. This was inconvenient, so now morph adds the FHS-compliant possible locations itself, to save the caller a bit of pain.
* stop morph from using fakeroot and sudoLars Wirzenius2012-01-111-1/+2
| | | | | | | | | | | | | Instead, assume the whole build will be run, by the user, under fakeroot or sudo (the latter for system image builds). This allows us to run all non-system-image-build tests without root access at all. We now always create the cache directory, if missing, even if we're running as root. We no longer run ldconfig if ld.so.conf is missing. It is missing during our tests, but is (now) created by fhs-dirs for real builds.
* Fix tests to reflect changesRichard Maw2011-12-091-1/+1
| | | | | | | | bins now takes an Execute, so the test needed to be changed to also pass one Execute had to be changed to ignore a statement from coverage Also fixed Execute.runv not outputting its error. I think it is not logged this way, but it does get output like it was before. Also check no longer runs cmdtest from the home directory.
* add script to run test suiteLars Wirzenius2011-12-011-0/+23