1 # Copyright 2013 The Swarming Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 that
3 # can be found in the LICENSE file.
9 TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
10 sys.path.insert(0, os.path.dirname(TESTS_DIR))
15 def check_can_trace(fn):
16 """Function decorator that skips test that need to be able trace."""
18 def hook(self, *args, **kwargs):
19 if not trace_inputs.can_trace():
20 self.fail('Please rerun this test with admin privileges.')
21 return fn(self, *args, **kwargs)