No more need to alter sys.path in each and every render_layer unit test.

I tried the clean way, by setting the PYTHONPATH environment variable for
CTest, using SET (CTEST_ENVIRONMENT blablab), but that didn't seem to
work.
This commit is contained in:
Sybren A. Stüvel 2017-04-07 17:50:47 +02:00
parent 6cf3fa9ff0
commit ad60283bc8
102 changed files with 3 additions and 101 deletions

@ -50,7 +50,10 @@ set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background -noaudio --factory-startup
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
macro(RENDER_LAYER_TEST test_name) macro(RENDER_LAYER_TEST test_name)
# Adds ${CMAKE_CURRENT_LIST_DIR} to sys.path so that the tests can import
# things from render_layer_common.py
add_test(render_layer_${test_name} ${TEST_BLENDER_EXE} add_test(render_layer_${test_name} ${TEST_BLENDER_EXE}
--python-expr "import sys; sys.path.append('${CMAKE_CURRENT_LIST_DIR}')"
--python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py -- --python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py --
--testdir="${TEST_SRC_DIR}/layers" --testdir="${TEST_SRC_DIR}/layers"
) )

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

@ -6,7 +6,6 @@ import unittest
import os import os
import sys import sys
sys.path.append(os.path.dirname(__file__))
from render_layer_common import * from render_layer_common import *

Some files were not shown because too many files have changed in this diff Show More