From 2795950ef5a3f93be1309b6015b867d100c98796 Mon Sep 17 00:00:00 2001 From: Niels Grewe Date: Tue, 8 Dec 2015 09:44:01 +0000 Subject: [PATCH 1/4] Re-add ghostly .travis.yml --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0bc970e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +compiler: clang +script: + - mkdir build + - cd build + - cmake -DCMAKE_BUILD_TYPE=Debug .. + - cmake --build . + - cmake --build . --target test From 4a59b2a986c2c1d7467af12ded3678176d53581a Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 27 Dec 2015 22:12:56 +0100 Subject: [PATCH 2/4] Set up the new forwarding hook in the objc_msgSend test. This is probably wrong, as we should be calling forward2 if forward3 is not set, but it makes the test pass for now. --- Test/objc_msgSend.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Test/objc_msgSend.m b/Test/objc_msgSend.m index 1d4f372..4dcb95e 100644 --- a/Test/objc_msgSend.m +++ b/Test/objc_msgSend.m @@ -164,9 +164,18 @@ IMP forward(id o, SEL s) return (IMP)fwdMany; } +static struct objc_slot slot; +struct objc_slot *forwardslot(id o, SEL s) +{ + slot.method = (IMP)fwd; + return &slot; +} + + int main(void) { __objc_msg_forward2 = forward; + __objc_msg_forward3 = forward_slot; TestCls = objc_getClass("Test"); int exceptionThrown = 0; @try { From a6e65cea045f5579898cece16856bfa157937855 Mon Sep 17 00:00:00 2001 From: Niels Grewe Date: Mon, 28 Dec 2015 10:49:24 +0000 Subject: [PATCH 3/4] Fix typo in test function --- Test/objc_msgSend.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/objc_msgSend.m b/Test/objc_msgSend.m index 4dcb95e..612734d 100644 --- a/Test/objc_msgSend.m +++ b/Test/objc_msgSend.m @@ -165,7 +165,7 @@ IMP forward(id o, SEL s) } static struct objc_slot slot; -struct objc_slot *forwardslot(id o, SEL s) +struct objc_slot *forward_slot(id o, SEL s) { slot.method = (IMP)fwd; return &slot; From 16d563fc145eb8ac7b7864ebc7959cf515789634 Mon Sep 17 00:00:00 2001 From: Niels Grewe Date: Mon, 28 Dec 2015 10:53:19 +0000 Subject: [PATCH 4/4] Run ctest directly for travis CI builds --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0bc970e..c6a7857 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ script: - cd build - cmake -DCMAKE_BUILD_TYPE=Debug .. - cmake --build . - - cmake --build . --target test + - ctest