GitLab will continue to be upgraded from 11.4.5-ce.0 on November 25th 2019 at 4.00pm (AEDT) to 5.00pm (AEDT) due to Critical Security Patch Availability. During the update, GitLab and Mattermost services will not be available.

Commit b76c216c authored by qinsoon's avatar qinsoon

compile_run_c_test needs to be aware of which build to use

parent 901f3aca
Pipeline #483 failed with stages
in 52 minutes and 13 seconds
......@@ -16,4 +16,5 @@ Cargo.lock
.gitignore
cmake-build-debug/*
Notes/*
CMakeLists.txt
\ No newline at end of file
CMakeLists.txt
*.iml
<?xml version="1.0" encoding="UTF-8"?>
<module type="RUST_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="" />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/benches" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Rust &lt;mu&gt;" level="project" />
<orderEntry type="library" name="Cargo &lt;mu&gt;" level="project" />
</component>
</module>
\ No newline at end of file
......@@ -6,6 +6,8 @@ use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
use std::env;
pub fn compile_run_c_test(test_file_path: &'static str) -> PathBuf {
let mut src = Path::new("tests/test_jit").to_path_buf();
src.push(test_file_path);
......@@ -25,7 +27,13 @@ pub fn compile_run_c_test(test_file_path: &'static str) -> PathBuf {
let mut cc = Command::new(get_test_clang_path());
cc.arg("-std=c99");
cc.arg("-Isrc/vm/api");
cc.arg("-Ltarget/debug");
let build = match env::var("ZEBU_BUILD") {
Ok(val) => val,
Err(_) => "debug".to_string()
};
cc.arg(format!("-Ltarget/{}", build));
cc.arg("-lmu");
// src
cc.arg(src.as_os_str());
......
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