From 839d7cc63aac9d6f7c03b4dd0c64829f7c75f1f2 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 5 Dec 2018 15:29:18 -0500 Subject: move applelink test to use directory fixture --- test/LINK/applelink.py | 26 ++------------------------ test/LINK/applelink_image/SConstruct_gh2580 | 8 ++++++++ test/LINK/applelink_image/foo.c | 9 +++++++++ test/LINK/applelink_image/sconstest.skip | 0 4 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 test/LINK/applelink_image/SConstruct_gh2580 create mode 100644 test/LINK/applelink_image/foo.c create mode 100644 test/LINK/applelink_image/sconstest.skip diff --git a/test/LINK/applelink.py b/test/LINK/applelink.py index 3419fc1..36b4bf2 100644 --- a/test/LINK/applelink.py +++ b/test/LINK/applelink.py @@ -34,31 +34,9 @@ _exe = TestSCons._exe test = TestSCons.TestSCons() -test.write('foo.c', r""" -#include -#include -int -main(int argc, char *argv[]) -{ - argv[argc++] = "--"; - printf("foo.c\n"); - exit (0); -} -""") - # Test issue # 2580 -test.write('SConstruct', """ -DefaultEnvironment(tools=[]) -env = Environment(PLATFORM='darwin') -env.Object( - target = '#foo.o', - source = ['foo.c'], - FRAMEWORKS = ['Ogre'], - FRAMEWORKPATH = ['#frameworks'] -) -""" % locals()) - -test.run(arguments='-Q -n', stdout='gcc -o foo.o -c -Fframeworks foo.c\n') +test.dir_fixture('applelink_image') +test.run(arguments='-f SConstruct_gh2580 -Q -n', stdout='gcc -o foo.o -c -Fframeworks foo.c\n') test.pass_test() diff --git a/test/LINK/applelink_image/SConstruct_gh2580 b/test/LINK/applelink_image/SConstruct_gh2580 new file mode 100644 index 0000000..79fd9d5 --- /dev/null +++ b/test/LINK/applelink_image/SConstruct_gh2580 @@ -0,0 +1,8 @@ +DefaultEnvironment(tools=[]) +env = Environment(PLATFORM='darwin') +env.Object( + target = '#foo.o', + source = ['foo.c'], + FRAMEWORKS = ['Ogre'], + FRAMEWORKPATH = ['#frameworks'] +) diff --git a/test/LINK/applelink_image/foo.c b/test/LINK/applelink_image/foo.c new file mode 100644 index 0000000..a441953 --- /dev/null +++ b/test/LINK/applelink_image/foo.c @@ -0,0 +1,9 @@ +#include +#include +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf("foo.c\n"); + exit (0); +} \ No newline at end of file diff --git a/test/LINK/applelink_image/sconstest.skip b/test/LINK/applelink_image/sconstest.skip new file mode 100644 index 0000000..e69de29 -- cgit v0.12