| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Explicitly test that we get the same result twice when computing
ids and keys for the same artifact.
This has the effect of verifying that the memoisation code is
correctly operating.
Signed-Off-By: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Later validation work causes the morphologies to be validated, when they
weren't previously. This would cause the test suite to not pass, since
the morphologies defined in the tests are malformed.
One common problem was tests that, instead of a name field, had the name
of the morpholgy in a field called "chunk".
There were a few cases of new fields being needed, since the tests were
written before they became mandatory.
The most interesting failure was a Source being created, which instead
of being passed a morphology object, was passed a string.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a specific set of 4 architectures that Morph supports, and only
expose that value to morphologies.
Since GNU triplets are very common we also expose a GNU triplet. Other
morphologies should work out their configuration based on MORPH_ARCH.
This commit also removes the morphlib.util.arch() function, which
detected the machine Morph is running on via 'uname -m'. Morph's
architecture names do not necessarily map to the output of 'uname -m'
so we should not rely on it anywhere.
|
|
|
|
|
|
|
|
|
| |
Morph no longer supports setting the prefix using the --prefix
argument / setting. This was only used in tests and during bootstrap.
If a chunk build-depends on a chunk within a stratum which has
a custom prefix, that prefix is appended to the PATH in the build
environment.
|
|
|
|
|
|
| |
In the future we will allow this to be modified to provide a
cross-bootstrap mode, but for now we use the same target as
the host compiler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reorganise the build_artifact() and build_artifacts() functions to
allow more complex work when setting up chunk builds in
build_artifact().
The staging area now holds the BuildEnvironment object (the
environment variables that should be set during build). This makes sense
because all build commands should be run inside the staging area and
therefore through the StagingArea object.
The BuildEnvironment object is now considered immutable after it is
created. The environment is used in cache key computation when
computing what artifacts are required; if it changes after that point
we risk either computing different artifact keys for the same artifact
or missing data in the cache key that should be included in the hash.
Better to force changes into a separate 'extra_env' variable.
|
|
|
|
|
| |
The lookup method will only find the first entry, but previously
would allow later entries to be found by iterating.
|
|
|
|
|
|
|
|
| |
The test relied on undesired behaviour, since it would create
the same source, since the sha1 is not used in the sourcepool's key.
Now it creates a new source pool and replaces the source it is being
compared to.
|
|
|
|
| |
Adjust all other parts and the tests to work with this.
|
|
|
|
|
|
|
|
| |
This removes the requirement that all strata must be in the same
repo as the system morphology.
Both the system "strata" field and the stratum "build-depends" field
are affected.
|
|
|
|
| |
Rename "sources" field of stratum morphologies to "chunks".
|
|
|
|
|
|
|
|
|
| |
This was done with the aid of the pep8 script, available by running
`easy_install pep8`.
It may be worth making this part of ./check, but that will require
putting pep8 into the development tools stratum.
This should be easy, given pep8 has no external dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we can have one place in the code where we determine what
artifacts get built from a specific morphology, rather than spreading
the information around the code base.
From now on, everything is supposed to use the builds_artifacts attribute
to get the list of artifacts. ArtifactResolver has been changed to do that.
Some of the tests are now a bit messier, and should really be changed
to create Morphology objects using MorphologyFactory, but that's a change
for another day.
|
|
|
|
|
| |
This fixes references to a system artifact without the -rootfs appended
and adds a unit test for resolving an arm system artifact.
|
|
|
|
|
|
| |
CacheKeyComputer already re-invents the wheel for hashing a dict,
so re-use that logic rather than re-implement it as creating a
huge string.
|
|
|
|
|
|
|
| |
Previously we were stringifying complex values (lists, dicts) by
using whatever Python produces, but different runs and versions of
Python may convert them differently, particularly dicts. We now do
it manually.
|
|
|
|
|
|
|
|
|
|
| |
commit
This avoids a problem where we make a change to one system morphology in
the "morphs" repository, and then we have to rebuild all system and
stratum artifacts, because their commit sha1 also changed. With this
change, we don't care about the commit sha1 for systems and strata,
just the contents of the morphologies.
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this commit, the ArtifactResolver no longer computes the cache keys
when creating Artifact objects. This will have to happen as a
post-resolving step (e.g. prior to building or checking whether a local
or remote artifact cache has any of the resolved artifacts).
The CacheKeyComputer now takes an Artifact object and computes the cache
keys using its dependencies.
BuildGraph is no longer needed for the CacheKeyComputer unit tests.
|
|
|
|
|
|
|
|
|
|
| |
This is because we will need to integrate a RemoteRepoCache and we don't
always want to create a CachedRepo object (in fact, we only want that
for the sources of artifacts we actually need to build). So we'll use
either the local or the remote repo cache to resolve refs and morphology
texts and then later, when actually caching a repo, we'll set the
source.repo member to a CachedRepo object that we can then use to
unpack the sources.
|
|
|
|
|
|
| |
This is done to avoid a nasty mix of SourcePool lookups using CachedRepo
objects (e.g. for strata within a system) versus lookups using repo names
(e.g for sources within a stratum).
|
|
|
|
|
| |
Also amend tests to operate on a dependency chain starting from
a system morph
|
|
|
|
|
|
| |
Rather than poking the internals of both the build_environment and
cachekeycomputer classes to change the environment, make a new
build environment and cache key computer with a different environment
|
|
|
|
|
|
| |
CacheKeyComputer needs to know some stuff that is needed elsewhere
as well. Rather than duplicate the storage, have a BuildEnvironment
class to handle that.
|
|
|