Commit a592b1d9 authored by John Zhang's avatar John Zhang

fixed path problem

parent 7fb9134b
...@@ -26,14 +26,14 @@ test:cargo: ...@@ -26,14 +26,14 @@ test:cargo:
testjit:milestones: testjit:milestones:
script: script:
- cd tests/test_jit - cd tests/test_jit
- MU_RUST=$CI_PROJ_DIR pytest test_milestones.py - RUST_BACKTRACE=1 pytest test_milestones.py
testjit:binops: testjit:binops:
script: script:
- cd tests/test_jit - cd tests/test_jit
- MU_RUST=$CI_PROJ_DIR pytest test_binops.py - RUST_BACKTRACE=1 pytest test_binops.py
testjit:cmpops: testjit:cmpops:
script: script:
- cd tests/test_jit - cd tests/test_jit
- MU_RUST=$CI_PROJ_DIR pytest test_cmpops.py - RUST_BACKTRACE=1 pytest test_cmpops.py
...@@ -7,24 +7,22 @@ import ctypes ...@@ -7,24 +7,22 @@ import ctypes
import py import py
CC = 'clang' CC = 'clang'
MU_RUST = os.environ["MU_RUST"] proj_dir = py.path.local(__file__).join('..', '..', '..')
CFLAGS = [ test_jit_dir = proj_dir.join('tests', 'test_jit')
"-std=c99", testsuite_dir = test_jit_dir.join('suite')
"-I%(MU_RUST)s/src/vm/api" % globals(), bin_dir = test_jit_dir.join('temp')
"-L%(MU_RUST)s/target/debug" % globals(), if not bin_dir.exists():
"-lmu", bin_dir.mkdir()
]
os.environ['RUST_BACKTRACE'] = '1'
testsuite_dir = py.path.local('suite')
def compile_lib(testname): def compile_lib(testname):
src_c = testsuite_dir.join(testname + '.c') src_c = testsuite_dir.join(testname + '.c')
bin_dir = py.path.local('temp')
if not bin_dir.exists():
bin_dir.mkdir()
bin_path = bin_dir.join(testname) bin_path = bin_dir.join(testname)
CFLAGS = [
"-std=c99",
"-I%(proj_dir)s/src/vm/api" % globals(),
"-L%(proj_dir)s/target/debug" % globals(),
"-lmu",
]
cmd = [CC] + CFLAGS + ['-o', str(bin_path)] + [str(src_c)] cmd = [CC] + CFLAGS + ['-o', str(bin_path)] + [str(src_c)]
# compile # compile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment