Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/test.py b/test.py
new file mode 100644
index 0000000..dee7157
--- /dev/null
+++ b/test.py
@@ -0,0 +1,28 @@
+# Copyright 2023 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Sets up Monorail's test environment and runs tests."""
+
+import os
+import sys
+
+import pytest
+
+# gae_ts_mon's __init__.py does some import magic to create an infra_libs
+# package, so we need to import it before importing Monorail packages.
+import gae_ts_mon
+
+import import_utils
+
+if __name__ == '__main__':
+ os.environ['GAE_RUNTIME'] = 'python3'
+ os.environ['GAE_APPLICATION'] = 'testing-app'
+ os.environ['SERVER_SOFTWARE'] = 'test'
+
+ import_utils.FixImports()
+
+ args = ['-Werror']
+ args += ['--ignore', 'components']
+ args += ['--ignore', 'gae_ts_mon']
+ args += ['--reruns', '2']
+ sys.exit(pytest.main(args + sys.argv[1:]))