Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
SoCLabs
NanoSoC Tech
Commits
0fc55ad8
Commit
0fc55ad8
authored
1 year ago
by
dam1n19
Browse files
Options
Downloads
Patches
Plain Diff
Updated regression flow to properly handle timeouts
parent
a026bed2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
makefile
+22
-7
22 additions, 7 deletions
makefile
with
22 additions
and
7 deletions
makefile
+
22
−
7
View file @
0fc55ad8
...
...
@@ -202,28 +202,28 @@ TEST_LIST_VCS = $(shell cat $(TEST_LIST_FILE) | while read line || [ -n "$$line"
# Create templates for Make Targets
define
mti_template
.PHONY
:
$(1)
.PHONY
:
mti_
$(1)
mti_$(1)
:
@
echo
Starting Test
$(
1
)
@
timeout
$(
TIMEOUT
)
$$(
MAKE
)
run_mti
TESTNAME
=
$(
1
)
>
$$(
REGRESSION
)
/
$(
1
)
.log
||
true
@
$$(
MAKE
)
regression_test_mti
TESTNAME
=
$(
1
)
>>
/dev/null 2>&1
@
if
cat
$$(
REGRESSION
)
/
$(
1
)
.log |
grep
" TEST PASSED "
;
then
echo
"
$(
1
)
: PASSED"
>>
$$(
REGRESSION
)
/RESULTS.log
;
elif
cat
$$(
REGRESSION
)
/
$(
1
)
.log |
grep
" TEST SKIPPED "
;
then
echo
"
$(
1
)
: SKIPPED"
;
else
echo
"
$(
1
)
: FAILED"
>>
$$(
REGRESSION
)
/RESULTS.log
;
fi
>
/dev/null
@
echo
Finished Test
$(
1
)
endef
define
xm_template
.PHONY
:
$(1)
.PHONY
:
xm_
$(1)
xm_$(1)
:
@
echo
Starting Test
$(
1
)
@
timeout
$(
TIMEOUT
)
$$(
MAKE
)
-j1
run_xm
TESTNAME
=
$(
1
)
>
$$(
REGRESSION
)
/
$(
1
)
.log
||
true
@
$$(
MAKE
)
regression_test_xm
TESTNAME
=
$(
1
)
>>
/dev/null 2>&1
@
if
cat
$$(
REGRESSION
)
/
$(
1
)
.log |
grep
" TEST PASSED "
;
then
echo
"
$(
1
)
: PASSED"
>>
$$(
REGRESSION
)
/RESULTS.log
;
elif
cat
$$(
REGRESSION
)
/
$(
1
)
.log |
grep
" TEST SKIPPED "
;
then
echo
"
$(
1
)
: SKIPPED"
;
else
echo
"
$(
1
)
: FAILED"
>>
$$(
REGRESSION
)
/RESULTS.log
;
fi
>
/dev/null
@
echo
Finished Test
$(
1
)
endef
define
vcs_template
.PHONY
:
$(1)
.PHONY
:
vcs_
$(1)
vcs_$(1)
:
@
echo
Starting Test
$(
1
)
@
timeout
$(
TIMEOUT
)
$$(
MAKE
)
-j1
run_vcs
TESTNAME
=
$(
1
)
>
$$(
REGRESSION
)
/
$(
1
)
.log
||
true
@
$$(
MAKE
)
regression_test_vcs
TESTNAME
=
$(
1
)
>>
/dev/null 2>&1
@
if
cat
$$(
REGRESSION
)
/
$(
1
)
.log |
grep
-i
" TEST PASSED "
;
then
echo
"
$(
1
)
: PASSED"
>>
$$(
REGRESSION
)
/RESULTS.log
;
elif
cat
$$(
REGRESSION
)
/
$(
1
)
.log |
grep
-i
" TEST SKIPPED "
;
then
echo
"
$(
1
)
: SKIPPED"
;
else
echo
"
$(
1
)
: FAILED"
>>
$$(
REGRESSION
)
/RESULTS.log
;
fi
>
/dev/null
@
echo
Finished Test
$(
1
)
endef
...
...
@@ -233,6 +233,16 @@ $(foreach TESTNAME,$(TEST_LIST), $(eval $(call mti_template,$(TESTNAME))))
$(
foreach
TESTNAME,
$(
TEST_LIST
)
,
$(
eval
$(
call xm_template,
$(
TESTNAME
))))
$(
foreach
TESTNAME,
$(
TEST_LIST
)
,
$(
eval
$(
call vcs_template,
$(
TESTNAME
))))
# Make Simulate Targets with timeouts
regression_test_mti
:
@
timeout
$(
TIMEOUT
)
$(
MAKE
)
run_mti
TESTNAME
=
$(
TESTNAME
)
>
$(
REGRESSION
)
/
$(
TESTNAME
)
.log
||
true
regression_test_xm
:
@
timeout
$(
TIMEOUT
)
$(
MAKE
)
run_xm
TESTNAME
=
$(
TESTNAME
)
>
$(
REGRESSION
)
/
$(
TESTNAME
)
.log
||
true
regression_test_vcs
:
@
timeout
$(
TIMEOUT
)
$(
MAKE
)
run_vxs
TESTNAME
=
$(
TESTNAME
)
>
$(
REGRESSION
)
/
$(
TESTNAME
)
.log
||
true
# Create a List of PHONY Targets
.PHONY
:
run_$(SIMULATOR) sim_$(SIMULATOR) all_$(SIMULATOR) test_$(SIMULATOR)
...
...
@@ -326,8 +336,13 @@ run_mti : code compile_mti
@
echo
"run -all"
>
$(
SIM_DIR
)
/run.tcl.tmp
@
echo
"quit -f"
>>
$(
SIM_DIR
)
/run.tcl.tmp
@
mv
$(
SIM_DIR
)
/run.tcl.tmp
$(
SIM_DIR
)
/run.tcl
cd
$(
SIM_DIR
);
vsim
$(
MTI_RUN_OPTIONS
)
-c
$(
TB_TOP
)
-do
run.tcl |
tee
logs/run_
$(
TESTNAME
)
.log
;
cd
$(
SIM_DIR
);
vsim
$(
MTI_RUN_OPTIONS
)
-c
$(
TB_TOP
)
-do
run.tcl |
tee
$(
SIM_DIR
)
/
logs/run_
$(
TESTNAME
)
.log
;
run_mti_to
:
timeout
2s
$(
MAKE
)
run_mti
>>
/dev/null 2>&1
run_mti_wrap
:
$(
MAKE
)
run_mti_to
test_mti
:
@
echo
$(
TESTNAME
)
...
...
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