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
67c276dd
Commit
67c276dd
authored
3 years ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
Added simple test
parent
55c15865
No related branches found
No related tags found
1 merge request
!83
E3-752: Fetch dependencies recursively
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
require-ess/tools/driver.makefile
+2
-2
2 additions, 2 deletions
require-ess/tools/driver.makefile
tests/test_build.py
+25
-0
25 additions, 0 deletions
tests/test_build.py
with
27 additions
and
2 deletions
require-ess/tools/driver.makefile
+
2
−
2
View file @
67c276dd
...
...
@@ -445,7 +445,7 @@ str-eq = $(if $(subst x$1,,x$2),,t)
_MODULES
:=
_PROCESSED_MODULES
:=
REQ
:=
INSTALLED_MODULES
:=
$(
sort
$(
notdir
$(
shell
ls
-
d
$(
E3_SITEMODS_PATH
)
/
*
$(
EPICS_MODULES
)
/
*
)))
INSTALLED_MODULES
:=
$(
sort
$(
notdir
$(
wildcar
d
$(
E3_SITEMODS_PATH
)
/
*
$(
EPICS_MODULES
)
/
*
)))
# Converts all of the X_DEP_VERSIONs to x_VERSION and records them
define
fetch_module_versions
...
...
@@ -466,7 +466,7 @@ export REQ
# Fetches the data from .dep files to be parsed by the above
define
fetch_deps
$(
shell
cat
$(
E3_SITEMODS_PATH
)
/
$1
/
$(
$1_VERSION
)
/lib/
$(
T_A
)
/
$1
.dep |
sed
'1d'
)
$(
shell
cat
$(
lastword
$(
wildcard
$(
addsuffix
/
$1
/
$(
$1_VERSION
)
/lib/
$(
T_A
)
/
$1
.dep
,
$(
E3_SITEMODS_PATH
)
$(
EPICS_MODULES
))))
|
sed
'1d'
)
endef
# Used to recurse through versions: recursively fetches all of the dependencies from the given module
...
...
This diff is collapsed.
Click to expand it.
tests/test_build.py
+
25
−
0
View file @
67c276dd
...
...
@@ -160,3 +160,28 @@ def test_updated_dependencies(wrappers):
)
assert
rc
==
0
assert
f
"
Loaded
{
wrapper_dep
.
name
}
version
{
new_version
}
"
in
outs
def
test_recursive_deps
(
wrappers
):
wrapper_a
=
wrappers
.
get
()
wrapper_b
=
wrappers
.
get
()
wrapper_c
=
wrappers
.
get
()
cell_path
=
wrapper_a
.
path
/
"
cellMods
"
wrapper_a
.
add_var_to_config_module
(
f
"
{
wrapper_b
.
name
}
_DEP_VERSION
"
,
"
0.0.0+0
"
)
wrapper_b
.
add_var_to_config_module
(
f
"
{
wrapper_c
.
name
}
_DEP_VERSION
"
,
"
0.0.0+0
"
)
wrapper_c
.
add_var_to_makefile
(
"
HEADERS
"
,
f
"
{
wrapper_c
.
name
}
.h
"
)
(
wrapper_c
.
module_dir
/
f
"
{
wrapper_c
.
name
}
.h
"
).
touch
()
wrapper_a
.
add_var_to_makefile
(
"
SOURCES
"
,
f
"
{
wrapper_a
.
name
}
.c
"
)
with
open
(
wrapper_a
.
module_dir
/
f
"
{
wrapper_a
.
name
}
.c
"
,
"
w
"
)
as
f
:
f
.
write
(
f
'
#include
"
{
wrapper_c
.
name
}
.h
"'
)
rc
,
*
_
=
wrapper_c
.
run_make
(
"
cellinstall
"
,
cell_path
=
cell_path
)
assert
rc
==
0
rc
,
*
_
=
wrapper_b
.
run_make
(
"
cellinstall
"
,
cell_path
=
cell_path
)
assert
rc
==
0
rc
,
*
_
=
wrapper_a
.
run_make
(
"
cellinstall
"
,
cell_path
=
cell_path
)
assert
rc
==
0
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