We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4421f80 commit 3832ff0Copy full SHA for 3832ff0
1 file changed
irods/test/scripts/test_support_functions
@@ -205,3 +205,19 @@ mtime_and_content()
205
stat -c%y "$1"
206
cat "$1"
207
}
208
+
209
+irods_server_version() {
210
+ python -c "import irods.helpers as h
211
+import operator,sys
212
+if len(sys.argv) == 1:
213
+ (comparison,relto)=('','')
214
+elif len(sys.argv) == 3:
215
+ (comparison,relto)=sys.argv[1:3]
216
+fm_tuple = lambda tup: '.'.join(str(_) for _ in tup)
217
+to_tuple = lambda vstr: tuple(int(_) for _ in vstr.split('.'))
218
+svt = h.make_session().server_version_without_auth()
219
+if relto:
220
+ exit(0 if vars(operator)[comparison](svt,to_tuple(relto)) else 1)
221
+print(fm_tuple(svt))
222
+" $1 $2
223
+}
0 commit comments