summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-08-27 11:14:38 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-08-27 11:40:40 +0200
commitbc39ecc0385dd7e0cb9e1df84628e4c6dde34ab5 (patch)
tree4556b3f5f5898ef56316fc1612a04402b79903ef /test/buildtool/file_system
parent340f3478dc2bffe1a75496e5c120e88274fee698 (diff)
downloadjustbuild-bc39ecc0385dd7e0cb9e1df84628e4c6dde34ab5.tar.gz
Reformat code to comply with clang-format 18
... while keeping our .clang-format file.
Diffstat (limited to 'test/buildtool/file_system')
-rw-r--r--test/buildtool/file_system/file_root.test.cpp3
-rw-r--r--test/buildtool/file_system/file_system_manager.test.cpp67
-rw-r--r--test/buildtool/file_system/git_repo.test.cpp3
-rw-r--r--test/buildtool/file_system/git_tree.test.cpp3
-rw-r--r--test/buildtool/file_system/object_cas.test.cpp3
-rw-r--r--test/buildtool/file_system/resolve_symlinks_map.test.cpp3
6 files changed, 60 insertions, 22 deletions
diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp
index 8fbb0d95..67fd77f3 100644
--- a/test/buildtool/file_system/file_root.test.cpp
+++ b/test/buildtool/file_system/file_root.test.cpp
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "src/buildtool/file_system/file_root.hpp"
+
#include <atomic>
#include <cstdlib>
#include <filesystem>
@@ -21,7 +23,6 @@
#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_description.hpp"
-#include "src/buildtool/file_system/file_root.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "test/utils/container_matchers.hpp"
#include "test/utils/shell_quoting.hpp"
diff --git a/test/buildtool/file_system/file_system_manager.test.cpp b/test/buildtool/file_system/file_system_manager.test.cpp
index 05fef390..689dd9b1 100644
--- a/test/buildtool/file_system/file_system_manager.test.cpp
+++ b/test/buildtool/file_system/file_system_manager.test.cpp
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "src/buildtool/file_system/file_system_manager.hpp"
+
#include <algorithm>
#include <chrono>
#include <cstdlib>
@@ -23,7 +25,6 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/generators/catch_generators_all.hpp"
-#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_type.hpp"
#include "src/buildtool/logging/log_level.hpp"
#include "src/buildtool/logging/logger.hpp"
@@ -352,8 +353,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFile", "[file_system]") {
CHECK(content_from == content_to);
};
- SECTION("direct") { run_test(false); }
- SECTION("fd_less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd_less") {
+ run_test(true);
+ }
}
TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") {
@@ -381,8 +386,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") {
}
};
- SECTION("direct") { run_test(false); }
- SECTION("fd_less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd_less") {
+ run_test(true);
+ }
SECTION("direct with epoch") {
run_test.template operator()<true>(false);
}
@@ -415,8 +424,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") {
}
};
- SECTION("direct") { run_test(false); }
- SECTION("fd_less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd_less") {
+ run_test(true);
+ }
SECTION("direct with epoch") {
run_test.template operator()<true>(false);
}
@@ -447,8 +460,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") {
}
};
- SECTION("direct") { run_test(false); }
- SECTION("fd_less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd_less") {
+ run_test(true);
+ }
SECTION("direct with epoch") {
run_test.template operator()<true>(false);
}
@@ -480,8 +497,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") {
}
};
- SECTION("direct") { run_test(false); }
- SECTION("fd_less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd_less") {
+ run_test(true);
+ }
SECTION("direct with epoch") {
run_test.template operator()<true>(false);
}
@@ -535,8 +556,12 @@ TEST_CASE_METHOD(WriteFileFixture, "WriteFile", "[file_system]") {
CHECK(written_content == content);
};
- SECTION("direct") { run_test(false); }
- SECTION("fd-less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd-less") {
+ run_test(true);
+ }
}
TEST_CASE_METHOD(WriteFileFixture, "WriteFileAs", "[file_system]") {
@@ -562,8 +587,12 @@ TEST_CASE_METHOD(WriteFileFixture, "WriteFileAs", "[file_system]") {
}
};
- SECTION("direct") { run_test(false); }
- SECTION("fd-less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd-less") {
+ run_test(true);
+ }
SECTION("direct with epoch") {
run_test.template operator()<true>(false);
}
@@ -592,8 +621,12 @@ TEST_CASE_METHOD(WriteFileFixture, "WriteFileAs", "[file_system]") {
}
};
- SECTION("direct") { run_test(false); }
- SECTION("fd-less") { run_test(true); }
+ SECTION("direct") {
+ run_test(false);
+ }
+ SECTION("fd-less") {
+ run_test(true);
+ }
SECTION("direct with epoch") {
run_test.template operator()<true>(false);
}
diff --git a/test/buildtool/file_system/git_repo.test.cpp b/test/buildtool/file_system/git_repo.test.cpp
index 5a0831cc..2663e9bd 100644
--- a/test/buildtool/file_system/git_repo.test.cpp
+++ b/test/buildtool/file_system/git_repo.test.cpp
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "src/buildtool/file_system/git_repo.hpp"
+
#include <atomic>
#include <cstdlib>
#include <filesystem>
@@ -26,7 +28,6 @@
#include "nlohmann/json.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/git_cas.hpp"
-#include "src/buildtool/file_system/git_repo.hpp"
#include "src/buildtool/logging/log_level.hpp"
#include "src/buildtool/logging/logger.hpp"
#include "src/buildtool/storage/config.hpp"
diff --git a/test/buildtool/file_system/git_tree.test.cpp b/test/buildtool/file_system/git_tree.test.cpp
index 82177b45..2cef0e00 100644
--- a/test/buildtool/file_system/git_tree.test.cpp
+++ b/test/buildtool/file_system/git_tree.test.cpp
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "src/buildtool/file_system/git_tree.hpp"
+
#include <atomic>
#include <cstdlib>
#include <filesystem>
@@ -27,7 +29,6 @@
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/git_cas.hpp"
#include "src/buildtool/file_system/git_repo.hpp"
-#include "src/buildtool/file_system/git_tree.hpp"
#include "src/utils/cpp/hex_string.hpp"
#include "test/utils/container_matchers.hpp"
#include "test/utils/shell_quoting.hpp"
diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp
index a8fd746b..e9ebf580 100644
--- a/test/buildtool/file_system/object_cas.test.cpp
+++ b/test/buildtool/file_system/object_cas.test.cpp
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "src/buildtool/file_system/object_cas.hpp"
+
#include <functional> // std::equal_to
#include <string>
@@ -19,7 +21,6 @@
#include "src/buildtool/common/artifact_digest.hpp"
#include "src/buildtool/common/bazel_types.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
-#include "src/buildtool/file_system/object_cas.hpp"
#include "src/buildtool/file_system/object_type.hpp"
#include "src/buildtool/storage/config.hpp"
#include "test/utils/hermeticity/test_storage_config.hpp"
diff --git a/test/buildtool/file_system/resolve_symlinks_map.test.cpp b/test/buildtool/file_system/resolve_symlinks_map.test.cpp
index 2cf05ead..d1cd7692 100644
--- a/test/buildtool/file_system/resolve_symlinks_map.test.cpp
+++ b/test/buildtool/file_system/resolve_symlinks_map.test.cpp
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "src/buildtool/file_system/symlinks_map/resolve_symlinks_map.hpp"
+
#include <atomic>
#include <cstdlib>
#include <filesystem>
@@ -27,7 +29,6 @@
#include "src/buildtool/file_system/git_repo.hpp"
#include "src/buildtool/file_system/object_type.hpp"
#include "src/buildtool/file_system/symlinks_map/pragma_special.hpp"
-#include "src/buildtool/file_system/symlinks_map/resolve_symlinks_map.hpp"
#include "src/buildtool/multithreading/task_system.hpp"
#include "test/utils/shell_quoting.hpp"