diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-10-14 22:19:26 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-10-14 22:19:26 +0200 |
commit | c0eacf8e85003844b95e71b9004fa464d4586a38 (patch) | |
tree | a407dc8ec3830cb01faf3d5153c8741f9b19e1c1 /test | |
parent | 87aad8c76eb2371720c9aceef7516ecb0859ecdf (diff) |
Use dependency system and build system for compiling ctor on config changes.
Diffstat (limited to 'test')
-rw-r--r-- | test/ctor.cc | 3 | ||||
-rw-r--r-- | test/tasks_test.cc | 22 |
2 files changed, 14 insertions, 11 deletions
diff --git a/test/ctor.cc b/test/ctor.cc index 3d05e7f..61c3515 100644 --- a/test/ctor.cc +++ b/test/ctor.cc @@ -22,6 +22,7 @@ BuildConfigurations ctorTestConfigs() "-I../src", "-Iuunit", "-DOUTPUT=\"execute\"", }, + .ldflags = { "-pthread" }, }, { .type = TargetType::UnitTest, @@ -36,6 +37,7 @@ BuildConfigurations ctorTestConfigs() "-I../src", "-Iuunit", "-DOUTPUT=\"tasks\"", }, + .ldflags = { "-pthread" }, }, { .type = TargetType::UnitTest, @@ -50,6 +52,7 @@ BuildConfigurations ctorTestConfigs() "-I../src", "-Iuunit", "-DOUTPUT=\"source_type\"", }, + .ldflags = { "-pthread" }, }, }; } diff --git a/test/tasks_test.cc b/test/tasks_test.cc index 612d899..3c9243c 100644 --- a/test/tasks_test.cc +++ b/test/tasks_test.cc @@ -95,34 +95,34 @@ public: void getTasks_test() { using namespace std::string_literals; - Settings settings{}; + Settings settings{ .builddir = "foo" }; { auto tasks = getTasks(settings); uASSERT_EQUAL(6u, tasks.size()); auto task = tasks.begin(); - uASSERT_EQUAL("test/target1-foo_cc.o"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target1-foo_cc.o"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target1-bar_c.o"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target1-bar_c.o"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target1"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target1"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target2"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target2"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target3"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target3"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target4"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target4"s, (*task)->target()); } { auto tasks = getTasks(settings, {"target1", "target3"}); uASSERT_EQUAL(4u, tasks.size()); auto task = tasks.begin(); - uASSERT_EQUAL("test/target1-foo_cc.o"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target1-foo_cc.o"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target1-bar_c.o"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target1-bar_c.o"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target1"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target1"s, (*task)->target()); task++; - uASSERT_EQUAL("test/target3"s, (*task)->target()); + uASSERT_EQUAL("foo/test/target3"s, (*task)->target()); } { auto tasks = getTasks(settings, {"no-such-target"}); |