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
Wiki
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
Anders Lindh Olsson
e3-require
Commits
d5051870
Commit
d5051870
authored
1 year ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
Add test for debug architecture
parent
75406f26
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configure/E3/CONFIG_TEST
+2
-0
2 additions, 0 deletions
configure/E3/CONFIG_TEST
tests/test_e3.py
+23
-0
23 additions, 0 deletions
tests/test_e3.py
tests/utils.py
+3
-2
3 additions, 2 deletions
tests/utils.py
with
28 additions
and
2 deletions
configure/E3/CONFIG_TEST
+
2
−
0
View file @
d5051870
...
...
@@ -12,5 +12,7 @@ VARS_EXCLUDES+=TEMP_CELL_PATH
ifneq (,$(findstring test,$(MAKECMDGOALS)))
TEST_DEBUG_ARCH:=$(if $(and $(findstring debug,$(EPICS_HOST_ARCH)),$(wildcard $(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)/softIocPVA)),$(EPICS_HOST_ARCH))
EXPORT_VARS+=TEST_DEBUG_ARCH
E3_MODULES_PATH=$(TEMP_CELL_PATH)/$(notdir $(EPICS_BASE))/require-$(E3_REQUIRE_VERSION)
endif
This diff is collapsed.
Click to expand it.
tests/test_e3.py
+
23
−
0
View file @
d5051870
import
pytest
from
.utils
import
Wrapper
...
...
@@ -49,3 +51,24 @@ def test_warning_if_building_from_sitemods(wrapper: Wrapper):
assert
(
"
It is ill-advised to build a module from the module install location.
"
in
errs
)
def
test_debug_arch_is_not_used_when_unspecified
(
wrapper
:
Wrapper
):
rc
,
_
,
errs
=
wrapper
.
run_make
(
"
test
"
)
assert
rc
==
0
# Note that output from run-iocsh goes to stderr
assert
f
'
EPICS_HOST_ARCH =
"
{
wrapper
.
host_arch
}
"'
in
errs
def
test_debug_arch_is_used_when_specified
(
wrapper
:
Wrapper
):
debug_arch
=
f
"
{
wrapper
.
host_arch
}
-debug
"
softioc_exec
=
wrapper
.
epics_base
/
"
bin
"
/
debug_arch
/
"
softIocPVA
"
if
not
softioc_exec
.
exists
():
pytest
.
skip
(
"
No debug arch installed
"
)
rc
,
_
,
errs
=
wrapper
.
run_make
(
"
test
"
,
EPICS_HOST_ARCH
=
debug_arch
)
assert
rc
==
0
# Note that output from run-iocsh goes to stderr
assert
f
'
EPICS_HOST_ARCH =
"
{
debug_arch
}
"'
in
errs
This diff is collapsed.
Click to expand it.
tests/utils.py
+
3
−
2
View file @
d5051870
...
...
@@ -78,8 +78,6 @@ include $(REQUIRE_CONFIG)/RULES_SITEMODS
module_makefile_contents
=
"""
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(E3_REQUIRE_TOOLS)/driver.makefile
EXCLUDE_ARCHS+=debug
"""
self
.
module_makefile
.
write_text
(
module_makefile_contents
)
...
...
@@ -138,6 +136,9 @@ EXCLUDE_ARCHS+=debug
args
=
list
(
args
)
if
module_version
:
args
.
append
(
f
"
E3_MODULE_VERSION=
{
module_version
}
"
)
if
not
(
"
TEST_DEBUG_ARCH
"
in
env
and
not
env
[
"
TEST_DEBUG_ARCH
"
]):
args
.
append
(
"
EXCLUDE_ARCHS=debug
"
)
if
cell_path
:
self
.
write_dot_local_data
(
"
CONFIG_CELL
"
,
{
"
E3_CELL_PATH
"
:
cell_path
})
make_cmd
=
[
"
make
"
,
"
-C
"
,
self
.
path
,
target
]
+
args
...
...
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