Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
2bda98f7
Commit
2bda98f7
authored
Mar 04, 2016
by
Josh Haberman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly report C++ build time.
parent
1ee0fda5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
build_and_run_docker.sh
tools/jenkins/build_and_run_docker.sh
+7
-5
make_test_output.py
tools/jenkins/make_test_output.py
+2
-2
jenkins.sh
tools/run_tests/jenkins.sh
+6
-1
No files found.
tools/jenkins/build_and_run_docker.sh
View file @
2bda98f7
...
@@ -46,16 +46,18 @@ cd -
...
@@ -46,16 +46,18 @@ cd -
# Use image name based on Dockerfile location checksum
# Use image name based on Dockerfile location checksum
DOCKER_IMAGE_NAME
=
$(
basename
$DOCKERFILE_DIR
)
_
$(
sha1sum
$DOCKERFILE_DIR
/Dockerfile |
cut
-f1
-d
\
)
DOCKER_IMAGE_NAME
=
$(
basename
$DOCKERFILE_DIR
)
_
$(
sha1sum
$DOCKERFILE_DIR
/Dockerfile |
cut
-f1
-d
\
)
# Ensure existence of ccache directory
CCACHE_DIR
=
/tmp/protobuf-ccache
mkdir
-p
$CCACHE_DIR
# Make sure docker image has been built. Should be instantaneous if so.
# Make sure docker image has been built. Should be instantaneous if so.
docker build
-t
$DOCKER_IMAGE_NAME
$DOCKERFILE_DIR
docker build
\
-v
$CCACHE_DIR
:
$CCACHE_DIR
\
-t
$DOCKER_IMAGE_NAME
$DOCKERFILE_DIR
# Choose random name for docker container
# Choose random name for docker container
CONTAINER_NAME
=
"build_and_run_docker_
$(
uuidgen
)
"
CONTAINER_NAME
=
"build_and_run_docker_
$(
uuidgen
)
"
# Ensure existence of ccache directory
CCACHE_DIR
=
/tmp/protobuf-ccache
mkdir
-p
$CCACHE_DIR
# Run command inside docker
# Run command inside docker
docker run
\
docker run
\
"
$@
"
\
"
$@
"
\
...
...
tools/jenkins/make_test_output.py
View file @
2bda98f7
...
@@ -58,8 +58,8 @@ def readtests(basedir):
...
@@ -58,8 +58,8 @@ def readtests(basedir):
# up in the job log.
# up in the job log.
tests
[
"cpp"
][
"name"
]
=
"cpp"
tests
[
"cpp"
][
"name"
]
=
"cpp"
# TODO
with
open
(
basedir
+
'/logs/1/cpp/build_time'
,
'r'
)
as
f
:
tests
[
"cpp"
][
"time"
]
=
"0"
tests
[
"cpp"
][
"time"
]
=
f
.
read
()
.
strip
()
tests
[
"cpp"
][
"failure"
]
=
False
tests
[
"cpp"
][
"failure"
]
=
False
ret
=
tests
.
values
()
ret
=
tests
.
values
()
...
...
tools/run_tests/jenkins.sh
View file @
2bda98f7
...
@@ -34,7 +34,12 @@ mkdir -p $LOG_OUTPUT_DIR/1/cpp
...
@@ -34,7 +34,12 @@ mkdir -p $LOG_OUTPUT_DIR/1/cpp
# $DIR/logs/1/java_jdk7/stderr
# $DIR/logs/1/java_jdk7/stderr
CPP_STDOUT
=
$LOG_OUTPUT_DIR
/1/cpp/stdout
CPP_STDOUT
=
$LOG_OUTPUT_DIR
/1/cpp/stdout
CPP_STDERR
=
$LOG_OUTPUT_DIR
/1/cpp/stderr
CPP_STDERR
=
$LOG_OUTPUT_DIR
/1/cpp/stderr
$TEST_SCRIPT
cpp
>
>(
tee
$CPP_STDOUT
)
2>
>(
tee
$CPP_STDERR
>
&2
)
# It's important that we get /usr/bin/time (which supports -f and -o) and not
# the bash builtin "time" which doesn't.
TIME_CMD
=
"/usr/bin/time -f %e -o
$LOG_OUTPUT_DIR
/1/cpp/build_time"
$TIME_CMD
$TEST_SCRIPT
cpp
>
>(
tee
$CPP_STDOUT
)
2>
>(
tee
$CPP_STDERR
>
&2
)
# Other tests are run in parallel. The overall run fails if any one of them
# Other tests are run in parallel. The overall run fails if any one of them
# fails.
# fails.
...
...
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