OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # This is the script that runs inside Docker, once the image has been built, | 3 # This is the script that runs inside Docker, once the image has been built, |
4 # to execute all tests for the "pull request" project. | 4 # to execute all tests for the "pull request" project. |
5 | 5 |
6 WORKSPACE_BASE=`pwd` | 6 WORKSPACE_BASE=`pwd` |
7 MY_DIR="$(dirname "$0")" | 7 MY_DIR="$(dirname "$0")" |
8 TEST_SCRIPT=$MY_DIR/../tests.sh | 8 TEST_SCRIPT=$MY_DIR/../tests.sh |
9 BUILD_DIR=/tmp/protobuf | 9 BUILD_DIR=/tmp/protobuf |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 CPP_STDOUT=$LOG_OUTPUT_DIR/1/cpp/stdout | 38 CPP_STDOUT=$LOG_OUTPUT_DIR/1/cpp/stdout |
39 CPP_STDERR=$LOG_OUTPUT_DIR/1/cpp/stderr | 39 CPP_STDERR=$LOG_OUTPUT_DIR/1/cpp/stderr |
40 | 40 |
41 # Time the C++ build, so we can put this info in the test output. | 41 # Time the C++ build, so we can put this info in the test output. |
42 # It's important that we get /usr/bin/time (which supports -f and -o) and not | 42 # It's important that we get /usr/bin/time (which supports -f and -o) and not |
43 # the bash builtin "time" which doesn't. | 43 # the bash builtin "time" which doesn't. |
44 TIME_CMD="/usr/bin/time -f %e -o $LOG_OUTPUT_DIR/1/cpp/build_time" | 44 TIME_CMD="/usr/bin/time -f %e -o $LOG_OUTPUT_DIR/1/cpp/build_time" |
45 | 45 |
46 $TIME_CMD $TEST_SCRIPT cpp > >(tee $CPP_STDOUT) 2> >(tee $CPP_STDERR >&2) | 46 $TIME_CMD $TEST_SCRIPT cpp > >(tee $CPP_STDOUT) 2> >(tee $CPP_STDERR >&2) |
47 | 47 |
48 # Other tests are run in parallel. TEST_SET is defined in | 48 # Other tests are run in parallel. |
49 # buildcmds/pull_request{_32}.sh | |
50 | 49 |
51 parallel --results $LOG_OUTPUT_DIR --joblog $OUTPUT_DIR/joblog $TEST_SCRIPT :::
\ | 50 parallel --results $LOG_OUTPUT_DIR --joblog $OUTPUT_DIR/joblog $TEST_SCRIPT :::
\ |
52 $TEST_SET \ | 51 csharp \ |
| 52 java_jdk7 \ |
| 53 javanano_jdk7 \ |
| 54 java_oracle7 \ |
| 55 javanano_oracle7 \ |
| 56 python \ |
| 57 python_cpp \ |
| 58 ruby21 \ |
53 || true # Process test results even if tests fail. | 59 || true # Process test results even if tests fail. |
54 | 60 |
55 cat $OUTPUT_DIR/joblog | 61 cat $OUTPUT_DIR/joblog |
56 | 62 |
57 # The directory that is copied from Docker back into the Jenkins workspace. | 63 # The directory that is copied from Docker back into the Jenkins workspace. |
58 COPY_FROM_DOCKER=/var/local/git/protobuf/testoutput | 64 COPY_FROM_DOCKER=/var/local/git/protobuf/testoutput |
59 mkdir -p $COPY_FROM_DOCKER | 65 mkdir -p $COPY_FROM_DOCKER |
60 TESTOUTPUT_XML_FILE=$COPY_FROM_DOCKER/testresults.xml | 66 TESTOUTPUT_XML_FILE=$COPY_FROM_DOCKER/testresults.xml |
61 | 67 |
62 # Process all the output files from "parallel" and package them into a single | 68 # Process all the output files from "parallel" and package them into a single |
63 # .xml file with detailed, broken-down test output. | 69 # .xml file with detailed, broken-down test output. |
64 python $MY_DIR/make_test_output.py $OUTPUT_DIR > $TESTOUTPUT_XML_FILE | 70 python $MY_DIR/make_test_output.py $OUTPUT_DIR > $TESTOUTPUT_XML_FILE |
65 | 71 |
66 ls -l $TESTOUTPUT_XML_FILE | 72 ls -l $TESTOUTPUT_XML_FILE |
OLD | NEW |