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"
#- apt-get install -yqq --no-install-recommends build-essential
# 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:
- 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
- RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo test test_runtime
testjit:milestones:
stage: test
script:
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo build
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_milestones.py
- RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py
testjit:binops:
stage: test
script:
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo build
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_binops.py
- RUST_BACKTRACE=1 pytest tests/test_jit/test_binops.py
testjit:cmpops:
stage: test
script:
- RUSTFLAGS=-Zincremental=target/incr-cache RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CC=clang cargo build
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_cmpops.py
- RUST_BACKTRACE=1 pytest tests/test_jit/test_cmpops.py
......@@ -6,6 +6,7 @@ build = "build.rs"
[lib]
crate-type = ["staticlib", "rlib", "dylib"]
doctest = false
[features]
default = ["aot"]
......@@ -30,4 +31,4 @@ memmap = "0.4.0"
memsec = "0.1.9"
rustc-serialize = "*"
time = "0.1.34"
maplit = "0.1.4"
\ No newline at end of file
maplit = "0.1.4"
......@@ -34,8 +34,7 @@ def compile_lib(testname):
raise subp.CalledProcessError(p.returncode, cmd)
# run
p = subp.Popen([str(bin_path)], stdout=subp.PIPE, stderr=subp.PIPE,
cwd=str(bin_dir), env=os.environ)
p = subp.Popen([str(bin_path)], stdout=subp.PIPE, stderr=subp.PIPE, env=os.environ)
out, err = p.communicate()
if p.returncode != 0: # failed
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