-
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
remove debug statement add LICENSE to packaging tests
- Loading branch information
1 parent
437a22e
commit 27d98c0
Showing
6 changed files
with
127 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,24 @@ | ||
Copyright (c) 2015, Intel Corporation | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of Intel Corporation nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,45 @@ | ||
#!./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 | ||
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 | ||
} |