summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* builder.py: Run commands using '-e' flag in 'sh'Pedro Alvarez2016-08-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Some failing commands in a yaml block were being ignored. For example the following commands... pre-configure-commands: - | cp nonexistent foo echo foo ... where giving the following result without making the build fail: ### PRE-CONFIGURE-COMMANDS ### + cp nonexistent foo cp: can't stat 'nonexistent': No such file or directory + echo foo foo This commit also adjusts the test-shell.c to allow the use of '-e' flag. No other changes because the shell was already failing after the first failure found. Change-Id: Ie78b25a99f1b5d6d0d26be74ddc377025dff69fd
* Add local cliapp moduleEdward Cragg2016-03-311-2/+3
| | | | | | | | | | | | | | Add a copy of the specific version of the cliapp module required by morph, a known version of which can't otherwise be guaranteed to be available on general Linux systems, or via PyPi. Including the module directly allows for continued development in line with morph, until a time when it may become desirable to move away from dependence on this module. With a local copy of cliapp added to morph, it has been shown that morph is capable of building Baserock images without depending on an existing Baserock system. Change-Id: Iab1f7037c7afff054a2404c0552d9b5e4d2d141f
* check-copyright-year: Check author date instead of commiter datePedro Alvarez2016-02-131-2/+2
| | | | | | | Now if a patch is sent to review, on year 20xx, and then merged on year 20xx+1, the script will check the former instead of the latter. Change-Id: I5bb9ac05f1fb3fa4a51a051351e754c524897ea1
* Convert last cmdtests to yarnsTiago Gomes2015-12-021-1/+11
| | | | | | | 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-134/+0
| | | | Change-Id: Ie66b543eb67282c08a2651062727a4583057ee2d
* Remove old cruftTiago Gomes2015-11-202-41/+0
| | | | | | | Static analysis showed this code is not being used, and we can always bring it back if necessary through git. Change-Id: Id8bf7d73436b5c3d0dfe050befaae034a05afc86
* Use the shell X-ray modeTiago Gomes2015-08-121-3/+4
| | | | | | | | | | | Instead of logging every command for ourselves, use the shell X-ray mode. As side effect, each command argument will now be printed out in its evaluated form, which aids debugging. Also, improve the visual separation between the different build steps, and display those steps with finer granularity. Change-Id: I16ebe9ba4ac46fef82e37d0b3e05f42d14249de8
* Fix Yarn tests to not include .git directory in built artifactsSam Thursfield2015-08-111-1/+6
| | | | | | | | | When I spotted that artifacts contained a .git directory I was worried that it might indicate a Morph bug. It turned out to be due to the way the 'test shell' used in the Yarn tests works. This change should save anyone else from similar confusion. Change-Id: I97b57eff7aa947506d4062a76e9803398e46c2b6
* Add script to run a distbuild network on the local machineSam Thursfield2015-06-171-0/+523
| | | | Change-Id: I8d3f3ec6a1796b06b32e43dc4839360ff1cc2d86
* yarns: Add the ability to tag chunks and commit updates to definitionsRichard Maw2015-05-111-0/+12
| | | | Change-Id: Ia644ddfaa5138f0ad459099cf26f51b545a9f9ca
* Install licensecheck.pl with morphlibAdam Coldrick2015-04-292-7/+13
| | | | Change-Id: If1b156a309236956d7a35136db35a8fd0ab3ad71
* Use --verbose/-v to show build output, --debug/-d for morph debugJavier Jardón2015-04-221-1/+1
| | | | | | | | | | | Its going to be more likely that a baserock user is more interesed in the build log than actually the debug output from morph. And also the intuitive option would be to use -v for this. --verbose/-v: show build output --debug/-d: show morph debug output Change-Id: I1fb99034dc8680a5f168f6306724663aea33ebc5
* Ignore files in the copyright check scriptAdam Coldrick2015-03-241-0/+4
| | | | | | | Add the ability to ignore files when checking copyright years, and start ignoring the COPYING file. Change-Id: I0cc11456f896e27458357ab0c5729223c71b406e
* scripts/test-shell.c: Add missing license headerJavier Jardón2015-03-171-0/+15
| | | | Change-Id: I46ad9c15064de752e839611d2ce3ee016ec7cc46
* Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-1614-42/+28
| | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* test-shell: Report write failuresRichard Maw2014-11-121-2/+9
|
* Merge branch 'baserock/richardmaw/test-system-integrations'Richard Maw2014-10-241-31/+60
|\ | | | | | | | | | | Reviewed-by: Sam Thursfield Reviewed-by: Pedro Alvarez Reviewed-by: Daniel Silverstone
| * test-shell: Allow to be used in system-integrationsRichard Maw2014-10-241-39/+49
| | | | | | | | | | | | It now works when passed a file, rather than a command to run, and ignores comments and set commands, so the generated preamble is accepted.
| * test-shell: add create file commandRichard Maw2014-10-241-0/+20
|/
* Add echo to the test shellRichard Maw2014-10-081-0/+6
|
* Remove overlap detection logicRichard Maw2014-10-011-45/+0
| | | | | | | I've rarely needed to use it, and on those rare occasions, it would have been easy enough to calculate it. Let's get rid of this step, and save everyone some time in future.
* Add test shell for use in staging area testsRichard Maw2014-10-011-0/+144
| | | | | | | | | | | | | | | | | This is intended to be statically linked, so it can be run in the staging area, without having to build a libc. You shouldn't generally statically link GLibc, because it dynamically links things like NSS modules or locale data, but we only need some very simple stuff, so we can get away with that. There's also potential licensing issues, as GLibc is LGPLv2, so distribution requires providing the ability to re-link against another library, but its use in the test-suite shouldn't count as distribution. There's a couple of commands, the only two needed by the yarn test suite are "copy files" which is like `cp -r . "$DESTDIR"`, and "false", which is for commands to deliberately fail.
* Add script for launching git daemon on random portRichard Maw2014-08-281-0/+46
| | | | | | | This starts the git daemon procvess in inetd mode, so we can bind to an ephemeral port, and still be able to report which port was used, so we can construct git URIs using a non-standard port to talk to simulated git servers.
* edit-morph: Use morphloader rather than morph2Adam Coldrick2014-08-141-52/+8
| | | | | | Update the edit-morph script used in the test suite to use morphloader for saving/loading morphologies rather than morph2. Also remove some unused code.
* Make our use of json binary path safebaserock/richardmaw/bugfix/unicode-safe-jsonRichard Maw2014-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | json only accepts unicode. Various APIs such as file paths and environment variables allow binary data, so we need to support this properly. This patch changes every[1] use of json.load or json.dump to escape non-unicode data strings. This appears exactly as it used to if the input was valid unicode, if it isn't it will insert \xabcd escapes in the place of non-unicode data. When loading back in, if json.load is told to unescape it with `encoding='unicode-escape'` then it will convert it back correctly. This change was primarily to support file paths that weren't valid unicode, where this would choke and die. Now it works, but any tools that parsed the metadata need to unescape the paths. [1]: The interface to the remote repo cache uses json data, but I haven't changes its json.load calls to unescape the data, since the repo caches haven't been made to escape the data.
* yarns: Adapt to put morphologies in subdirsbaserock/richardmaw/S11284/morphologies-by-path-v4Richard Maw2014-07-101-5/+1
| | | | | | | | | | | | | We want to move our morphologies in our definitions repository into subdirectories, so they're more organised. We'd prefer to only refer to morphologies by file path, rather than a name that loosely corresponds to the file path, but we need to support that for backwards compatibility until we can move all of our morphologies into the definitions repository. However, since we want to eventually remove this, and we want to ensure that file paths work, we change the yarn tests to use file paths.
* Add yarn tests for new deployment functionalitybaserock/adamcoldrick/deploy-specific-systems-v5Adam Coldrick2014-06-181-1/+1
|
* Improve check-copyright-year error reportingRichard Ipsum2014-04-251-9/+9
| | | | Be more verbose and exit with an error not an exception.
* Update copyright header in check-silliness scriptRichard Maw2014-04-221-1/+1
| | | | | Reviewed-by: Pedro Alvarez Rubber-stamped-by: Richard Maw
* Merge remote-tracking branch 'origin/baserock/richardmaw/style-checker'Richard Maw2014-04-171-3/+20
|\ | | | | | | | | Reviewed-by: Lars Wirzenius Reviewed-by: Daniel Silverstone
| * check-copyright-year: Use current date for uncommitted changesRichard Maw2014-03-191-3/+20
| |
* | Fix check-silliness' use of awk length functionLars Wirzenius2014-04-171-2/+2
|/ | | | | | | Posix took away using length without (). Reviewed-by: Richard Maw Reviewed-by: Daniel Silverstone
* scripts: Add helper commands for altering cluster morphologiesRichard Maw2014-03-141-11/+97
| | | | | | These define a vocabulary for altering a cluster morphology's fields, since defining an implementation that is only used by one scenario for setup is cumbersome.
* yarns: Ensure machine altered morphologies don't include repo/refRichard Maw2014-02-141-1/+3
|
* Warn and default to null if repo or ref are givenRichard Maw2014-02-131-3/+7
| | | | | | | | | | | | | | | | | | This now means that the system morphology is not altered when chunks are altered, so some tests had to change. Since this uses the python warnings API, these warnings can be ignored by running python -W ignore:"stratum morphology" \ -W ignore:"system morphology" \ "$(which morph)" ...` or turned into errors with python -W error:"stratum morphology" \ -W error:"system morphology" \ "$(which morph)" ...`
* Remove tests for working with null refsRichard Maw2014-02-131-18/+0
| | | | | Refs should be completely omitted, and this is now the standard behaviour, so there's little value in testing the behaviour separately.
* yarns: Add regression test for cache-key clashRichard Maw2014-01-221-0/+18
|
* yarns: Move system artifact inclusion implementationRichard Maw2014-01-221-1/+28
| | | | | | This moves the GIVEN system $system uses $artifacts from $source to the generic implements section, and the Python implementation into the edit-morph helper script.
* tests: Run style check before slower testsRichard Maw2013-11-211-0/+63
| | | | | | | | | | 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.
* Merge remote-tracking branch 'origin/danielfirth/RT189'Lars Wirzenius2013-10-081-2/+0
|\ | | | | | | Changed the error (exception) to list all obsolete fields.
| * Dropped support for 'system-kind' from system morphology filesDan Firth2013-09-271-1/+0
| |
| * Dropped support for 'disk-size' from system morphology files'Dan Firth2013-09-271-1/+0
| |
* | Move helper script to scripts for use in cmdtestsRichard Maw2013-09-261-0/+18
|/
* Merge branch 'liw/b-and-m-yarns'Lars Wirzenius2013-07-311-0/+74
|\ | | | | | | | | Briefly reviewed by Jonathan Maw and Tiago Gomes, but all responsibility is mine.
| * Remove commented out debug statementsLars Wirzenius2013-07-311-2/+0
| | | | | | | | Reported-by: Jonathan Maw
| * Add scenario (yarn) tests for most of branching and mergingLars Wirzenius2013-07-301-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix copyright yearLars Wirzenius2013-07-311-1/+1
| |
* | Add a script to check every .gitmodules file in a system branchJonathan Maw2013-07-251-0/+121
|/
* Fix scripts/test-morph to pass min space options alwaysLars Wirzenius2013-06-171-0/+1
| | | | | It was misisng one case, making the test suite fail on computers with suitable amounts of free space in the right filesystem.
* tests: disable the cache and tempdir space checksRichard Maw2013-06-051-1/+2
| | | | | | | | The size checks are irrelevant for most tests, since they tend to produce tiny systems. This still leaves the size checks themselves untested, however doing so is arguably a system-wide test.