summaryrefslogtreecommitdiffhomepage
path: root/test-ymake.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2024-05-12 16:07:53 +0200
committerRoland Reichwein <mail@reichwein.it>2024-05-12 16:07:53 +0200
commit8a4dfbbbe76a2aef35427b7915d6e28bab165c43 (patch)
tree5df3fe373ca755d51d8b06b7515ca3c296f54cc6 /test-ymake.cpp
parenta7e016c2c633667b561a0f26ebde88cb26571d1c (diff)
Build static and dynamic libs
Diffstat (limited to 'test-ymake.cpp')
-rw-r--r--test-ymake.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/test-ymake.cpp b/test-ymake.cpp
index c2dd78e..bf59bbc 100644
--- a/test-ymake.cpp
+++ b/test-ymake.cpp
@@ -433,7 +433,7 @@ TEST_F(ymakeTest, test_only)
TEST_F(ymakeTest, build_with_gcc)
{
- if (!is_executable("g++")) {
+ if (!is_executable_command("g++")) {
GTEST_SKIP() << "g++ not available";
}
@@ -463,7 +463,7 @@ TEST_F(ymakeTest, build_with_gcc)
TEST_F(ymakeTest, build_with_clang)
{
- if (!is_executable("clang++")) {
+ if (!is_executable_command("clang++")) {
GTEST_SKIP() << "clang++ not available";
}
@@ -629,12 +629,14 @@ TEST_F(ymakeTest, build_one_dynamic_lib)
int result = run_command("../ymake", output);
EXPECT_EQ(result, 0);
- ASSERT_EQ(output.size(), 3); // 2x compile, link
+ ASSERT_EQ(output.size(), 5); // 2x compile, link, 2 symlinks
EXPECT_EQ(output[2].substr(0, 4), "g++ ");
EXPECT_TRUE(fs::exists("hello.d"));
EXPECT_TRUE(fs::exists("hello.o"));
EXPECT_TRUE(fs::exists("hello.so.1.2.3"));
+ EXPECT_TRUE(fs::exists("hello.so.1"));
+ EXPECT_TRUE(fs::exists("hello.so"));
EXPECT_TRUE(fs::exists("second.d"));
EXPECT_TRUE(fs::exists("second.o"));
@@ -645,11 +647,13 @@ TEST_F(ymakeTest, build_one_dynamic_lib)
result = run_command("../ymake clean", output);
EXPECT_EQ(result, 0);
- ASSERT_EQ(output.size(), 5); // deleted 5 files
+ ASSERT_EQ(output.size(), 7); // deleted 7 files
EXPECT_TRUE(!fs::exists("hello.d"));
EXPECT_TRUE(!fs::exists("hello.o"));
EXPECT_TRUE(!fs::exists("hello.so.1.2.3"));
+ EXPECT_TRUE(!fs::exists("hello.so.1"));
+ EXPECT_TRUE(!fs::exists("hello.so"));
EXPECT_TRUE(!fs::exists("second.d"));
EXPECT_TRUE(!fs::exists("second.o"));
@@ -662,6 +666,8 @@ TEST_F(ymakeTest, build_one_dynamic_lib)
// TODO:
// use static lib
// use dynamic lib
+// use static lib from subdir
+// use dynamic lib from subdir
TEST_F(yscanTest, no_cpp_file)
{