Trying to fix failures in build-mac tests

This commit is contained in:
Syrus Akbary 2018-12-28 13:59:55 +01:00
parent 1ba8ebb2b1
commit 2ee910416d
3 changed files with 5 additions and 9 deletions

View File

@ -91,6 +91,9 @@ jobs:
command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
make test
make lint
- run:

View File

@ -852,15 +852,6 @@ pub extern "C" fn ___syscall197(
0
}
// /// fcntl64
// pub extern "C" fn ___syscall221(_which: c_int, mut varargs: VarArgs, instance: &mut Instance) -> c_int {
// debug!("emscripten::___syscall221");
// let fd: i32 = varargs.get(instance);
// let cmd: i32 = varargs.get(instance);
// debug!("fd: {}, cmd: {}", fd, cmd);
// unsafe { fcntl(fd, cmd) }
// }
// getgid
pub extern "C" fn ___syscall201() -> gid_t {
debug!("emscripten::___syscall201 (getgid)");

View File

@ -43,6 +43,8 @@ fn read_file_contents(path: &PathBuf) -> Result<Vec<u8>, io::Error> {
let mut buffer: Vec<u8> = Vec::new();
let mut file = File::open(path)?;
file.read_to_end(&mut buffer)?;
// We force to close the file
drop(file);
Ok(buffer)
}