Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: leil-io/saunafs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ebbed7c74d750411862c59687edee1e461a10bad
Choose a base ref
..
head repository: leil-io/saunafs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7cf75a0f83ee6dd4a98fec958fecadd298c7b17d
Choose a head ref
Showing with 11 additions and 4 deletions.
  1. +2 −1 tests/ci_build/run-ganesha-tests.sh
  2. +2 −1 tests/ci_build/run-sanity-check.sh
  3. +7 −2 tests/saunafs-tests.cc
3 changes: 2 additions & 1 deletion tests/ci_build/run-ganesha-tests.sh
Original file line number Diff line number Diff line change
@@ -27,4 +27,5 @@ echo ": \${SAUNAFS_ROOT:=${SAUNAFS_ROOT}}" | sudo tee -a /etc/saunafs_tests.conf
sudo ln -sf ${SAUNAFS_ROOT}/lib/ganesha/libfsalsaunafs.so /usr/lib/ganesha/libfsalsaunafs.so
sudo mkdir -p /usr/lib/x86_64-linux-gnu/ganesha
sudo ln -sf ${SAUNAFS_ROOT}/lib/ganesha/libfsalsaunafs.so /usr/lib/x86_64-linux-gnu/ganesha/libfsalsaunafs.so
sudo "${SAUNAFS_ROOT}/bin/saunafs-tests" --gtest_color=yes --gtest_filter="${test_filter}" --gtest_output=xml:"${TEST_OUTPUT_DIR}/ganesha_test_results.xml"
export SFS_TEST_WORKSPACE="${WORKSPACE}"
sudo --preserve-env=SFS_TEST_WORKSPACE "${SAUNAFS_ROOT}/bin/saunafs-tests" --gtest_color=yes --gtest_filter="${test_filter}" --gtest_output=xml:"${TEST_OUTPUT_DIR}/ganesha_test_results.xml"
3 changes: 2 additions & 1 deletion tests/ci_build/run-sanity-check.sh
Original file line number Diff line number Diff line change
@@ -33,4 +33,5 @@ rm -rf /mnt/ramdisk/* || true
export PATH="${SAUNAFS_ROOT}/bin:${PATH}"
sudo sed -E -i '\,.*:\s+\$\{SAUNAFS_ROOT\s*:=.*,d' /etc/saunafs_tests.conf || true
echo ": \${SAUNAFS_ROOT:=${SAUNAFS_ROOT}}" | sudo tee -a /etc/saunafs_tests.conf >/dev/null || true
sudo "${SAUNAFS_ROOT}/bin/saunafs-tests" --gtest_color=yes --gtest_output=xml:"${TEST_OUTPUT_DIR}/sanity_test_results.xml" "${test_extra_args[@]}"
export SFS_TEST_WORKSPACE="${WORKSPACE}"
sudo --preserve-env=SFS_TEST_WORKSPACE "${SAUNAFS_ROOT}/bin/saunafs-tests" --gtest_color=yes --gtest_output=xml:"${TEST_OUTPUT_DIR}/sanity_test_results.xml" "${test_extra_args[@]}"
9 changes: 7 additions & 2 deletions tests/saunafs-tests.cc
Original file line number Diff line number Diff line change
@@ -74,8 +74,13 @@ const ::testing::Environment* gBashEnvironment = ::testing::AddGlobalTestEnviron
class BashTestingSuite : public testing::Test {
protected:
void run_test_case(std::string suite, std::string testCase) {
std::string runScript = TO_STRING(TEST_DATA_PATH) "/run-test.sh";
std::string testFile = TO_STRING(TEST_DATA_PATH) "/test_suites/" + suite + "/" + testCase + ".sh";
std::string testDataPath = TO_STRING(TEST_DATA_PATH);
std::string workspace = std::getenv("SFS_TEST_WORKSPACE");
if (!workspace.empty()) {
testDataPath = workspace + "/tests";
}
std::string runScript = testDataPath + "/run-test.sh";
std::string testFile = testDataPath + "/test_suites/" + suite + "/" + testCase + ".sh";
std::string errorFile = testErrFilePath();
std::string environment = "ERROR_FILE=" + errorFile;
environment += " TEST_SUITE_NAME=" + suite;