]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Use a random container name
authorTom Hromatka <tom.hromatka@oracle.com>
Thu, 24 Mar 2022 14:50:01 +0000 (08:50 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 1 Apr 2022 14:01:51 +0000 (08:01 -0600)
Now that we are running github actions against both the
libcgroup and libcgroup-tests repos, it's possible that
collisions can occur when both repos are running their
actions.  (Prior to this commit, the default container
name, TestLibcg, was being used for both repos.)

Use bash's $RANDOM command to generate a random container
name for each run.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
ftests/ftests-nocontainer.sh
ftests/ftests.sh

index 975ccc34d67d47497bb434f545329c9717aca67a..6ac4bdca15a99b90535f7992a57a2e81ec8a4961 100755 (executable)
@@ -14,7 +14,8 @@ if [ -d ../../src/python/build/lib.* ]; then
        popd
 fi
 
-./ftests.py -l 10 -L "$START_DIR/ftests-nocontainer.py.log" --no-container
+./ftests.py -l 10 -L "$START_DIR/ftests-nocontainer.py.log" --no-container \
+       -n Libcg"$RANDOM"
 RET=$?
 
 if [ "$START_DIR" != "$SCRIPT_DIR" ]; then
index f9a425465596302e630a1fb0ed3644966759449a..25b0ca205545dbc197ef4ad966b1449720d199f4 100755 (executable)
@@ -14,7 +14,7 @@ if [ -d ../../src/python/build/lib.* ]; then
        popd
 fi
 
-./ftests.py -l 10 -L "$START_DIR/ftests.py.log"
+./ftests.py -l 10 -L "$START_DIR/ftests.py.log" -n Libcg"$RANDOM"
 RET=$?
 
 if [ "$START_DIR" != "$SCRIPT_DIR" ]; then