Skip to content

Commit 63e0328

Browse files
committed
fix(build): update build check commands to use python3 and improve error messages
1 parent 296db68 commit 63e0328

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

infra/build/functions/test_data/expected_build_steps.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"gcr.io/oss-fuzz-base/base-runner",
149149
"bash",
150150
"-c",
151-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine afl --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine afl --architecture x86_64 test-project\\n********************************************************************************\" && false)"
151+
"python3 infra/helper.py check_build --sanitizer address --engine afl --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine afl --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine afl --architecture x86_64 test-project\\n********************************************************************************\" && false)"
152152
],
153153
"id": "build-check-afl-address-x86_64"
154154
},
@@ -289,7 +289,7 @@
289289
"gcr.io/oss-fuzz-base/base-runner",
290290
"bash",
291291
"-c",
292-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
292+
"python3 infra/helper.py check_build --sanitizer address --engine centipede --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
293293
],
294294
"id": "build-check-centipede-address-x86_64"
295295
},
@@ -430,7 +430,7 @@
430430
"gcr.io/oss-fuzz-base/base-runner",
431431
"bash",
432432
"-c",
433-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer none --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer none --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
433+
"python3 infra/helper.py check_build --sanitizer none --engine centipede --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer none --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer none --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
434434
],
435435
"id": "build-check-centipede-none-x86_64"
436436
},
@@ -571,7 +571,7 @@
571571
"gcr.io/oss-fuzz-base/base-runner",
572572
"bash",
573573
"-c",
574-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine honggfuzz --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine honggfuzz --architecture x86_64 test-project\\n********************************************************************************\" && false)"
574+
"python3 infra/helper.py check_build --sanitizer address --engine honggfuzz --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine honggfuzz --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine honggfuzz --architecture x86_64 test-project\\n********************************************************************************\" && false)"
575575
],
576576
"id": "build-check-honggfuzz-address-x86_64"
577577
},
@@ -712,7 +712,7 @@
712712
"gcr.io/oss-fuzz-base/base-runner",
713713
"bash",
714714
"-c",
715-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture x86_64 test-project\\n********************************************************************************\" && false)"
715+
"python3 infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture x86_64 test-project\\n********************************************************************************\" && false)"
716716
],
717717
"id": "build-check-libfuzzer-address-x86_64"
718718
},
@@ -853,7 +853,7 @@
853853
"gcr.io/oss-fuzz-base/base-runner",
854854
"bash",
855855
"-c",
856-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture i386 test-project\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture i386 test-project\\n********************************************************************************\" && false)"
856+
"python3 infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture i386 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture i386 test-project\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture i386 test-project\\n********************************************************************************\" && false)"
857857
],
858858
"id": "build-check-libfuzzer-address-i386"
859859
},
@@ -994,7 +994,7 @@
994994
"gcr.io/oss-fuzz-base/base-runner",
995995
"bash",
996996
"-c",
997-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture aarch64 test-project\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture aarch64 test-project\\n********************************************************************************\" && false)"
997+
"python3 infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture aarch64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture aarch64 test-project\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture aarch64 test-project\\n********************************************************************************\" && false)"
998998
],
999999
"id": "build-check-libfuzzer-address-aarch64"
10001000
},
@@ -1135,7 +1135,7 @@
11351135
"gcr.io/oss-fuzz-base/base-runner",
11361136
"bash",
11371137
"-c",
1138-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer memory --engine libfuzzer --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer memory --engine libfuzzer --architecture x86_64 test-project\\n********************************************************************************\" && false)"
1138+
"python3 infra/helper.py check_build --sanitizer memory --engine libfuzzer --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer memory --engine libfuzzer --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer memory --engine libfuzzer --architecture x86_64 test-project\\n********************************************************************************\" && false)"
11391139
],
11401140
"id": "build-check-libfuzzer-memory-x86_64"
11411141
},
@@ -1276,7 +1276,7 @@
12761276
"gcr.io/oss-fuzz-base/base-runner",
12771277
"bash",
12781278
"-c",
1279-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer undefined --engine libfuzzer --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer undefined --engine libfuzzer --architecture x86_64 test-project\\n********************************************************************************\" && false)"
1279+
"python3 infra/helper.py check_build --sanitizer undefined --engine libfuzzer --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer undefined --engine libfuzzer --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer undefined --engine libfuzzer --architecture x86_64 test-project\\n********************************************************************************\" && false)"
12801280
],
12811281
"id": "build-check-libfuzzer-undefined-x86_64"
12821282
},

