Skip to content

Commit

Permalink
common: move PKG-specific variables out of the testconfig generating …
Browse files Browse the repository at this point in the history
…script

Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Jul 14, 2023
1 parent 8f1c1e0 commit 925de71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
13 changes: 1 addition & 12 deletions utils/docker/configure-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,8 @@ ENABLE_SUDO_TESTS=y
TM=1
EOF

if [[ "${1}" == "PKG" ]]; then
#Append variables exclusively for PKG tests:
if [ $OS = opensuse/leap ] || [ $OS = rockylinux/rockylinux ]; then
echo "PMDK_LIB_PATH_NONDEBUG=/usr/lib64" >> $WORKDIR/src/test/testconfig.sh
echo "PMDK_LIB_PATH_DEBUG=/usr/lib64/pmdk_debug" >> $WORKDIR/src/test/testconfig.sh
elif [ $OS = ubuntu ]; then
echo "PMDK_LIB_PATH_NONDEBUG=/lib/x86_64-linux-gnu" >> $WORKDIR/src/test/testconfig.sh
echo "PMDK_LIB_PATH_DEBUG=/lib/x86_64-linux-gnu/pmdk_dbg" >> $WORKDIR/src/test/testconfig.sh
fi
fi

# Configure python tests
cat << EOF >> $WORKDIR/src/test/testconfig.py
cat << EOF > $WORKDIR/src/test/testconfig.py
config = {
'unittest_log_level': 1,
'cacheline_fs_dir': '/tmp',
Expand Down
18 changes: 17 additions & 1 deletion utils/docker/run-build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,23 @@ make -j$(nproc)

# Prepare test config once more. Now, with path to PMDK set in the OS
# (rather than in the git tree) - for testing packages installed in the system.
$SCRIPTSDIR/configure-tests.sh PKG
$SCRIPTSDIR/configure-tests.sh

# Append variables exclusively for PKG tests
case "$OS" in
"opensuse/leap" | "rockylinux/rockylinux")
PMDK_LIB_PATH_NONDEBUG=/usr/lib64
;;
"ubuntu")
PMDK_LIB_PATH_NONDEBUG=/lib/x86_64-linux-gnu
;;
esac

cat << EOF >> $WORKDIR/src/test/testconfig.sh
PMDK_LIB_PATH_NONDEBUG=$PMDK_LIB_PATH_NONDEBUG
PMDK_LIB_PATH_DEBUG=$PMDK_LIB_PATH_NONDEBUG/pmdk_debug
EOF

./RUNTESTS.sh -t check
popd

Expand Down

0 comments on commit 925de71

Please sign in to comment.