Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: move PKG-specific variables out of the testconfig generating … #5802

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion utils/docker/prepare-for-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ fi
# should be preserved
KEEP_TEST_CONFIG=${KEEP_TEST_CONFIG:-0}
if [[ "$KEEP_TEST_CONFIG" == 0 ]]; then
./configure-tests.sh $@
./configure-tests.sh
fi
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