Skip to content

Commit

Permalink
test!: figuring out file_google_tests.cpp segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
charliekush committed Aug 29, 2024
1 parent 20b94e3 commit a5bdd44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
- name: Build and run tests
run: |
cd tests
cmake -S .. -B build -DCMAKE_BUILD_TYPE=Debug
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cd build
make
gdb -q -ex "run" -ex "bt" -ex "quit" ./googletests
./googletests
cd ..
gdb -q -ex "run" -ex "bt" -ex "quit" ./build/googletests
./build/googletests
1 change: 1 addition & 0 deletions tests/file_google_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ std::vector<std::string> GetFilesInDirectory(const std::string& directory) {
std::vector<std::string> files;
DIR* dirp = opendir(directory.c_str());
struct dirent* dp;
std::cout << "Directory: " << directory.c_str() << "\n";
while ((dp = readdir(dirp)) != nullptr) {
if (dp->d_type == DT_REG) {
files.push_back(directory + "/" + std::string(dp->d_name));
Expand Down

0 comments on commit a5bdd44

Please sign in to comment.