diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-06-12 22:39:33 +0530 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-06-12 22:39:33 +0530 |
| commit | 1865425b4bbf87f9198353dd730de748680d3979 (patch) | |
| tree | 145d21de5ae3e4179d376e6bac9196ba0a56e25a | |
| parent | 8244f4c6a6436a7ddf585592c184714f803cfef8 (diff) | |
| download | meson-1865425b4bbf87f9198353dd730de748680d3979.tar.gz | |
tests/unit/8: Rename to 9 and add -l flags
| -rwxr-xr-x | run_unittests.py | 7 | ||||
| -rw-r--r-- | test cases/unit/9 -L -l order/first.pc (renamed from test cases/unit/8 L order/first.pc) | 2 | ||||
| -rw-r--r-- | test cases/unit/9 -L -l order/meson.build (renamed from test cases/unit/8 L order/meson.build) | 0 | ||||
| -rw-r--r-- | test cases/unit/9 -L -l order/prog.c (renamed from test cases/unit/8 L order/prog.c) | 0 | ||||
| -rw-r--r-- | test cases/unit/9 -L -l order/second.pc (renamed from test cases/unit/8 L order/second.pc) | 2 |
5 files changed, 7 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py index ab41f544b..a405b01be 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1756,10 +1756,13 @@ class LinuxlikeTests(BasePlatformTests): self.assertEqual(subprocess.call(installed_exe, env=env), 0) def test_order_of_l_arguments(self): - testdir = os.path.join(self.unit_test_dir, '8 L order') + testdir = os.path.join(self.unit_test_dir, '9 -L -l order') os.environ['PKG_CONFIG_PATH'] = testdir self.init(testdir) - expected_order = ['-L/me/first', '-L/me/second', '-L/me/third', '-L/me/fourth'] + # NOTE: .pc file has -Lfoo -lfoo -Lbar -lbar but pkg-config reorders + # the flags before returning them to -Lfoo -Lbar -lfoo -lbar + expected_order = ['-L/me/first', '-L/me/second','-lfoo1', '-lfoo2', + '-L/me/third', '-L/me/fourth', '-lfoo3', '-lfoo4'] with open(os.path.join(self.builddir, 'build.ninja')) as ifile: for line in ifile: if expected_order[0] in line: diff --git a/test cases/unit/8 L order/first.pc b/test cases/unit/9 -L -l order/first.pc index 8066f6e72..3b811b2e2 100644 --- a/test cases/unit/8 L order/first.pc +++ b/test cases/unit/9 -L -l order/first.pc @@ -9,5 +9,5 @@ Description: jonne library Version: 1.0.0 Requires: -Libs: -L/me/first -L/me/second +Libs: -L/me/first -lfoo1 -L/me/second -lfoo2 Cflags: -I${includedir} diff --git a/test cases/unit/8 L order/meson.build b/test cases/unit/9 -L -l order/meson.build index cfcf033fa..cfcf033fa 100644 --- a/test cases/unit/8 L order/meson.build +++ b/test cases/unit/9 -L -l order/meson.build diff --git a/test cases/unit/8 L order/prog.c b/test cases/unit/9 -L -l order/prog.c index 3a16ac3dc..3a16ac3dc 100644 --- a/test cases/unit/8 L order/prog.c +++ b/test cases/unit/9 -L -l order/prog.c diff --git a/test cases/unit/8 L order/second.pc b/test cases/unit/9 -L -l order/second.pc index 602f2629f..196824b74 100644 --- a/test cases/unit/8 L order/second.pc +++ b/test cases/unit/9 -L -l order/second.pc @@ -9,5 +9,5 @@ Description: jonne2 library Version: 1.0.0 Requires: -Libs: -L/me/third -L/me/fourth +Libs: -L/me/third -lfoo3 -L/me/fourth -lfoo4 Cflags: -I${includedir} |
