Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
canbus
CTU CAN FD IP Core
Commits
7effbee7
Commit
7effbee7
authored
May 21, 2018
by
Martin Jeřábek
Browse files
ci: fix flags, add makefile
parent
7f916b97
Changes
3
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
7effbee7
...
@@ -7,9 +7,9 @@ build_ip_and_tests:
...
@@ -7,9 +7,9 @@ build_ip_and_tests:
allow_failure
:
true
allow_failure
:
true
script
:
script
:
-
cd test
-
cd test
-
python run.py --
elaborate
-
make
elaborate
build_driver
:
.
build_driver
:
stage
:
build
stage
:
build
allow_failure
:
true
allow_failure
:
true
script
:
script
:
...
@@ -21,5 +21,10 @@ test_ip:
...
@@ -21,5 +21,10 @@ test_ip:
allow_failure
:
true
allow_failure
:
true
script
:
script
:
-
cd test
-
cd test
-
python run.py --xunit-xml test_output.xml
-
make test XUNIT=1
-
"
gcov
-s
`realpath
..`
*.gcda
|
tail
-n1"
-
make coverage
coverage
:
"
/lines......:
([^%]+%)/"
artifacts
:
paths
:
-
code_html
-
test.xml
test/Makefile
0 → 100644
View file @
7effbee7
PYTHON
:=
python3
XUNIT
?=
0
TEST_FLAGS
=
-p
`
nproc
`
ifeq
($(XUNIT),0)
TEST_FLAGS
+=
else
TEST_FLAGS
+=
--xunit-xml
$@
.xml
endif
all
:
test coverage
elaborate
:
$(PYTHON)
run.py
--elaborate
test
:
$(PYTHON)
run.py
$(TEST_FLAGS)
test_unit
:
test_feature
:
test_sanity
:
coverage
:
lcov
--capture
--directory
.
--output-file
$@
genhtml code_coverage.info
--output-directory
code_html
clean
:
-
rm
-Rf
*
.gcno
*
.gcda vunit_out
.PHONY
:
all elaborate test test_unit test_feature test_sanity clean
test/run.py
View file @
7effbee7
...
@@ -47,17 +47,9 @@ for pattern in ['../src/**/*.vhd', '*.vhd', 'unit/**/*.vhd', 'sanity/*.vhd', 'li
...
@@ -47,17 +47,9 @@ for pattern in ['../src/**/*.vhd', '*.vhd', 'unit/**/*.vhd', 'sanity/*.vhd', 'li
for
f
in
glob
(
p
,
recursive
=
True
):
for
f
in
glob
(
p
,
recursive
=
True
):
lib
.
add_source_file
(
str
(
f
))
lib
.
add_source_file
(
str
(
f
))
lib
.
add_compile_option
(
"ghdl.flags"
,
[
"-Wc,-g"
])
#lib.add_compile_option("ghdl.flags", ["-Wc,-g"])
#ui.add_compile_option('ghdl.flags', ['--ieee=synopsys'])
lib
.
add_compile_option
(
"ghdl.flags"
,
[
"-fprofile-arcs"
,
"-ftest-coverage"
])
lib
.
add_compile_option
(
"ghdl.flags"
,
[
"-fprofile-arcs"
,
"-ftest-coverage"
])
ui
.
set_sim_option
(
"ghdl.elab_flags"
,
[
"-Wl,-lgcov"
,
"-Wl,--coverage"
,
"-Wl,-no-pie"
])
ui
.
set_sim_option
(
"ghdl.elab_flags"
,
[
"-Wl,-lgcov"
,
"-Wl,--coverage"
,
"-Wl,-no-pie"
])
ui
.
set_sim_option
(
"ghdl.sim_flags"
,
[
"--ieee-asserts=disable-at-0"
])
ui
.
set_sim_option
(
"ghdl.sim_flags"
,
[
"--ieee-asserts=disable-at-0"
])
try
:
ui
.
main
()
ui
.
main
()
except
SystemExit
as
exc
:
all_ok
=
exc
.
code
==
0
#if all_ok:
# subprocess.call(["lcov", "--capture", "--directory", ".", "--output-file", "code_coverage.info"])
# subprocess.call(["genhtml", "code_coverage.info", "--output-directory", "code_html"])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment