Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESS EPICS Environment
wrappers
e3-require
Commits
1780206d
Commit
1780206d
authored
2 years ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
Added test to catch missing dependent versions
parent
ed5cc7a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!95
E3-894: Fix issue where non-existent versions would cause the build to hang
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_build.py
+24
-0
24 additions, 0 deletions
tests/test_build.py
with
24 additions
and
0 deletions
tests/test_build.py
+
24
−
0
View file @
1780206d
...
...
@@ -10,6 +10,9 @@ MODULE_VERSION = "0.0.0+0"
MODULE_VERSION_NO_BUILD
=
"
0.0.0
"
RE_MISSING_FILE
=
"
No rule to make target [`
'
]{filename}
'"
RE_MISSING_VERSION
=
(
"
REQUIRED module [`
'
]{module}
'
version [`
'
]{version}
'
does not exist.
"
)
def
create_patch_file
(
path
,
desc
):
...
...
@@ -97,6 +100,27 @@ def test_missing_requirement(wrapper):
assert
'
Invalid dependency
"
FOO_DEP_VERSION
"
; pruning
'
in
errs
def
test_missing_dependent_version
(
wrappers
):
wrapper_dep
=
wrappers
.
get
()
wrapper_main
=
wrappers
.
get
()
cell_path
=
wrapper_main
.
path
/
"
cellMods
"
rc
,
*
_
=
wrapper_dep
.
run_make
(
"
cellinstall
"
,
cell_path
=
cell_path
)
assert
rc
==
0
missing_version
=
"
not_a_real_version
"
wrapper_main
.
add_var_to_config_module
(
f
"
{
wrapper_dep
.
name
}
_DEP_VERSION
"
,
missing_version
)
rc
,
_
,
errs
=
wrapper_main
.
run_make
(
"
cellbuild
"
)
assert
rc
==
2
assert
re
.
search
(
RE_MISSING_VERSION
.
format
(
module
=
wrapper_dep
.
name
,
version
=
missing_version
),
errs
,
)
def
test_header_install_location
(
wrapper
):
subdir
=
wrapper
.
module_dir
/
"
db
"
/
"
subdir
"
subdir
.
mkdir
(
parents
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment