Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Worker.N
openairinterface5G
Commits
28dae909
Commit
28dae909
authored
9 years ago
by
Rohit Gupta
Browse files
Options
Downloads
Patches
Plain Diff
fix for excluding tests listed in xml file
parent
ff706ab0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake_targets/autotests/run_exec_autotests.bash
+18
-0
18 additions, 0 deletions
cmake_targets/autotests/run_exec_autotests.bash
with
18 additions
and
0 deletions
cmake_targets/autotests/run_exec_autotests.bash
+
18
−
0
View file @
28dae909
...
@@ -388,6 +388,7 @@ until [ -z "$1" ]
...
@@ -388,6 +388,7 @@ until [ -z "$1" ]
-g
|
--run-group
)
-g
|
--run-group
)
RUN_GROUP
=
1
RUN_GROUP
=
1
test_case_group
=
$2
test_case_group
=
$2
test_case_group
=
`
sed
"s/
\+
/
\*
/g"
<<<
"
${
test_case_group
}
"
`
# Replace + with * for bash string substituion
echo_info
"Will execute test cases only in group
$test_case_group
"
echo_info
"Will execute test cases only in group
$test_case_group
"
shift
2
;;
shift
2
;;
-p
)
-p
)
...
@@ -423,9 +424,17 @@ rm -fr $tmpfile
...
@@ -423,9 +424,17 @@ rm -fr $tmpfile
xml_conf
=
"
$OPENAIR_DIR
/cmake_targets/autotests/test_case_list.xml"
xml_conf
=
"
$OPENAIR_DIR
/cmake_targets/autotests/test_case_list.xml"
test_case_list
=
`
xmlstarlet sel
-T
-t
-m
/testCaseList/testCase
-s
A:N:-
"@id"
-v
"@id"
-n
$xml_conf
`
test_case_list
=
`
xmlstarlet sel
-T
-t
-m
/testCaseList/testCase
-s
A:N:-
"@id"
-v
"@id"
-n
$xml_conf
`
test_case_excl_list
=
`
xmlstarlet sel
-t
-v
"/testCaseList/TestCaseExclusionList"
$xml_conf
`
echo
"Test Case Exclusion List =
$test_case_excl_list
"
test_case_excl_list
=
`
sed
"s/
\+
/
\*
/g"
<<<
"
$test_case_excl_list
"
`
# Replace + with * for bash string substituion
read
-a
test_case_excl_array
<<<
"
$test_case_excl_list
"
echo
"test_case_list =
$test_case_list
"
echo
"test_case_list =
$test_case_list
"
echo
"Test Case Exclusion List =
$test_case_excl_list
\n
"
readarray
-t
test_case_array
<<<
"
$test_case_list
"
readarray
-t
test_case_array
<<<
"
$test_case_list
"
read
-a
test_case_group_array
<<<
"
$test_case_group
"
read
-a
test_case_group_array
<<<
"
$test_case_group
"
...
@@ -447,6 +456,15 @@ for search_expr in "${test_case_array[@]}"
...
@@ -447,6 +456,15 @@ for search_expr in "${test_case_array[@]}"
flag_run_test_case
=
1
flag_run_test_case
=
1
fi
fi
for
search_excl
in
"
${
test_case_excl_array
[@]
}
"
do
if
[[
$search_expr
==
$search_excl
]]
;
then
flag_run_test_case
=
0
echo_info
"Test case
$search_expr
match found in test case excl group. Will skip the test case for execution..."
break
fi
done
#We skip this test case if it is not in the group list
#We skip this test case if it is not in the group list
if
[
"
$flag_run_test_case
"
-ne
"1"
]
;
then
if
[
"
$flag_run_test_case
"
-ne
"1"
]
;
then
...
...
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