Skip to content

Commit

Permalink
appveyor: remove ntl testing
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Apr 12, 2016
1 parent 5c2bd8e commit e35a32b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 31 deletions.
5 changes: 3 additions & 2 deletions appveyor.yml
Expand Up @@ -23,12 +23,13 @@ build_script:
- ps: >-
if ($env:COMPILER -eq "MSVC15") {
cd build.vc14\flint_config
python $pwd\flint_config.py --build-lib True
python $pwd\flint_config.py --build-lib True --build-tests False --build-profiles False
cd ..
msbuild.exe lib_flint/lib_flint.vcxproj /p:Configuration=Release /p:Platform=$env:PLATFORM /p:PlatformToolset=v140 /verbosity:minimal
copy lib_flint\$env:PLATFORM\Release\lib_flint.lib ..\lib\$env:PLATFORM\Release\lib_flint.lib
cd build_tests
python $pwd\build_tests.py
$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
python $pwd\build_tests.py --interfaces-tests False --platform $env:PLATFORM
cd ..\run_tests
python $pwd\run_tests.py
cd ..
Expand Down
59 changes: 40 additions & 19 deletions build.vc14/build_tests/build_tests.py
Expand Up @@ -18,12 +18,27 @@
from time import sleep

from _msvccompiler import MSVCCompiler


import argparse
parser = argparse.ArgumentParser(description='Build flint tests')

# for script debugging
debug = False
parser.add_argument('--debug', choices=["True", "False"], default="False")

# what to build
parser.add_argument('--platform', default="x64")
parser.add_argument('--configuration', default="Release")
parser.add_argument('--library-type', choices=["dll", "lib"], default="lib")
parser.add_argument('--interfaces-tests', choices=["True", "False"], default="True")

# add user choice
flib_type = 'single' # ('gc', 'reentrant', 'single')
args = parser.parse_args()

print(args)

debug = args.debug == "True"
intd = '\\%s\\%s\\' % (args.platform, args.configuration)
library_type = args.library_type
build_interfaces_tests = args.interfaces_tests == "True"

# The path to flint, solution and project directories
script_dir = dirname(__file__)
Expand Down Expand Up @@ -120,33 +135,39 @@ def find_src(path):
# export_symbols=None, debug=0, extra_preargs=None,
# extra_postargs=None, build_temp=None, target_lang=None):

intd = '\\x64\\Release\\'

cc = MSVCCompiler()
error_list = []
inc_dirs = [
'..\\',
'..\\..\\',
'..\\..\\..\\mpir\\' + library_type + intd,
'..\\..\\..\\mpfr\\' + library_type + intd,
'..\\..\\..\\pthreads\\' + library_type + intd
]
libs = [
'..\\..\\' + library_type + intd + library_type + '_flint',
'..\\..\\..\\mpir\\' + library_type + intd + 'mpir',
'..\\..\\..\\mpfr\\' + library_type + intd + 'mpfr',
'..\\..\\..\\pthreads\\' + library_type + intd + 'pthreads'
]
if (library_type == "lib"):
macros = [('PTW32_STATIC_LIB',1)]
else:
macros = [('PTW32_BUILD',1)]

for l2, fp in t:
fdn, fx = splitext(fp)
fd, fn = split(fdn)
if (not build_interfaces_tests and "interface" in fn):
continue
source = [join('..\\..\\', fp)]
inc_dirs = [
'..\\',
'..\\..\\',
'..\\..\\..\\mpir\\lib' + intd,
'..\\..\\..\\mpfr\\lib' + intd,
'..\\..\\..\\pthreads\\lib' + intd
]
libs = [
'..\\..\\lib' + intd + 'lib_flint',
'..\\..\\..\\mpir\\lib' + intd + 'mpir',
'..\\..\\..\\mpfr\\lib' + intd + 'mpfr',
'..\\..\\..\\pthreads\\lib' + intd + 'pthreads'
]
p = fd.rfind('test')
assert p >= 0
tmp_dir = 'test\\test'
outd = '..\\tests\\' + fd[:p] + intd
try:
obj = cc.compile(source, output_dir=tmp_dir, include_dirs=inc_dirs,macros=[('PTW32_STATIC_LIB',1)])
obj = cc.compile(source, output_dir=tmp_dir, include_dirs=inc_dirs,macros=macros)
cc.link("executable", obj, fn + '.exe', output_dir=outd, libraries=libs)
except:
error_list += [(l2, fp)]
Expand Down
20 changes: 10 additions & 10 deletions build.vc14/flint_config/flint_config.py
Expand Up @@ -22,25 +22,25 @@
parser = argparse.ArgumentParser(description='Configure flint msvc build')

# for script debugging
parser.add_argument('--debug', type=bool, default=False)
parser.add_argument('--debug', choices=["True", "False"], default="False")

# what to build
parser.add_argument('--build-lib', type=bool, default=False)
parser.add_argument('--build-dll', type=bool, default=False)
parser.add_argument('--build-tests', type=bool, default=True)
parser.add_argument('--build-profiles', type=bool, default=True)
parser.add_argument('--build-lib', choices=["True", "False"], default="False")
parser.add_argument('--build-dll', choices=["True", "False"], default="False")
parser.add_argument('--build-tests', choices=["True", "False"], default="True")
parser.add_argument('--build-profiles', choices=["True", "False"], default="True")

# add user choice
parser.add_argument('--flib-type', choices=('gc', 'reentrant', 'single'), default="single")

args = parser.parse_args()
print(args)

debug = args.debug
build_lib = args.build_lib
build_dll = args.build_dll
build_tests = args.build_tests
build_profiles = args.build_profiles
debug = args.debug == "True"
build_lib = args.build_lib == "True"
build_dll = args.build_dll == "True"
build_tests = args.build_tests == "True"
build_profiles = args.build_profiles == "True"

flib_type = args.flib_type

Expand Down

0 comments on commit e35a32b

Please sign in to comment.