1#!/usr/bin/python
2# Copyright (c) 2012 The Native Client 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
6"""Run all python tests in this directory."""
7
8import sys
9import unittest
10
11MODULES = [
12    'directory_storage_test',
13    'gsd_storage_test',
14    'hashing_tools_test',
15    'local_storage_cache_test',
16]
17
18# We use absolute imports for Py3 compatibility.
19# This means for imports to resolve when testing we need to add the pynacl
20# directory to the module search path.
21sys.path.insert(0, './')
22
23suite = unittest.TestLoader().loadTestsFromNames(MODULES)
24result = unittest.TextTestRunner(verbosity=2).run(suite)
25if result.wasSuccessful():
26  sys.exit(0)
27else:
28  sys.exit(1)
29