|
1 | 1 |
|
2 | | -# Baseline Single Job Windows Batch file |
| 2 | +# Baseline Single Job Linux Batch file |
3 | 3 |
|
| 4 | +# Environment setup macros (kept as-is) |
4 | 5 | $VCAST_ENVIRONMENT_SETUP_LINUX |
5 | 6 | $VCAST_USE_CI_LICENSES_LINUX |
| 7 | + |
6 | 8 | export VCAST_RPTS_PRETTY_PRINT_HTML=FALSE |
7 | 9 | export VCAST_NO_FILE_TRUNCATION=1 |
8 | 10 | export VCAST_RPTS_SELF_CONTAINED=FALSE |
9 | 11 |
|
10 | | -# Use strict testcase import |
11 | | -if [[ $VCAST_USE_STRICT_IMPORT -eq 1 ]]; then |
12 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --config=VCAST_STRICT_TEST_CASE_IMPORT=TRUE" |
| 12 | +# --- Use strict testcase import --- |
| 13 | +if [ "${VCAST_USE_STRICT_IMPORT}" -eq 1 ]; then |
| 14 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --config=VCAST_STRICT_TEST_CASE_IMPORT=TRUE" |
13 | 15 | fi |
14 | 16 |
|
15 | | -# Default Setup |
16 | | -$VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --full-status " |
17 | | -$VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --force --release-locks " |
18 | | -$VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --config VCAST_CUSTOM_REPORT_FORMAT=$VCAST_REPORT_FORMAT" |
19 | | - |
| 17 | +# --- Default Setup --- |
| 18 | +"$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --full-status" |
| 19 | +"$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --force --release-locks" |
| 20 | +"$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --config VCAST_CUSTOM_REPORT_FORMAT=${VCAST_REPORT_FORMAT}" |
20 | 21 |
|
21 | | -# Use Imported Results |
22 | | -if [[ $VCAST_USE_IMPORTED_RESULTS -eq 1 ]]; then |
23 | | - if [[ $VCAST_USE_LOCAL_IMPORTED_RESULTS -eq 1 ]] && [[ -f ${VCAST_PROJECT_BASENAME}_results.vcr ]] ; then |
24 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --import-result=${VCAST_PROJECT_BASENAME}_results.vcr" |
25 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --full-status " |
26 | | - if [[ -f ${VCAST_PROJECT_BASENAME}_results.vcr ]] ; then |
27 | | - cp -p ${VCAST_PROJECT_BASENAME}_results.vcr ${VCAST_PROJECT_BASENAME}_results_orig.vcr |
28 | | - fi |
29 | | - fi |
30 | | - if [[ $VCAST_USE_EXTERNAL_IMPORTED_RESULTS -eq 1 ]] && [[ -f "$VCAST_USE_EXTERNAL_FILENAME" ]] ; then |
31 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --import-result="$VCAST_USE_EXTERNAL_FILENAME" " |
32 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --full-status " |
| 22 | +# --- Use Imported Results --- |
| 23 | +if [ "${VCAST_USE_IMPORTED_RESULTS}" -eq 1 ]; then |
| 24 | + if [ "${VCAST_USE_LOCAL_IMPORTED_RESULTS}" -eq 1 ] && [ -f "${VCAST_PROJECT_BASENAME}_results.vcr" ]; then |
| 25 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --import-result=${VCAST_PROJECT_BASENAME}_results.vcr" |
| 26 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --full-status" |
| 27 | + if [ -f "${VCAST_PROJECT_BASENAME}_results.vcr" ]; then |
| 28 | + cp -p "${VCAST_PROJECT_BASENAME}_results.vcr" "${VCAST_PROJECT_BASENAME}_results_orig.vcr" |
33 | 29 | fi |
| 30 | + fi |
| 31 | + |
| 32 | + if [ "${VCAST_USE_EXTERNAL_IMPORTED_RESULTS}" -eq 1 ] && [ -f "${VCAST_USE_EXTERNAL_FILENAME}" ]; then |
| 33 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --import-result=\"${VCAST_USE_EXTERNAL_FILENAME}\"" |
| 34 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --full-status" |
| 35 | + fi |
34 | 36 | fi |
35 | 37 |
|
36 | | -# Clean up old files |
37 | | -rm -f command.log |
38 | | -rm -f *_rebuild.html |
39 | | -rm -f coverage_diffs.html_tmp |
40 | | -rm -f combined_incr_rebuild.tmp |
41 | | -rm -f ${VCAST_PROJECT_BASENAME}_full_report.html_tmp |
42 | | -rm -f ${VCAST_PROJECT_BASENAME}_metrics_report.html |
| 38 | +# --- Clean up old files --- |
| 39 | +rm -f command.log *_rebuild.html coverage_diffs.html_tmp combined_incr_rebuild.tmp "${VCAST_PROJECT_BASENAME}_full_report.html_tmp" "${VCAST_PROJECT_BASENAME}_metrics_report.html" |
43 | 40 |
|
44 | | -$VCAST_EXECUTE_PREAMBLE_LINUX $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --build-execute $VCAST_USE_CBT --output ${VCAST_PROJECT_BASENAME}_rebuild.html " |
| 41 | +# --- Build & Execute --- |
| 42 | +$VCAST_EXECUTE_PREAMBLE_LINUX "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --build-execute ${VCAST_USE_CBT} --output ${VCAST_PROJECT_BASENAME}_rebuild.html" |
45 | 43 |
|
46 | 44 | cp -p command.log complete_build.log |
47 | | -if [ -f {VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT} ]; then |
48 | | - cp -p ${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT} ${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT}_tmp |
49 | 45 |
|
50 | | - # strip off the ToC, etc |
51 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/fixup_reports.py" ${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT}_tmp |
| 46 | +if [ -f "${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT}" ]; then |
| 47 | + cp -p "${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT}" "${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT}_tmp" |
| 48 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/fixup_reports.py" "${VCAST_PROJECT_BASENAME}_rebuild.${VCAST_HTML_OR_TEXT}_tmp" |
52 | 49 | fi |
53 | 50 |
|
54 | | -if [[ $VCAST_OPTION_USE_REPORTING -eq 1 ]]; then |
55 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --config VCAST_CUSTOM_REPORT_FORMAT=HTML" |
56 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/generate-results.py" --junit --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS "$VCAST_PROJECT_NAME" --buildlog complete_build.log |
57 | | - if [[ $VCAST_USE_RGW3 -eq 1 ]] ; then |
58 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --clicast-args rgw export" |
59 | | - fi |
60 | | - if [[ $VCAST_USE_COVERAGE_PLUGIN -eq 1 ]] ; then |
61 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/cobertura.py" --extended "$VCAST_PROJECT_NAME" |
62 | | - fi |
63 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/full_report_no_toc.py" "$VCAST_PROJECT_NAME" |
64 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project $VCAST_PROJECT_NAME --create-report=aggregate --output=${VCAST_PROJECT_BASENAME}_aggregate_report.html" |
| 51 | +# --- Reporting / Plugins --- |
| 52 | +if [ "${VCAST_OPTION_USE_REPORTING}" -eq 1 ]; then |
| 53 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --config VCAST_CUSTOM_REPORT_FORMAT=HTML" |
| 54 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/generate-results.py" --junit --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" "${VCAST_PROJECT_NAME}" --buildlog complete_build.log |
65 | 55 |
|
66 | | - # Use Imported Results |
67 | | - if [[ $VCAST_USE_IMPORTED_RESULTS -eq 1 ]] && [[ $VCAST_USE_LOCAL_IMPORTED_RESULTS -eq 1 ]] ; then |
68 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/managewait.py" --wait_time $VCAST_WAIT_TIME --wait_loops $VCAST_WAIT_LOOPS --command_line "--project "$VCAST_PROJECT_NAME" --export-result=${VCAST_PROJECT_BASENAME}_results.vcr " |
69 | | - $VECTORCAST_DIR/vpython "$WORKSPACE/vc_scripts/merge_vcr.py" --orig ${VCAST_PROJECT_BASENAME}_results_orig.vcr --new ${VCAST_PROJECT_BASENAME}_results.vcr |
70 | | - fi |
71 | | -fi |
| 56 | + if [ "${VCAST_USE_RGW3}" -eq 1 ]; then |
| 57 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --clicast-args rgw export" |
| 58 | + fi |
| 59 | + |
| 60 | + if [ "${VCAST_USE_COVERAGE_PLUGIN}" -eq 1 ]; then |
| 61 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/cobertura.py" --extended "${VCAST_PROJECT_NAME}" |
| 62 | + fi |
72 | 63 |
|
| 64 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/full_report_no_toc.py" "${VCAST_PROJECT_NAME}" |
| 65 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --create-report=aggregate --output=${VCAST_PROJECT_BASENAME}_aggregate_report.html" |
| 66 | + |
| 67 | + if [ "${VCAST_USE_IMPORTED_RESULTS}" -eq 1 ] && [ "${VCAST_USE_LOCAL_IMPORTED_RESULTS}" -eq 1 ]; then |
| 68 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/managewait.py" --wait_time "${VCAST_WAIT_TIME}" --wait_loops "${VCAST_WAIT_LOOPS}" --command_line="--project \"${VCAST_PROJECT_NAME}\" --export-result=${VCAST_PROJECT_BASENAME}_results.vcr" |
| 69 | + "$VECTORCAST_DIR/vpython" "${WORKSPACE}/vc_scripts/merge_vcr.py" --orig "${VCAST_PROJECT_BASENAME}_results_orig.vcr" --new "${VCAST_PROJECT_BASENAME}_results.vcr" |
| 70 | + fi |
| 71 | +fi |
0 commit comments