Remember to define __BIG_ENDIAN__ for the tests as well as makensis.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4514 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7a6d8b8d8b
commit
e2c7cdb60a
4 changed files with 23 additions and 9 deletions
|
@ -33,6 +33,10 @@ util_env = defenv.Copy()
|
||||||
|
|
||||||
cp_util_env = util_env.Copy()
|
cp_util_env = util_env.Copy()
|
||||||
|
|
||||||
|
### test environment
|
||||||
|
|
||||||
|
test_env = defenv.Copy()
|
||||||
|
|
||||||
# return
|
# return
|
||||||
|
|
||||||
Return('stub_env makensis_env plugin_env util_env cp_util_env')
|
Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
|
||||||
|
|
|
@ -101,6 +101,10 @@ cross_env(util_env)
|
||||||
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
||||||
util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||||
|
|
||||||
|
### test environment
|
||||||
|
|
||||||
|
test_env = defenv.Copy()
|
||||||
|
|
||||||
### weird GCC requirements
|
### weird GCC requirements
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -239,8 +243,9 @@ def check_big_endian(ctx):
|
||||||
conf = defenv.Configure(custom_tests = { 'CheckBigEndian' : check_big_endian })
|
conf = defenv.Configure(custom_tests = { 'CheckBigEndian' : check_big_endian })
|
||||||
if conf.CheckBigEndian():
|
if conf.CheckBigEndian():
|
||||||
makensis_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
|
makensis_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
|
||||||
|
test_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
||||||
### return
|
### return
|
||||||
|
|
||||||
Return('stub_env makensis_env plugin_env util_env cp_util_env')
|
Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
|
||||||
|
|
|
@ -112,6 +112,10 @@ util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
cp_util_env = util_env.Copy()
|
cp_util_env = util_env.Copy()
|
||||||
|
|
||||||
|
### test environment
|
||||||
|
|
||||||
|
test_env = defenv.Copy()
|
||||||
|
|
||||||
# return
|
# return
|
||||||
|
|
||||||
Return('stub_env makensis_env plugin_env util_env cp_util_env')
|
Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
|
||||||
|
|
13
SConstruct
13
SConstruct
|
@ -281,6 +281,7 @@ makensis_env = envs[1]
|
||||||
plugin_env = envs[2]
|
plugin_env = envs[2]
|
||||||
util_env = envs[3]
|
util_env = envs[3]
|
||||||
cp_util_env = envs[4]
|
cp_util_env = envs[4]
|
||||||
|
test_env = envs[5]
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
####### Distribution ###
|
####### Distribution ###
|
||||||
|
@ -566,7 +567,7 @@ for i in misc:
|
||||||
# test code
|
# test code
|
||||||
|
|
||||||
build_dir = '$BUILD_PREFIX/tests'
|
build_dir = '$BUILD_PREFIX/tests'
|
||||||
exports = {'env' : defenv.Copy()}
|
exports = {'env' : test_env.Copy()}
|
||||||
|
|
||||||
defenv.SConscript(
|
defenv.SConscript(
|
||||||
dirs = 'Source/Tests',
|
dirs = 'Source/Tests',
|
||||||
|
@ -579,9 +580,9 @@ defenv.Ignore('$BUILD_PREFIX', '$BUILD_PREFIX/tests')
|
||||||
|
|
||||||
# test scripts
|
# test scripts
|
||||||
|
|
||||||
test_env = defenv.Copy(ENV = os.environ) # env needed for some scripts
|
test_scripts_env = defenv.Copy(ENV = os.environ) # env needed for some scripts
|
||||||
test_env['ENV']['NSISDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
test_scripts_env['ENV']['NSISDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
||||||
test_env['ENV']['NSISCONFDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
test_scripts_env['ENV']['NSISCONFDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
||||||
|
|
||||||
def test_scripts(target, source, env):
|
def test_scripts(target, source, env):
|
||||||
from os import walk, sep
|
from os import walk, sep
|
||||||
|
@ -600,8 +601,8 @@ def test_scripts(target, source, env):
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
test = test_env.Command('test-scripts.log', '$TESTDISTDIR', test_scripts)
|
test = test_scripts_env.Command('test-scripts.log', '$TESTDISTDIR', test_scripts)
|
||||||
test_env.Alias('test-scripts', test)
|
test_scripts_env.Alias('test-scripts', test)
|
||||||
|
|
||||||
# test all
|
# test all
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue