diff --git a/Client/Client.py b/Client/Client.py index 8f4a911..2962c7b 100644 --- a/Client/Client.py +++ b/Client/Client.py @@ -90,12 +90,12 @@ def getCompilationSettings(server): for compiler in compilers: # Compilers may require a specific version - if '>=' in compiler: command, version = compiler.split('>=') - else: command = compiler; version = (0, 0, 0) + if '>=' in compiler: compiler, version = compiler.split('>=') + else: compiler = compiler; version = (0, 0, 0) # Try to execute the compiler from the command line try: stdout, stderr = subprocess.Popen( - [command, '--version'], + [compiler, '--version'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, ).communicate() @@ -111,14 +111,14 @@ def getCompilationSettings(server): # Compiler was sufficient COMPILERS[engine] = { - 'command' : command, 'version' : match, + 'compiler' : compiler, 'version' : match, 'default' : compiler == compilers[0] }; break # Report each engine configuration we can build for for engine in [engine for engine in data.keys() if engine in COMPILERS]: - command, version = COMPILERS[engine]['command'], COMPILERS[engine]['version'] - print("Found {0} {1} for {2}".format(command, version, engine)) + compiler, version = COMPILERS[engine]['compiler'], COMPILERS[engine]['version'] + print("Found {0} {1} for {2}".format(compiler, version, engine)) # Report each engine configuration we cannot build for for engine in [engine for engine in data.keys() if engine not in COMPILERS]: @@ -195,13 +195,12 @@ def getEngine(data, engine): getAndUnzipFile(engine['source'], '{0}.zip'.format(engine['name']), 'tmp') pathway = pathjoin('tmp/{0}/'.format(unzipname), data['test']['build']['path']) - # Use base command and an EXE= hook - command = [data['test']['build']['command']] - command.append('EXE={0}'.format(engine['name'])) + # Basic make assumption and an EXE= hook + command = ['make', 'EXE={0}'.format(engine['name'])] # Use a CC= hook if we are using the non-default compiler if not COMPILERS[data['test']['engine']]['default']: - command.append('CC={0}'.format(COMPILERS[data['test']['engine']]['command'])) + command.append('CC={0}'.format(COMPILERS[data['test']['engine']]['compiler'])) # Add any other custom compilation options if we have them if data['test']['engine'] in CUSTOM_SETTINGS: diff --git a/OpenBench/config.py b/OpenBench/config.py index 4e7c42b..1951626 100644 --- a/OpenBench/config.py +++ b/OpenBench/config.py @@ -80,7 +80,7 @@ OPENBENCH_CONFIG = { 'proto' : 'uci', 'nps' : 1275000, - 'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['gcc'] }, + 'build' : { 'path' : '/src/', 'compilers' : ['gcc'] }, 'source' : 'https://github.com/AndyGrant/Ethereal', 'testmodes' : { @@ -95,7 +95,7 @@ OPENBENCH_CONFIG = { 'proto' : 'uci', 'nps' : 710000, - 'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['g++'] }, + 'build' : { 'path' : '/src/', 'compilers' : ['g++'] }, 'source' : 'https://github.com/jeffreyan11/uci-chess-engine', 'testmodes' : { @@ -110,7 +110,7 @@ OPENBENCH_CONFIG = { 'proto' : 'uci', 'nps' : 2675000, - 'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['gcc'] }, + 'build' : { 'path' : '/src/', 'compilers' : ['gcc'] }, 'source' : 'https://github.com/TerjeKir/weiss', 'testmodes' : { @@ -125,7 +125,7 @@ OPENBENCH_CONFIG = { 'proto' : 'uci', 'nps' : 1250000, - 'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['gcc', 'clang'] }, + 'build' : { 'path' : '/src/', 'compilers' : ['gcc', 'clang'] }, 'source' : 'https://github.com/lucasart/Demolito', 'testmodes' : { @@ -140,7 +140,7 @@ OPENBENCH_CONFIG = { 'proto' : 'uci', 'nps' : 1000000, - 'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['g++'] }, + 'build' : { 'path' : '/src/', 'compilers' : ['g++'] }, 'source' : 'https://github.com/Matthies/RubiChess', 'testmodes' : { @@ -155,7 +155,7 @@ OPENBENCH_CONFIG = { 'proto' : 'uci', 'nps' : 1000000, - 'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['cargo>=1.43.0'] }, + 'build' : { 'path' : '/src/', 'compilers' : ['cargo>=1.43.0'] }, 'source' : 'https://github.com/fabianvdW/FabChess', 'testmodes' : {