aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-02 19:27:51 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-02 19:27:51 -0700
commit873ca6cadddc1a40bead1f5dd0128bb16cfaa11b (patch)
treee9a1c8b6dc056448fea6d52229e54817b97d14d2 /tests
parentb2b6d4d0d1e381d038dc5e45cbe74304704934e7 (diff)
parente1c2210c23e2e5f7a24901618698c090279092ee (diff)
downloadservo-873ca6cadddc1a40bead1f5dd0128bb16cfaa11b.tar.gz
servo-873ca6cadddc1a40bead1f5dd0128bb16cfaa11b.zip
auto merge of #4140 : SimonSapin/servo/no-root-cargo-toml, r=SimonSapin
This fixes #3957, and allow #4115 not to regress #4099.
Diffstat (limited to 'tests')
-rw-r--r--tests/contenttest.rs2
-rw-r--r--tests/reftest.rs5
-rwxr-xr-xtests/wpt/run.sh16
3 files changed, 12 insertions, 11 deletions
diff --git a/tests/contenttest.rs b/tests/contenttest.rs
index d166934a82f..438f8b5fccf 100644
--- a/tests/contenttest.rs
+++ b/tests/contenttest.rs
@@ -99,7 +99,7 @@ fn run_test(file: String) {
let stderr = InheritFd(2);
let args = ["-z", "-f", infile.as_slice()];
- let mut prc = match Command::new("target/servo")
+ let mut prc = match Command::new(os::self_exe_path().unwrap().join("servo"))
.args(args)
.stdin(Ignored)
.stdout(stdout)
diff --git a/tests/reftest.rs b/tests/reftest.rs
index af186eeffa2..85a4d9c7b56 100644
--- a/tests/reftest.rs
+++ b/tests/reftest.rs
@@ -112,7 +112,8 @@ fn run(test_opts: TestOpts, all_tests: Vec<TestDescAndFn>,
// Verify that we're passing in valid servo arguments. Otherwise, servo
// will exit before we've run any tests, and it will appear to us as if
// all the tests are failing.
- let mut command = match Command::new("target/servo").args(servo_args.as_slice()).spawn() {
+ let mut command = match Command::new(os::self_exe_path().unwrap().join("servo"))
+ .args(servo_args.as_slice()).spawn() {
Ok(p) => p,
Err(e) => panic!("failed to execute process: {}", e),
};
@@ -248,7 +249,7 @@ fn make_test(reftest: Reftest) -> TestDescAndFn {
fn capture(reftest: &Reftest, side: uint) -> (u32, u32, Vec<u8>) {
let png_filename = format!("/tmp/servo-reftest-{:06u}-{:u}.png", reftest.id, side);
- let mut command = Command::new("target/servo");
+ let mut command = Command::new(os::self_exe_path().unwrap().join("servo"));
command
.args(reftest.servo_args.as_slice())
// Allows pixel perfect rendering of Ahem font for reftests.
diff --git a/tests/wpt/run.sh b/tests/wpt/run.sh
index ed06092c5c0..d238a16f985 100755
--- a/tests/wpt/run.sh
+++ b/tests/wpt/run.sh
@@ -4,22 +4,22 @@
set -e
-servo_root=$(pwd)
+wpt_root=$(dirname $0)
PYTHON=$(which python2 2> /dev/null || echo python)
VIRTUALENV=$(which virtualenv2 2> /dev/null || echo virtualenv)
-test -d _virtualenv || $VIRTUALENV _virtualenv -p $PYTHON
-test -d $servo_root/tests/wpt/metadata || mkdir -p $servo_root/tests/wpt/metadata
-test -d $servo_root/tests/wpt/prefs || mkdir -p $servo_root/tests/wpt/prefs
-source _virtualenv/bin/activate
+test -d $wpt_root/_virtualenv || $VIRTUALENV $wpt_root/_virtualenv -p $PYTHON
+test -d $wpt_root/metadata || mkdir -p $wpt_root/metadata
+test -d $wpt_root/prefs || mkdir -p $wpt_root/prefs
+source $wpt_root/_virtualenv/bin/activate
if [[ $* == *--update-manifest* ]]; then
(python -c "import html5lib" &>/dev/null) || pip install html5lib
fi
(python -c "import wptrunner" &>/dev/null) || pip install 'wptrunner==1.7'
-python $servo_root/tests/wpt/run.py \
- --config $servo_root/tests/wpt/config.ini \
- --binary target/servo \
+python $wpt_root/run.py \
+ --config $wpt_root/config.ini \
+ --binary $wpt_root/../../components/servo/target/servo \
--log-mach - \
"$@"