Commit c57c5334 authored by John Zhang's avatar John Zhang

configuring CI, separating build and test stage, and breaking up the tests

parent 8f1ed965
...@@ -18,25 +18,47 @@ image: "qinsoon/ubuntu-zebu-test:v0.1" ...@@ -18,25 +18,47 @@ image: "qinsoon/ubuntu-zebu-test:v0.1"
#- apt-get install -yqq --no-install-recommends build-essential #- apt-get install -yqq --no-install-recommends build-essential
# Use cargo to test the project # Use cargo to test the project
test:cargo: stages:
- build
- test
build_libmu:
stage: build
script:
- rustc --version && cargo --version # Print version info for debugging
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo test --no-run
test:cargo:api:
stage: test
script:
- RUST_BACKTRACE=1 CC=clang cargo test test_api
test:cargo:ir:
stage: test
script:
- RUST_BACKTRACE=1 CC=clang cargo test test_ir
test:cargo:compiler:
stage: test
script:
- RUST_BACKTRACE=1 CC=clang cargo test test_compiler
test:cargo:runtime:
stage: test
script: script:
- rustc --version && cargo --version # Print version info for debugging - RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo test test_runtime
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo test
testjit:milestones: testjit:milestones:
stage: test
script: script:
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo build - RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_milestones.py
testjit:binops: testjit:binops:
stage: test
script: script:
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo build - RUST_BACKTRACE=1 pytest tests/test_jit/test_binops.py
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_binops.py
testjit:cmpops: testjit:cmpops:
stage: test
script: script:
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo build - RUST_BACKTRACE=1 pytest tests/test_jit/test_cmpops.py
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_cmpops.py
...@@ -6,6 +6,7 @@ build = "build.rs" ...@@ -6,6 +6,7 @@ build = "build.rs"
[lib] [lib]
crate-type = ["staticlib", "rlib", "dylib"] crate-type = ["staticlib", "rlib", "dylib"]
doctest = false
[features] [features]
default = ["aot"] default = ["aot"]
...@@ -30,4 +31,4 @@ memmap = "0.4.0" ...@@ -30,4 +31,4 @@ memmap = "0.4.0"
memsec = "0.1.9" memsec = "0.1.9"
rustc-serialize = "*" rustc-serialize = "*"
time = "0.1.34" time = "0.1.34"
maplit = "0.1.4" maplit = "0.1.4"
\ No newline at end of file
...@@ -34,8 +34,7 @@ def compile_lib(testname): ...@@ -34,8 +34,7 @@ def compile_lib(testname):
raise subp.CalledProcessError(p.returncode, cmd) raise subp.CalledProcessError(p.returncode, cmd)
# run # run
p = subp.Popen([str(bin_path)], stdout=subp.PIPE, stderr=subp.PIPE, p = subp.Popen([str(bin_path)], stdout=subp.PIPE, stderr=subp.PIPE, env=os.environ)
cwd=str(bin_dir), env=os.environ)
out, err = p.communicate() out, err = p.communicate()
if p.returncode != 0: # failed if p.returncode != 0: # failed
sys.stdout.write(out + '\n') sys.stdout.write(out + '\n')
......
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