File fix-utils-test-network.diff of Package apparmor.11939

commit 0c65b9aeb925297b95e249caa57d33221295d5ea
Author: Steve Beattie <steve.beattie@canonical.com>
Date:   Thu Jun 13 23:28:46 2019 -0700

    utils/test-network.py: fix failing testcase
    
    When dc010bc0340fe8b7159db5c3c2e01f7e27749ea8 was
    backported to the apparmor-2.13 branch (in commit
    75236d62e2bcbed36cccf84212d1ac92d2b6ae0b), it did not take into
    account cb8c3377babfed4600446d1f60d53d8e2a581578, which creates the
    common/list_af_names.sh script as used in the test case, was not also
    backported to the apparmor-2.13 branch.
    
    Change the test case to get the list of network AF names via the same
    make invocation taken by the utils/vim/create-apparmor.vim.py script
    before the common/list_af_names.sh existed.
    
    PR: https://gitlab.com/apparmor/apparmor/merge_requests/391
    Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
    Signed-off-by: John Johansen <john.johansen@canonical.com>

diff --git a/utils/test/test-network.py b/utils/test/test-network.py
index 73a6b9d1..8605786d 100644
--- a/utils/test/test-network.py
+++ b/utils/test/test-network.py
@@ -31,7 +31,7 @@ exp = namedtuple('exp', ['audit', 'allow_keyword', 'deny', 'comment',
 
 class NetworkKeywordsTest(AATest):
     def test_network_keyword_list(self):
-        rc, output = cmd('../../common/list_af_names.sh')
+        rc, output = cmd(['make', '-s', '--no-print-directory', 'list_af_names'])
         self.assertEqual(rc, 0)
 
         af_names = []
openSUSE Build Service is sponsored by