From 465546ee089db3eba44f68390984de9c9f60ccb7 Mon Sep 17 00:00:00 2001 From: Matthew Rasmus Date: Thu, 20 Nov 2014 11:10:47 -0800 Subject: [PATCH] Rebuild after ./mach test-unit (ugly) workaround for issue #3928 --- python/servo/testing_commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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',