script/autobuild: re-use CACHE_SUFFIX from waflib
authorAlexander Bokovoy <ab@samba.org>
Mon, 3 Sep 2018 10:07:23 +0000 (13:07 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Sep 2018 04:37:28 +0000 (06:37 +0200)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
script/autobuild.py

index c569f9de122b4d55b6ec2191dd0f8b84804a52d8..d389838286b9a75961343c5bdf3a1f9bcfcf650c 100755 (executable)
@@ -19,6 +19,13 @@ from email.mime.multipart import MIMEMultipart
 from distutils.sysconfig import get_python_lib
 import platform
 
+try:
+    from waflib.Build import CACHE_SUFFIX
+except ImportError:
+    sys.path.insert(0, "./third_party/waf")
+    from waflib.Build import CACHE_SUFFIX
+
+
 os.environ["PYTHONUNBUFFERED"] = "1"
 
 # This speeds up testing remarkably.
@@ -179,7 +186,10 @@ tasks = {
                     " --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xe/ab" + samba_configure_params, "text/plain"),
                    ("configure-cross-answers", "./configure.developer --out ./bin-xa --cross-compile" \
                     " --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xa/ab" + samba_configure_params, "text/plain"),
-                   ("compare-results", "script/compare_cc_results.py ./bin/c4che/default.cache.py ./bin-xe/c4che/default.cache.py ./bin-xa/c4che/default.cache.py", "text/plain")],
+                   ("compare-results", "script/compare_cc_results.py "
+                    "./bin/c4che/default{} "
+                    "./bin-xe/c4che/default{} "
+                    "./bin-xa/c4che/default{}".format(*([CACHE_SUFFIX]*3)), "text/plain")],
 
     # test build with -O3 -- catches extra warnings and bugs, tests the ad_dc environments
     "samba-o3": [("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),