WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.2% of users enabled 2FA.

Commit b76c216c authored by qinsoon's avatar qinsoon
Browse files

compile_run_c_test needs to be aware of which build to use

parent 901f3aca
......@@ -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