This is an automated email from the ASF dual-hosted git repository.
laiyingchun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 60184dd72 [build] Skipping the check of TSAN dependencies when build
in non-TSAN configuration
60184dd72 is described below
commit 60184dd725b912ac2b714c1fd17401c10691fe8d
Author: Yingchun Lai <[email protected]>
AuthorDate: Wed Jun 1 10:56:07 2022 +0800
[build] Skipping the check of TSAN dependencies when build in non-TSAN
configuration
Jenkins' workspaces are reused from one build to another in
an attempt to avoid re-building thirdparty to reduce time,
but it might introduce cross-pollution.
For example, there is a librocksdb.so built incorrectly
dependent libstdc++ by https://gerrit.cloudera.org/c/18241
in a patch set, but it is checked by other CR's jenkins
tasks and cause these tasks failed.
This patch aim to skip the check of TSAN dependencies when
build in non-TSAN configuration.
Change-Id: I8101dea0cd039392dbbc889e66e7a4259dc1b9c2
Reviewed-on: http://gerrit.cloudera.org:8080/18577
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
thirdparty/build-thirdparty.sh | 6 +++++-
thirdparty/postflight.py | 15 ++++++++++++---
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index b1c7bd457..e7ab77256 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -117,7 +117,11 @@ fi
finish() {
# Run the post-flight checks.
- $TP_DIR/postflight.py
+ local postflight_args=
+ if [ -n "$F_TSAN" ]; then
+ postflight_args="$postflight_args --tsan"
+ fi
+ $TP_DIR/postflight.py $postflight_args
echo "---------------------"
echo "Thirdparty dependencies '$ARGS_TO_PRINT' built and installed
successfully"
diff --git a/thirdparty/postflight.py b/thirdparty/postflight.py
index e61adcbf5..4215ef203 100755
--- a/thirdparty/postflight.py
+++ b/thirdparty/postflight.py
@@ -20,6 +20,7 @@
Simple script which performs some sanity checks on the built thirdparty/.
"""
+import argparse
import os
import subprocess
import sys
@@ -84,13 +85,21 @@ echo All TSAN dependencies checked
""".format(tp_dir=TP_DIR))
-def main():
+def main(argv):
+ p = argparse.ArgumentParser()
+ p.add_argument("--tsan", dest="tsan", action="store_true",
+ help="Whether the thirdparty is built in TSAN configuration",
+ default=False, required=False)
+ args = p.parse_args(argv)
print("Running post-flight checks")
print("-------------------------")
- check_tsan_dependencies()
+ if args.tsan:
+ check_tsan_dependencies()
+ else:
+ print("Skipping the check of TSAN dependencies")
print("-------------------------")
print("Post-flight checks succeeded.")
return 0
if __name__ == "__main__":
- sys.exit(main())
+ sys.exit(main(sys.argv[1:]))