import lit.util
import os.path

if lit.util.which('dotnet') == None:
  lit_config.note('dotnet is unavailable, so cross-compilation tests are skipped\n')
  config.unsupported = True
if lit.util.which('node') == None:
  lit_config.note('node is unavailable, so cross-compilation tests are skipped\n')
  config.unsupported = True
if lit.util.which('java') == None:
  lit_config.note('java is unavailable, so cross-compilation tests are skipped\n')
  config.unsupported = True
if lit.util.which('g++') == None:
  lit_config.note('g++ is unavailable, so cross-compilation tests are skipped\n')
  config.unsupported = True

binaryDir = config.dafnyBinaryDir
current_dir = os.path.join(config.test_source_root, 'comp', 'compile1quiet')

config.environment['CLASSPATH'] = os.path.join(current_dir, 'CompileRunQuietly-java') + ":" + os.path.join( binaryDir, "DafnyRuntime.jar" )
