#20 fix broken test on Circle CI

pull/32/head
Geoffrey Merck 4 years ago
parent ee4270940d
commit d5b78104c6

@ -135,7 +135,7 @@
"program": "${workspaceFolder}/Tests/dstargateway_tests", "program": "${workspaceFolder}/Tests/dstargateway_tests",
"args": [ ], "args": [ ],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}/Tests/",
"environment": [], "environment": [],
"externalConsole": false, "externalConsole": false,
"MIMode": "gdb", "MIMode": "gdb",

@ -47,7 +47,7 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_lookup, onlyIndexFileExists) TEST_F(AMBEFileReader_lookup, onlyIndexFileExists)
{ {
std::string indexFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.indx"; std::string indexFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.indx";
CAMBEFileReader reader(indexFile, "/this/file/does/not/exist"); CAMBEFileReader reader(indexFile, "/this/file/does/not/exist");
bool res = reader.read(); bool res = reader.read();
EXPECT_FALSE(res) << "read shall return false on non existent file"; EXPECT_FALSE(res) << "read shall return false on non existent file";
@ -63,7 +63,7 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_lookup, onlyAmbeFileExists) TEST_F(AMBEFileReader_lookup, onlyAmbeFileExists)
{ {
std::string ambeFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.ambe"; std::string ambeFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.ambe";
CAMBEFileReader reader("/this/file/does/not/exist", ambeFile); CAMBEFileReader reader("/this/file/does/not/exist", ambeFile);
bool res = reader.read(); bool res = reader.read();
EXPECT_FALSE(res) << "read shall return false on non existent file"; EXPECT_FALSE(res) << "read shall return false on non existent file";
@ -79,8 +79,8 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_lookup, validId) TEST_F(AMBEFileReader_lookup, validId)
{ {
std::string indexFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.indx"; std::string indexFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.indx";
std::string ambeFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.ambe"; std::string ambeFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.ambe";
CAMBEFileReader reader(indexFile, ambeFile); CAMBEFileReader reader(indexFile, ambeFile);
bool res = reader.read(); bool res = reader.read();
EXPECT_TRUE(res) << "read shall return true on existent files"; EXPECT_TRUE(res) << "read shall return true on existent files";
@ -97,8 +97,8 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_lookup, invalidId) TEST_F(AMBEFileReader_lookup, invalidId)
{ {
std::string indexFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.indx"; std::string indexFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.indx";
std::string ambeFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.ambe"; std::string ambeFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.ambe";
CAMBEFileReader reader(indexFile, ambeFile); CAMBEFileReader reader(indexFile, ambeFile);
bool res = reader.read(); bool res = reader.read();
EXPECT_TRUE(res) << "read shall return true on existent files"; EXPECT_TRUE(res) << "read shall return true on existent files";

@ -38,7 +38,7 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_read, onlyIndexFileExists) TEST_F(AMBEFileReader_read, onlyIndexFileExists)
{ {
std::string indexFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.indx"; std::string indexFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.indx";
CAMBEFileReader reader(indexFile, "/this/file/does/not/exist"); CAMBEFileReader reader(indexFile, "/this/file/does/not/exist");
bool res = reader.read(); bool res = reader.read();
EXPECT_FALSE(res) << "read shall return false on non existent file"; EXPECT_FALSE(res) << "read shall return false on non existent file";
@ -46,7 +46,7 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_read, onlyAmbeFileExists) TEST_F(AMBEFileReader_read, onlyAmbeFileExists)
{ {
std::string ambeFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.ambe"; std::string ambeFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.ambe";
CAMBEFileReader reader("/this/file/does/not/exist", ambeFile); CAMBEFileReader reader("/this/file/does/not/exist", ambeFile);
bool res = reader.read(); bool res = reader.read();
EXPECT_FALSE(res) << "read shall return false on non existent file"; EXPECT_FALSE(res) << "read shall return false on non existent file";
@ -54,11 +54,8 @@ namespace AMBEFileReaderTests
TEST_F(AMBEFileReader_read, bothFileExist) TEST_F(AMBEFileReader_read, bothFileExist)
{ {
std::string indexFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.indx"; std::string indexFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.indx";
std::string ambeFile = std::string(std::filesystem::current_path()) + "/Tests/AMBEFileReader/fr_FR.ambe"; std::string ambeFile = std::string(std::filesystem::current_path()) + "/AMBEFileReader/fr_FR.ambe";
CLog::logInfo("Reading file: %s", indexFile.c_str());
CLog::logInfo("Reading file: %s", ambeFile.c_str());
CAMBEFileReader reader(indexFile, ambeFile); CAMBEFileReader reader(indexFile, ambeFile);
bool res = reader.read(); bool res = reader.read();

@ -10,7 +10,7 @@ dstargateway_tests: ../VersionInfo/GitVersion.h $(OBJS) ../APRS/APRS.a ../IRCDDB
-include $(DEPS) -include $(DEPS)
.PHONY run-tests: dstargateway_tests .PHONY run-tests: dstargateway_tests
./dstargateway_tests ./dstargateway_tests
.PHONY clean : .PHONY clean :

Loading…
Cancel
Save

Powered by TurnKey Linux.