Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fa91eb44
Commit
fa91eb44
authored
Jun 15, 2017
by
ymqytw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix naming for testgrid
parent
e08dfeb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
sh2ju.sh
third_party/forked/shell2junit/sh2ju.sh
+8
-8
No files found.
third_party/forked/shell2junit/sh2ju.sh
View file @
fa91eb44
...
...
@@ -146,17 +146,17 @@ $errMsg
"
## testsuite block
if
[[
-e
"
$juDIR
/junit
-
$suite
.xml"
]]
;
then
if
[[
-e
"
$juDIR
/junit
_
$suite
.xml"
]]
;
then
# file exists. first update the failures count
failCount
=
`
sed
-n
"s/.*testsuite.*failures=
\"\(
[0-9]*
\)\"
.*/
\1
/p"
"
$juDIR
/junit
-
$suite
.xml"
`
failCount
=
`
sed
-n
"s/.*testsuite.*failures=
\"\(
[0-9]*
\)\"
.*/
\1
/p"
"
$juDIR
/junit
_
$suite
.xml"
`
errors
=
$((
$failCount
+
$errors
))
sed
-i
"0,/failures=
\"
$failCount
\"
/ s/failures=
\"
$failCount
\"
/failures=
\"
$errors
\"
/"
"
$juDIR
/junit
-
$suite
.xml"
sed
-i
"0,/errors=
\"
$failCount
\"
/ s/errors=
\"
$failCount
\"
/errors=
\"
$errors
\"
/"
"
$juDIR
/junit
-
$suite
.xml"
sed
-i
"0,/failures=
\"
$failCount
\"
/ s/failures=
\"
$failCount
\"
/failures=
\"
$errors
\"
/"
"
$juDIR
/junit
_
$suite
.xml"
sed
-i
"0,/errors=
\"
$failCount
\"
/ s/errors=
\"
$failCount
\"
/errors=
\"
$errors
\"
/"
"
$juDIR
/junit
_
$suite
.xml"
# file exists. Need to append to it. If we remove the testsuite end tag, we can just add it in after.
sed
-i
"s^</testsuite>^^g"
$juDIR
/junit
-
$suite
.xml
## remove testSuite so we can add it later
sed
-i
"s^</testsuites>^^g"
$juDIR
/junit
-
$suite
.xml
cat
<<
EOF
>> "
$juDIR
/junit
-
$suite
.xml"
sed
-i
"s^</testsuite>^^g"
$juDIR
/junit
_
$suite
.xml
## remove testSuite so we can add it later
sed
-i
"s^</testsuites>^^g"
$juDIR
/junit
_
$suite
.xml
cat
<<
EOF
>> "
$juDIR
/junit
_
$suite
.xml"
$content
</testsuite>
</testsuites>
...
...
@@ -164,7 +164,7 @@ EOF
else
# no file exists. Adding a new file
cat
<<
EOF
> "
$juDIR
/junit
-
$suite
.xml"
cat
<<
EOF
> "
$juDIR
/junit
_
$suite
.xml"
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite failures="
$errors
" assertions="
$assertions
" name="
$suite
" tests="1" errors="
$errors
" time="
$total
">
...
...
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