summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorShawn Hymel <hymelsr@vt.edu>2019-01-10 12:50:05 -0600
committerGitHub <noreply@github.com>2019-01-10 12:50:05 -0600
commitbbf77a7efb900a4051e038b9a5a0182cb76eb172 (patch)
treeb2b434b3b741474ed9fb6ac69f455b3ee9ab269e /tools
parent62ea1bd43e784114fbba8bd0816e3f6c80c18418 (diff)
parent07ae65dfc78d8ca476d55db68ccdaee0053a8442 (diff)
Merge branch 'master' into master
Diffstat (limited to 'tools')
-rwxr-xr-xtools/print_status.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/print_status.py b/tools/print_status.py
new file mode 100755
index 000000000..ed563fd68
--- /dev/null
+++ b/tools/print_status.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import sys
+if len(sys.argv) != 2:
+ print("""\
+Usage: print_status.py STATUS_FILENAME
+ STATUS_FILENAME contains one line with an integer status."""
+ )
+ sys.exit(1)
+with open(sys.argv[1], 'r') as status_in:
+ status = int(status_in.readline())
+
+print('{} with status {}'.format(
+ "\033[32msucceeded\033[0m" if status == 0 else "\033[31mfailed\033[0m",
+ status))