From 465546ee089db3eba44f68390984de9c9f60ccb7 Mon Sep 17 00:00:00 2001 From: Matthew Rasmus Date: Thu, 20 Nov 2014 11:10:47 -0800 Subject: Rebuild after ./mach test-unit (ugly) workaround for issue #3928 --- python/servo/testing_commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 05242f7af5b..74c4b6b4751 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -74,6 +74,16 @@ class MachCommands(CommandBase): for component in os.listdir("components"): ret = ret or cargo_test(component) + # XXX This is a workaround for issue #3928. For some reason, when + # cargo test is run, ./target/servo is deleted- breaking all subsequent + # tests if run with ./mach test (not to mention breaking ./mach run + # until you rebuild again). I would hope that there's a better solution + # to this (backing up the file before and moving it back after? some + # sort of cargo configuration?) but this is quick and easy for now. + print("Rebuilding servo...") + self.context.built_tests = False + self.ensure_built_tests() + return ret @Command('test-ref', -- cgit v1.2.3 From f69dfc53cb4870b153c3e8c5d72fe1f3a4552385 Mon Sep 17 00:00:00 2001 From: Matthew Rasmus Date: Thu, 4 Dec 2014 14:05:46 -0800 Subject: Moved unit tests to the end of `./mach test` --- python/servo/testing_commands.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 74c4b6b4751..57f48fced0b 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -47,7 +47,7 @@ class MachCommands(CommandBase): category='testing') def test(self): test_start = time() - for t in ["tidy", "unit", "ref", "content", "wpt"]: + for t in ["tidy", "ref", "content", "wpt", "unit"]: Registrar.dispatch("test-%s" % t, context=self.context) elapsed = time() - test_start @@ -74,16 +74,9 @@ class MachCommands(CommandBase): for component in os.listdir("components"): ret = ret or cargo_test(component) - # XXX This is a workaround for issue #3928. For some reason, when - # cargo test is run, ./target/servo is deleted- breaking all subsequent - # tests if run with ./mach test (not to mention breaking ./mach run - # until you rebuild again). I would hope that there's a better solution - # to this (backing up the file before and moving it back after? some - # sort of cargo configuration?) but this is quick and easy for now. - print("Rebuilding servo...") - self.context.built_tests = False - self.ensure_built_tests() - + print("WARNING: test-unit has probably destroyed your servo binary " + " (see https://github.com/rust-lang/cargo/issues/961 ). You " + " may want to rebuild now.") return ret @Command('test-ref', -- cgit v1.2.3