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

Fix clang test #288

Merged
merged 1 commit into from
Jan 24, 2025
Merged
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
24 changes: 10 additions & 14 deletions tests/test_suites/LongSystemTests/test_build_saunafs_using_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@ timeout_set 20 minutes
assert_program_installed git
assert_program_installed cmake
assert_program_installed make
assert_program_installed clang
assert_program_installed clang++-19

MINIMUM_PARALLEL_JOBS=4
MAXIMUM_PARALLEL_JOBS=16
PARALLEL_JOBS=$(get_nproc_clamped_between ${MINIMUM_PARALLEL_JOBS} ${MAXIMUM_PARALLEL_JOBS})

# Clone the repository
git clone --branch dev https://github.com/leil-io/saunafs.git "${TEMP_DIR}/saunafs"
# Change to SOURCE_DIR
cp -r "${SOURCE_DIR}" "${TEMP_DIR}"
cd "${TEMP_DIR}/${SOURCE_DIR}"

# Change to the temporary directory
cd "${TEMP_DIR}/saunafs"
BUILD_DIR=$(mktemp -d)
chmod 744 "${BUILD_DIR}"

# Check if the feature branch exists and check it out if it does
feature_branch="build-saunafs-using-clang"
if git ls-remote --heads origin "${feature_branch}" | \
grep -q "${feature_branch}"; then
git checkout "${feature_branch}"
fi

assert_success cmake -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo \
assert_success cmake -B "${BUILD_DIR}" -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++-19 \
-DENABLE_TESTS=ON -DENABLE_NFS_GANESHA=ON -DENABLE_CLIENT_LIB=ON
assert_success make -C ./build -j${PARALLEL_JOBS}
assert_success cmake --build "${BUILD_DIR}" -j"${PARALLEL_JOBS}"

rm -rf "${BUILD_DIR}"
Loading