Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
19453582
Commit
19453582
authored
Aug 17, 2023
by
Samir Halilcevic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix autobahn run.sh
parent
f9a8789b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
12 deletions
+39
-12
.ci/autobahn-testsuite/run.sh
.ci/autobahn-testsuite/run.sh
+39
-12
No files found.
.ci/autobahn-testsuite/run.sh
View file @
19453582
#! /bin/bash
#! /bin/bash
-x
SCRIPT_DIR
=
$(
dirname
"
$0
"
)
set
-e
BUILD_DIR
=
${
1
:-
$SCRIPT_DIR
/../../build
}
REPORT_DIR
=
"./reports"
REPORT_JSON_FILE
=
"
$REPORT_DIR
/index.json"
CONFIG_FILE
=
"test_config.json"
cat
>
test_config.json
<<
EOF
function
cleanup
()
{
rm
-rf
"
$CONFIG_FILE
"
kill
%1
}
function
count_by_status
()
{
GREP_STRING
=
$(
printf
'"behavior": "%s"'
"
$1
"
)
NUM
=
$(
grep
-c
"
$GREP_STRING
"
$REPORT_JSON_FILE
)
if
[
"
$NUM
"
-gt
0
]
;
then
echo
"There are
$NUM
$1
Autobahn tests"
>
&2
echo
"The following tests finished with status
$1
"
>
&2
grep
"
$GREP_STRING
"
-B1
"
$REPORT_JSON_FILE
"
|
\
grep
-v
-P
"(behavior)|(--)"
|
\
cut
-d
:
-f
1
>
&2
fi
echo
"
$NUM
"
}
if
[
$#
-ne
1
]
;
then
exit
255
fi
cat
>
$CONFIG_FILE
<<
EOF
{
{
"options": {},
"options": {},
"outdir": "
./reports/
",
"outdir": "
$REPORT_DIR
",
"servers": [
"servers": [
{
{
"agent": "CAF Websocket Autobahn Driver",
"agent": "CAF Websocket Autobahn Driver",
...
@@ -19,13 +43,16 @@ cat > test_config.json << EOF
...
@@ -19,13 +43,16 @@ cat > test_config.json << EOF
"exclude-agent-cases": {}
"exclude-agent-cases": {}
}
}
EOF
EOF
trap
cleanup EXIT
"
${
BUILD_DIR
}
"
/libcaf_net/caf-net-autobahn-driver
-p
7788
>
/dev/null &
set
-x
"
$BUILD_DIR
"
/libcaf_net/caf-net-autobahn-driver
-p
7788
>
/dev/null &
wstest
-m
fuzzingclient
-s
test_config.json
wstest
-m
fuzzingclient
-s
$CONFIG_FILE
kill
%1
grep
'"behavior"'
./reports/index.json |
sort
|
uniq
-c
echo
"Autobahn testsuite finished"
echo
"Test report by status:"
grep
'"behavior"'
$REPORT_JSON_FILE
|
sort
|
uniq
-c
exit
1
NUM_OF_FAILED_TESTS
=
$(
count_by_status FAILED
)
NUM_OF_NON_STRICT
=
$(
count_by_status NON-STRICT
)
exit
$((
NUM_OF_NON_STRICT
+
NUM_OF_FAILED_TESTS
))
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