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

Side by Side Diff: tools/tests/skimage_self_test.py

Issue 15813016: Preparations for running skimage tool on bots. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Split off run.sh change. Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/tests/skimage/.gitignore ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Self-test for skimage. 6 # Self-test for skimage.
7 7
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 # Run skimage twice, first to create an expectations file, and then 43 # Run skimage twice, first to create an expectations file, and then
44 # comparing to it. 44 # comparing to it.
45 45
46 # Both commands will run the binary, reading from resources. 46 # Both commands will run the binary, reading from resources.
47 cmd_line = [skimage_binary] 47 cmd_line = [skimage_binary]
48 resources_dir = os.path.join(trunk_dir, 'resources') 48 resources_dir = os.path.join(trunk_dir, 'resources')
49 cmd_line.extend(["-r", resources_dir]) 49 cmd_line.extend(["-r", resources_dir])
50 50
51 # Create the expectations file 51 # Create the expectations file
52 results_dir = os.path.join(file_dir, "skimage") 52 results_file = os.path.join(file_dir, "skimage", "self_test_results.json")
53 create_expectations_cmd = cmd_line + ["--createExpectationsPath", 53 create_expectations_cmd = cmd_line + ["--createExpectationsPath",
54 results_dir] 54 results_file]
55 subprocess.check_call(create_expectations_cmd) 55 subprocess.check_call(create_expectations_cmd)
56 56
57 # Now read from the expectations file 57 # Now read from the expectations file
58 results_file = os.path.join(results_dir, "results.json")
59 check_expectations_cmd = cmd_line + ["--readExpectationsPath", 58 check_expectations_cmd = cmd_line + ["--readExpectationsPath",
60 results_file] 59 results_file]
61 subprocess.check_call(check_expectations_cmd) 60 subprocess.check_call(check_expectations_cmd)
62 print "Self tests succeeded!" 61 print "Self tests succeeded!"
63 62
64 if __name__ == "__main__": 63 if __name__ == "__main__":
65 main() 64 main()
OLDNEW
« no previous file with comments | « tools/tests/skimage/.gitignore ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698