-
Notifications
You must be signed in to change notification settings - Fork 188
kola: Support loading tests from /usr/lib/coreos-assembler/tests/kola #1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kola: Support loading tests from /usr/lib/coreos-assembler/tests/kola #1441
Conversation
In continuing work on external tests, passing `-E` gets awkward for a few reasons. First, it ties the tests too heavily to the source directory. This supports a model like https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests and Debian autopkg test etc. where the tests are installed. This ensures a clean separation from the source directory, which also helps us in e.g. supporting built binaries as is done in ostreedev/ostree#2048 For example, one thing we can do after this is extend the coreos-assembler container with the results of `make install-tests` from relevant git repositories (or make RPMs of them).
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| // can be placed; for example, a project like ostree can install | ||
| // tests at /usr/lib/coreos-assembler/tests/kola/ostree/... | ||
| // and this will be automatically picked up. | ||
| const InstalledTestsDir = "/usr/lib/coreos-assembler/tests/kola" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could we make this a var instead, e.g.
const defaultInstalledTestDirs = "/usr/lib/coreos-assembler/tests/kola"
var InstalledTestsDir = defaultInstalledTestDir
Such that go run -ldflags '-X kola.harness.InstalledTestsDir="foo" ...' works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that this is a standard directory for other components to install to; we already have a way to do "find tests from elsewhere" via -E right?
darkmuggle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely optional nit.
/lgtm
|
/refresh |
This builds on coreos/coreos-assembler#1441 to install our tests rather than running them from the source directory. This model will more cleanly allow us to ship our tests along with a test container or elsewhere, separate from the source directory. Also prep for ostreedev#2048
This builds on coreos/coreos-assembler#1441 to install our tests rather than running them from the source directory. This model will more cleanly allow us to ship our tests along with a test container or elsewhere, separate from the source directory. Also prep for ostreedev#2048
This builds on coreos/coreos-assembler#1441 to install our tests rather than running them from the source directory. This model will more cleanly allow us to ship our tests along with a test container or elsewhere, separate from the source directory. Also prep for ostreedev#2048
This builds on coreos/coreos-assembler#1441 to install our tests rather than running them from the source directory. This model will more cleanly allow us to ship our tests along with a test container or elsewhere, separate from the source directory. Also prep for ostreedev#2048
Switch to the "installed" model introduced by: coreos/coreos-assembler#1441 It's hard to support running tests *both* from the srcdir and installed; in this case because we have a symlink that needs to be followed, which kola knows how to do from the srcdir but not when installed. Let's establish a new convention of `tests/kolainst`. In our case we follow the symlink manually for now. That bit will be cleaned up when we eventually switch entirely to kola tests.
Switch to the "installed" model introduced by: coreos/coreos-assembler#1441 It's hard to support running tests *both* from the srcdir and installed; in this case because we have a symlink that needs to be followed, which kola knows how to do from the srcdir but not when installed. Let's establish a new convention of `tests/kolainst`. In our case we follow the symlink manually for now. That bit will be cleaned up when we eventually switch entirely to kola tests.
Switch to the "installed" model introduced by: coreos/coreos-assembler#1441 It's hard to support running tests *both* from the srcdir and installed; in this case because we have a symlink that needs to be followed, which kola knows how to do from the srcdir but not when installed. Let's establish a new convention of `tests/kolainst`. In our case we follow the symlink manually for now. That bit will be cleaned up when we eventually switch entirely to kola tests.
Switch to the "installed" model introduced by: coreos/coreos-assembler#1441 It's hard to support running tests *both* from the srcdir and installed; in this case because we have a symlink that needs to be followed, which kola knows how to do from the srcdir but not when installed. Let's establish a new convention of `tests/kolainst`. In our case we follow the symlink manually for now. That bit will be cleaned up when we eventually switch entirely to kola tests.
In continuing work on external tests, passing
-Egets awkwardfor a few reasons. First, it ties the tests too heavily to the
source directory.
This supports a model like https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
and Debian autopkg test etc. where the tests are installed.
This ensures a clean separation from the source directory,
which also helps us in e.g. supporting built binaries as is done
in ostreedev/ostree#2048
For example, one thing we can do after this is extend the
coreos-assembler container with the results of
make install-testsfrom relevant git repositories (or make RPMs of them).