Merge "Add a test to verify basic console output" into feature/zuulv3
diff --git a/tests/unit/test_model.py b/tests/unit/test_model.py
index ce30e7c..6dd8333 100644
--- a/tests/unit/test_model.py
+++ b/tests/unit/test_model.py
@@ -202,7 +202,7 @@
             'name': 'python27',
             'parent': 'base',
             'pre-run': 'py27-pre',
-            'post-run': 'py27-post',
+            'post-run': ['py27-post-a', 'py27-post-b'],
             'nodes': [{
                 'name': 'controller',
                 'label': 'new',
@@ -275,7 +275,8 @@
                          ['base-pre',
                           'py27-pre'])
         self.assertEqual([x.path for x in job.post_run],
-                         ['py27-post',
+                         ['py27-post-a',
+                          'py27-post-b',
                           'base-post'])
         self.assertEqual([x.path for x in job.run],
                          ['playbooks/python27',
@@ -305,7 +306,8 @@
                           'py27-diablo-pre'])
         self.assertEqual([x.path for x in job.post_run],
                          ['py27-diablo-post',
-                          'py27-post',
+                          'py27-post-a',
+                          'py27-post-b',
                           'base-post'])
         self.assertEqual([x.path for x in job.run],
                          ['py27-diablo']),
@@ -330,7 +332,8 @@
                           'py27-essex-pre'])
         self.assertEqual([x.path for x in job.post_run],
                          ['py27-essex-post',
-                          'py27-post',
+                          'py27-post-a',
+                          'py27-post-b',
                           'base-post'])
         self.assertEqual([x.path for x in job.run],
                          ['playbooks/python27',
diff --git a/zuul/configloader.py b/zuul/configloader.py
index 7da54cd..c925024 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -507,7 +507,10 @@
                                             pre_run_name, job.roles,
                                             secrets)
             job.pre_run = job.pre_run + (pre_run,)
-        for post_run_name in as_list(conf.get('post-run')):
+        # NOTE(pabelanger): Reverse the order of our post-run list. We prepend
+        # post-runs for inherits however, we want to execute post-runs in the
+        # order they are listed within the job.
+        for post_run_name in reversed(as_list(conf.get('post-run'))):
             post_run = model.PlaybookContext(job.source_context,
                                              post_run_name, job.roles,
                                              secrets)