fix: use appropriate cmd for dynamic lib generation

macos and linux require a different cmd
This commit is contained in:
youben11
2022-01-18 13:33:36 +01:00
committed by Ayoub Benaissa
parent b8cfaeb3f4
commit faa0abea3e
2 changed files with 9 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import os
import subprocess
import sys
import pytest
@@ -17,7 +18,8 @@ SOURCE_C_2 = f'{TEST_PATH}/main_return_0.c'
OUTPUT = f'{TEST_PATH}/output.mlir'
LIB = f'{TEST_PATH}/outlib'
LIB_STATIC = LIB + '.a'
LIB_DYNAMIC = LIB + '.so'
DYNAMIC_LIB_EXT = '.dylib' if sys.platform == 'darwin' else '.so'
LIB_DYNAMIC = LIB + DYNAMIC_LIB_EXT
LIBS = (LIB_STATIC, LIB_DYNAMIC)
assert_exists(SOURCE_1, SOURCE_2, SOURCE_C_1, SOURCE_C_2)