mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 09:31:59 +00:00
Only run Objective-C tests on Apple platforms
This commit is contained in:
parent
fd7c01796c
commit
b4b45d36b5
@ -55,3 +55,6 @@ std::vector<std::string> GetPlatformClangArguments();
|
|||||||
|
|
||||||
// Free any unused memory and return it to the system.
|
// Free any unused memory and return it to the system.
|
||||||
void FreeUnusedMemory();
|
void FreeUnusedMemory();
|
||||||
|
|
||||||
|
// If true objective-c index tests will be run.
|
||||||
|
bool RunObjectiveCIndexTests();
|
@ -356,4 +356,12 @@ void FreeUnusedMemory() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RunObjectiveCIndexTests() {
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -248,4 +248,8 @@ std::vector<std::string> GetPlatformClangArguments() {
|
|||||||
|
|
||||||
void FreeUnusedMemory() {}
|
void FreeUnusedMemory() {}
|
||||||
|
|
||||||
|
bool RunObjectiveCIndexTests() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "serializer.h"
|
#include "serializer.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
#include <loguru.hpp>
|
||||||
|
|
||||||
void Write(const std::vector<std::string>& strs) {
|
void Write(const std::vector<std::string>& strs) {
|
||||||
for (const std::string& str : strs)
|
for (const std::string& str : strs)
|
||||||
std::cout << str << std::endl;
|
std::cout << str << std::endl;
|
||||||
@ -116,6 +118,12 @@ void RunIndexTests(const std::string& filter_path) {
|
|||||||
|
|
||||||
for (std::string path : GetFilesInFolder("tests", true /*recursive*/,
|
for (std::string path : GetFilesInFolder("tests", true /*recursive*/,
|
||||||
true /*add_folder_to_path*/)) {
|
true /*add_folder_to_path*/)) {
|
||||||
|
if (!RunObjectiveCIndexTests() && EndsWithAny(path, {".m", ".mm"})) {
|
||||||
|
LOG_S(INFO) << "Skipping \"" << path
|
||||||
|
<< "\" since this platform does not support running "
|
||||||
|
"Objective-C tests.";
|
||||||
|
}
|
||||||
|
|
||||||
float memory_before = GetProcessMemoryUsedInMb();
|
float memory_before = GetProcessMemoryUsedInMb();
|
||||||
float memory_after = -1.;
|
float memory_after = -1.;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user