infra/build/functions/test_data/expected_centipede_build_steps.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"gcr.io/oss-fuzz-base/base-runner",
106106
"bash",
107107
"-c",
108-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
108+
"python3 infra/helper.py check_build --sanitizer address --engine centipede --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer address --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer address --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
109109
],
110110
"id": "build-check-centipede-address-x86_64"
111111
},
@@ -246,7 +246,7 @@
246246
"gcr.io/oss-fuzz-base/base-runner",
247247
"bash",
248248
"-c",
249-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer none --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer none --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
249+
"python3 infra/helper.py check_build --sanitizer none --engine centipede --architecture x86_64 test-project || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image test-project\\npython infra/helper.py build_fuzzers --sanitizer none --engine centipede --architecture x86_64 test-project\\npython infra/helper.py check_build --sanitizer none --engine centipede --architecture x86_64 test-project\\n********************************************************************************\" && false)"
250250
],
251251
"id": "build-check-centipede-none-x86_64"
252252
},

infra/build/functions/test_data/expected_trial_build_steps.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
"gcr.io/oss-fuzz-base/base-runner-testing-legacy-mybranch",
252252
"bash",
253253
"-c",
254-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer address --engine afl --architecture x86_64 skcms\\npython infra/helper.py check_build --sanitizer address --engine afl --architecture x86_64 skcms\\n********************************************************************************\" && false)"
254+
"python3 infra/helper.py check_build --sanitizer address --engine afl --architecture x86_64 --base-image-tag legacy skcms || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer address --engine afl --architecture x86_64 skcms\\npython infra/helper.py check_build --sanitizer address --engine afl --architecture x86_64 skcms\\n********************************************************************************\" && false)"
255255
],
256256
"id": "build-check-afl-address-x86_64"
257257
},
@@ -343,7 +343,7 @@
343343
"gcr.io/oss-fuzz-base/base-runner-testing-legacy-mybranch",
344344
"bash",
345345
"-c",
346-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 skcms\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture x86_64 skcms\\n********************************************************************************\" && false)"
346+
"python3 infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture x86_64 --base-image-tag legacy skcms || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 skcms\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture x86_64 skcms\\n********************************************************************************\" && false)"
347347
],
348348
"id": "build-check-libfuzzer-address-x86_64"
349349
},
@@ -435,7 +435,7 @@
435435
"gcr.io/oss-fuzz-base/base-runner-testing-legacy-mybranch",
436436
"bash",
437437
"-c",
438-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture i386 skcms\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture i386 skcms\\n********************************************************************************\" && false)"
438+
"python3 infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture i386 --base-image-tag legacy skcms || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture i386 skcms\\npython infra/helper.py check_build --sanitizer address --engine libfuzzer --architecture i386 skcms\\n********************************************************************************\" && false)"
439439
],
440440
"id": "build-check-libfuzzer-address-i386"
441441
},
@@ -527,7 +527,7 @@
527527
"gcr.io/oss-fuzz-base/base-runner-testing-legacy-mybranch",
528528
"bash",
529529
"-c",
530-
"test_all.py || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer undefined --engine libfuzzer --architecture x86_64 skcms\\npython infra/helper.py check_build --sanitizer undefined --engine libfuzzer --architecture x86_64 skcms\\n********************************************************************************\" && false)"
530+
"python3 infra/helper.py check_build --sanitizer undefined --engine libfuzzer --architecture x86_64 --base-image-tag legacy skcms || (echo \"********************************************************************************\\nBuild checks failed.\\nTo reproduce, run:\\npython infra/helper.py build_image skcms\\npython infra/helper.py build_fuzzers --sanitizer undefined --engine libfuzzer --architecture x86_64 skcms\\npython infra/helper.py check_build --sanitizer undefined --engine libfuzzer --architecture x86_64 skcms\\n********************************************************************************\" && false)"
531531
],
532532
"id": "build-check-libfuzzer-undefined-x86_64"
533533
},

infra/build/functions/trial_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def _do_build_type_builds(args, config, credentials, build_type, projects):
433433
credentials,
434434
build_type.type_name,
435435
extra_tags=tags,
436-
timeout=PROJECT_BUILD_TIMEOUT))
436+
timeout=PROJECT_BUILD_TIMEOUT))['id']
437437
time.sleep(1) # Avoid going over 75 requests per second limit.
438438
except Exception as error: # pylint: disable=broad-except
439439
# Handle flake.

0 commit comments

Comments
 (0)