[Bf-blender-cvs] [6b17b51baa6] master: Buildbot: Attempt to make ctest use proper installed scripts

Sergey Sharybin noreply at git.blender.org
Tue Jul 2 12:36:41 CEST 2019


Commit: 6b17b51baa60b046c76594d25824ac13b2238c42
Author: Sergey Sharybin
Date:   Tue Jul 2 12:36:07 2019 +0200
Branches: master
https://developer.blender.org/rB6b17b51baa60b046c76594d25824ac13b2238c42

Buildbot: Attempt to make ctest use proper installed scripts

===================================================================

M	build_files/buildbot/slave_test.py

===================================================================

diff --git a/build_files/buildbot/slave_test.py b/build_files/buildbot/slave_test.py
index 67fdeb96788..443e776484b 100644
--- a/build_files/buildbot/slave_test.py
+++ b/build_files/buildbot/slave_test.py
@@ -34,6 +34,10 @@ blender_dir = '../blender.git'
 
 if "cmake" in builder:
     build_dir = os.path.abspath(os.path.join('..', 'build', builder))
+    install_dir = os.path.abspath(os.path.join('..', 'install', builder))
+    # NOTE: For quick test only to see if the approach work.
+    # n the future must be replaced with an actual blender version.
+    blender_version = '2.80'
     command_prefix = []
 
     if builder.startswith('linux'):
@@ -49,8 +53,11 @@ if "cmake" in builder:
         elif glibc == 'glibc217':
             command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
 
+    ctest_env = os.environ.copy()
+    ctest_env['BLENDER_SYSTEM_SCRIPTS'] = os.path.join(install_dir, blender_version)
+
     os.chdir(build_dir)
-    retcode = subprocess.call(command_prefix + ['ctest', '--output-on-failure'])
+    retcode = subprocess.call(command_prefix + ['ctest', '--output-on-failure'], env=ctest_env)
 
     # Always exit with a success, for until we know all the tests are passing
     # on all builders.



More information about the Bf-blender-cvs mailing list