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

Add testing infrastructure for the DynamicLibraryManager #155

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

vgvassilev
Copy link
Contributor

No description provided.

@vgvassilev
Copy link
Contributor Author

cc: @Smit1603

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment on lines 289 to 293
} else {
LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [llvm-else-after-return]

Suggested change
} else {
LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();
}
} LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();

@@ -0,0 +1,8 @@
#include "gtest/gtest.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]

#include "gtest/gtest.h"
         ^

@@ -0,0 +1,2 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: header is missing header guard [llvm-header-guard]

Suggested change
#ifndef GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#define GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H

unittests/CppInterOp/TestSharedLib/TestSharedLib.h:-1:

+ 
+ #endif

@vgvassilev vgvassilev force-pushed the dynamic-lib-man-tests branch from 88f6bd4 to 10a0f5a Compare October 19, 2023 18:05
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment on lines 289 to 293
} else {
LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [llvm-else-after-return]

Suggested change
} else {
LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();
}
} LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();

@vgvassilev vgvassilev force-pushed the dynamic-lib-man-tests branch 2 times, most recently from fcc9794 to 3b50482 Compare October 19, 2023 18:15
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment on lines 289 to 293

LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use 'else' after 'return' [llvm-else-after-return]

Suggested change
LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();
}
} LLVM_DEBUG(dbgs() << "Dyld::lookupLibrary: '" << libStem.str() << "'"
<< "is not a shared library\n");
return std::string();

@@ -0,0 +1,6 @@
#ifndef UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: header is missing header guard [llvm-header-guard]

Suggested change
#ifndef UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#ifndef GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#define GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H

unittests/CppInterOp/TestSharedLib/TestSharedLib.h:-1:

+ 
+ #endif

@vgvassilev vgvassilev force-pushed the dynamic-lib-man-tests branch from 3b50482 to 72624fd Compare October 19, 2023 18:16
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment on lines +1 to +2
#ifndef UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#define UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: header guard does not follow preferred style [llvm-header-guard]

Suggested change
#ifndef UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#define UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#ifndef GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#define GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H

unittests/CppInterOp/TestSharedLib/TestSharedLib.h:5:

- #endif // UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
+ #endif // GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #155 (72624fd) into main (f5f7b56) will increase coverage by 4.45%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #155      +/-   ##
==========================================
+ Coverage   65.85%   70.31%   +4.45%     
==========================================
  Files          17       19       +2     
  Lines        4326     4332       +6     
==========================================
+ Hits         2849     3046     +197     
+ Misses       1477     1286     -191     
Files Coverage Δ
unittests/CppInterOp/DynamicLibraryManagerTest.cpp 100.00% <100.00%> (ø)
...ittests/CppInterOp/TestSharedLib/TestSharedLib.cpp 0.00% <0.00%> (ø)
lib/Interpreter/DynamicLibraryManager.cpp 55.73% <0.00%> (+55.73%) ⬆️

... and 4 files with indirect coverage changes

Files Coverage Δ
unittests/CppInterOp/DynamicLibraryManagerTest.cpp 100.00% <100.00%> (ø)
...ittests/CppInterOp/TestSharedLib/TestSharedLib.cpp 0.00% <0.00%> (ø)
lib/Interpreter/DynamicLibraryManager.cpp 55.73% <0.00%> (+55.73%) ⬆️

... and 4 files with indirect coverage changes

@vgvassilev
Copy link
Contributor Author

The failures are preexisting.

@vgvassilev vgvassilev merged commit 4f39c2d into compiler-research:main Oct 19, 2023
8 of 10 checks passed
@vgvassilev vgvassilev deleted the dynamic-lib-man-tests branch October 19, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant