tools_unittest.py 608 B

1234567891011121314151617
  1. #!/usr/bin/env python
  2. # Copyright 2016 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """Run tools/ unittests."""
  6. import sys
  7. import unittest
  8. if __name__ == '__main__':
  9. # jar/java/javac aren't typically installed on Windows so these tests don't
  10. # work and give many verbose and cryptic failure messages.
  11. if sys.platform == 'win32':
  12. sys.exit(0)
  13. suite = unittest.TestLoader().discover('tools', pattern = "*_unittest.py")
  14. sys.exit(0 if unittest.TextTestRunner().run(suite).wasSuccessful() else 1)