]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Invoke ftests.sh in Makefile.am
authorTom Hromatka <tom.hromatka@oracle.com>
Thu, 17 Dec 2020 14:59:52 +0000 (07:59 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 17 Dec 2020 15:37:17 +0000 (08:37 -0700)
Invoke a wrapper script, ftests.sh, in the TESTS target
within Makefile.am.  This provides two advantages:
1. When new tests are added, Makefile.am does not need
   to be updated
2. This adds verbose logging to the continuous integration
   suite

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/Makefile.am
ftests/ftests.py
ftests/ftests.sh [new file with mode: 0755]

index b4b54a9b425c9fe65214ea9947721db6059f5534..52cf79203534c29b26374a0a71179d5ac7f012ed 100644 (file)
@@ -1,7 +1,7 @@
 #
 # libcgroup functional tests Makefile.am
 #
-# Copyright (c) 2019 Oracle and/or its affiliates.  All rights reserved.
+# Copyright (c) 2019-2020 Oracle and/or its affiliates.
 # Author: Tom Hromatka <tom.hromatka@oracle.com>
 #
 
 # along with this library; if not, see <http://www.gnu.org/licenses>.
 #
 
-TESTS = 001-cgget-basic_cgget_v1.py \
-       002-cgdelete-recursive_delete.py \
-       003-cgget-basic_cgget_v2.py
+TESTS = ftests.sh
 
-EXTRA_DIST = *.py README.md default.conf
+EXTRA_DIST = *.py README.md default.conf ftests.sh
 
 clean-local: clean-local-check
 .PHONY: clean-local-check
index 6ac5ba70966752b9f2d298eb3dbc07c95ef79eff..fad462d4115ba815e40ca497189f27968149793a 100755 (executable)
@@ -304,10 +304,10 @@ def main(config):
 
     if failed_cnt > 0:
         return failed_cnt
-    if skipped_cnt > 0:
-        return AUTOMAKE_SKIPPED
     if passed_cnt > 0:
         return AUTOMAKE_PASSED
+    if skipped_cnt > 0:
+        return AUTOMAKE_SKIPPED
 
     return AUTOMAKE_HARD_ERROR
 
diff --git a/ftests/ftests.sh b/ftests/ftests.sh
new file mode 100755 (executable)
index 0000000..ce754fb
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+./ftests.py -l 10 -L ftests.log