Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: scripts/slave/unittests/annotated_run_test.py

Issue 1347273002: RELAND of Cross-repo recipe package system. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: Here's how it got fixed Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/unittests/annotated_run_test.py
diff --git a/scripts/slave/unittests/annotated_run_test.py b/scripts/slave/unittests/annotated_run_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..79c0cb305a038f20eb1980866c67902ca7a660b6
--- /dev/null
+++ b/scripts/slave/unittests/annotated_run_test.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Tests that the tools/build annotated_run wrapper actually runs."""
+
+import json
+import os
+import subprocess
+import unittest
+
+BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+
+class AnnotatedRunTest(unittest.TestCase):
+ def test_example(self):
+ properties = {
+ 'recipe': 'annotated_run_test',
+ 'true_prop': True,
+ 'num_prop': 123,
+ 'string_prop': '321',
+ 'dict_prop': {'foo': 'bar'},
+ }
+
+ script_path = os.path.join(BASE_DIR, 'annotated_run.py')
+ exit_code = subprocess.call([
+ 'python', script_path,
+ '--factory-properties=%s' % json.dumps(properties)])
+ self.assertEqual(exit_code, 0)
+
+if __name__ == '__main__':
+ unittest.main()

Powered by Google App Engine
This is Rietveld 408576698