mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix running cargo test -p stylo_test
from repo root
… in order to add it to Rust CI though https://github.com/rust-lang/rust/blob/master/src/tools/cargotest/main.rs
This commit is contained in:
parent
89d5780570
commit
fc5fd8853e
1 changed files with 5 additions and 3 deletions
|
@ -550,7 +550,8 @@ mod bindings {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate_atoms() {
|
fn generate_atoms() {
|
||||||
let script = Path::new(file!()).parent().unwrap().join("gecko").join("regen_atoms.py");
|
let script = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap())
|
||||||
|
.join("gecko").join("regen_atoms.py");
|
||||||
println!("cargo:rerun-if-changed={}", script.display());
|
println!("cargo:rerun-if-changed={}", script.display());
|
||||||
let status = Command::new(&*PYTHON)
|
let status = Command::new(&*PYTHON)
|
||||||
.arg(&script)
|
.arg(&script)
|
||||||
|
@ -596,11 +597,12 @@ mod bindings {
|
||||||
|
|
||||||
#[cfg(not(feature = "bindgen"))]
|
#[cfg(not(feature = "bindgen"))]
|
||||||
mod bindings {
|
mod bindings {
|
||||||
use std::path::Path;
|
use std::env;
|
||||||
|
use std::path::PathBuf;
|
||||||
use super::common::*;
|
use super::common::*;
|
||||||
|
|
||||||
pub fn generate() {
|
pub fn generate() {
|
||||||
let dir = Path::new(file!()).parent().unwrap().join("gecko/generated");
|
let dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("gecko/generated");
|
||||||
println!("cargo:rerun-if-changed={}", dir.display());
|
println!("cargo:rerun-if-changed={}", dir.display());
|
||||||
copy_dir(&dir, &*OUTDIR_PATH, |path| {
|
copy_dir(&dir, &*OUTDIR_PATH, |path| {
|
||||||
println!("cargo:rerun-if-changed={}", path.display());
|
println!("cargo:rerun-if-changed={}", path.display());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue