-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check the packaging of slurm-sql for regression of #155
- Loading branch information
1 parent
37e0c33
commit ba1c09d
Showing
5 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname "$0")" || exit 1 | ||
|
||
export BATS_JUNIT_CLASS=$TEST_DIR | ||
source ./common/TEST_ENV || exit 1 | ||
source ./common/functions || exit 1 | ||
|
||
|
||
for i in "$@"; do | ||
case $i in | ||
-c=*|--compiler=*) | ||
COMPILER_FAMILIES="${i#*=}" | ||
shift | ||
;; | ||
-m=*|--mpi=*) | ||
MPI_FAMILIES="${i#*=}" | ||
shift | ||
;; | ||
-t|--tap) | ||
BATS_OPTS="$BATS_OPTS -t" | ||
shift | ||
;; | ||
-x|--xml) | ||
BATS_OPTS="$BATS_OPTS -x" | ||
shift | ||
;; | ||
*) | ||
echo "$0: Unknown option - $*" | ||
# unknown option | ||
;; | ||
esac | ||
done | ||
|
||
echo " " | ||
echo " " | ||
echo "-------------------------------------------------------" | ||
echo "Packages: content tests" | ||
echo "-------------------------------------------------------" | ||
|
||
./slurm-sql $BATS_OPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!./common/bats/bin/bats | ||
# -*-sh-*- | ||
|
||
load ./common/test_helper_functions || exit 1 | ||
source ./common/functions || exit 1 | ||
source ./common/TEST_ENV | ||
|
||
# $ID will be set to sles or centos | ||
source /etc/os-release | ||
|
||
containsElement () { | ||
local e | ||
for e in "${@:2}"; do [[ "$e" =~ "$1" ]] && return 0; done | ||
return 1 | ||
} | ||
|
||
@test "[$TEST_DIR] verify contents of slurm-sql exist" { | ||
if [ "x$ID" = "xcentos" ]; then | ||
# [root@master4-centos71 tests]# repoquery --list slurm-sql-ohpc | ||
# /usr/lib64/slurm | ||
# /usr/lib64/slurm/accounting_storage_mysql.so | ||
# /usr/lib64/slurm/jobcomp_mysql.so | ||
touch /tmp/drffasdd | ||
run bash -c "/bin/repoquery --list slurm-sql-ohpc 2>&1 | /bin/tee /tmp/pack-slurm-sql.$$" | ||
cat /tmp/pack-slurm-sql.$$ | ||
# [[ ${lines[1]} =~ "accounting_storage_mysql.so" ]] | ||
# [[ ${lines[2]} =~ "jobcomp_mysql.so" ]] | ||
containsElement "accounting_storage_mysql.so" "${lines[@]}" | ||
containsElement "jobcomp_mysql.so" "${lines[@]}" | ||
elif [ "x$ID" = "xsles" ]; then | ||
export XDG_CACHE_HOME="/tmp/cmt.$$" | ||
pushd /tmp && rm -rf cmt.$$ && popd | ||
# Fetch the files without installing: | ||
zypper download slurm-sql-ohpc | ||
# List the files in an uninstalled package: | ||
# /tmp/zypp/packages/ForestPeak_15.42_Factory/x86_64/slurm-sql-ohpc-15.08.7-4.1.x86_64.rpm | ||
run bash -c "rpm -qlp $XDG_CACHE_HOME/zypp/packages/*/x86_64/slurm-sql-*.rpm 2>&1 | /usr/bin/tee /tmp/pack-slurm-sql.$$" | ||
cat /tmp/pack-slurm-sql.$$ | ||
# [[ ${lines[1]} =~ "accounting_storage_mysql.so" ]] | ||
# [[ ${lines[2]} =~ "jobcomp_mysql.so" ]] | ||
containsElement "accounting_storage_mysql.so" "${lines[@]}" | ||
containsElement "jobcomp_mysql.so" "${lines[@]}" | ||
else | ||
flunk "test designed for centos or sles." | ||
fi | ||
} |